AWS Codebuild error while adding github as source

0

I'm trying to add my github repo as the source for the codebuild. Although it says the connection is successful, there is an error while selecting the "Repository in my Github account". Codebuild error while fetching data from github.

Error: An unspecified error occurred. Check your network connectivity, and then check to see if there are any issues with the service at the <a href="https://status.aws.amazon.com/" target="_blank" rel="noopener noreferrer">Service Health Dashboard</a>.

No connectivity issues since I can open github in my browser. I didn't find any issue in the Service Health Dashboard.

In connection page, the status is "Available". Enter image description here

Please help me to integrate the github with codebuild.

asked a month ago172 views
1 Answer
0
  1. Ensure that the IAM role associated with your CodeBuild project has the necessary permissions to access GitHub. This includes permissions to pull from the repository and any other actions your build process requires.

  2. Ensure that the GitHub integration with AWS CodeBuild is correctly configured:

    OAuth App Authorization: Confirm that AWS CodeBuild is authorized as an OAuth app in GitHub. GitHub: Go to GitHub Settings > Authorized OAuth Apps and ensure AWS CodeBuild is listed with access to your repositories. If needed, reauthorize CodeBuild: Go to AWS CodeBuild console. Navigate to the Source section and reconfigure the GitHub connection.

  3. Update GitHub Token An expired or incorrectly configured token can cause issues:

    Generate a New Token: Go to GitHub Tokens. Generate a new token with the necessary scopes, typically repo (for private repositories) or public_repo (for public repositories). Update Token in CodeBuild: In the AWS CodeBuild console, update the source settings with the new token.

  4. Ensure there are no restrictive rules in your network ACLs or security groups that might be blocking communication between AWS CodeBuild and GitHub. This includes checking for any rules that might block outbound HTTPS traffic to GitHub.

profile pictureAWS
EXPERT
Deeksha
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions