跳至内容

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.

已提问 2 年前1466 查看次数

1 回答
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.

AWS
专家

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。