- Newest
- Most votes
- Most comments
It appears you're experiencing issues with CodeBuild's ability to create GitHub webhooks. There are a few potential solutions to this problem:
-
Use manual webhook creation: CodeBuild provides a manual webhook creation feature that allows you to bypass the automatic webhook creation process. When you enable this option, CodeBuild will provide you with a payload URL and a secret that you can use to manually create the webhook in your GitHub repository settings. This approach works even if CodeBuild is not allowlisted to create webhooks in your GitHub account.
-
Check permissions: Ensure that CodeBuild has the necessary permissions to create webhooks within GitHub. If you're using an existing OAuth connection, you might need to regenerate the connection to grant CodeBuild this permission. You can revoke the OAuth token's permission and reconnect through the CodeBuild console.
-
Verify API limits: One of the error messages you might encounter is "Failed to create webhook. GitHub API limit reached. Please try again later." If this is the case, you may need to wait before trying again.
-
Check IAM role permissions: Although you mentioned giving the CodeBuild service role full admin rights, it's worth verifying that the IAM role associated with your CodeBuild project has the necessary permissions to use the GitHub connection.
-
Verify repository access: Ensure that the GitHub App connection has access to the repositories you're trying to use. The error "Authentication required for primary source" can occur if the connection doesn't have proper access.
The manual webhook creation approach is likely the most straightforward solution to your current issue, as it bypasses any potential permission or API limit problems with automatic webhook creation.
Sources
GitHub manual webhooks - AWS CodeBuild
Filter GitHub global or organization webhook events (console) - AWS CodeBuild
GitHub App connections for GitHub and GitHub Enterprise Server - AWS CodeBuild
Webhook - AWS CodeBuild
answered a year ago
Relevant content
asked 7 months ago
asked 2 years ago
asked 7 years ago

I even get the error, when I select manual webhook creation. I have already checked the rest and none worked nor helped