跳至內容

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 年前檢視次數 1475 次

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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。