Unable to create AWS CodeBuild Webhook

Viewed 7440

I'm trying to create a webhook via AWS CodeBuild and this is the error I receive.

This is the error I've also tried creating the webhook via AWS CLI using the following command:

aws codebuild create-webhook --project-name myClassifiedProjectName

And I get the same error:

An error occurred (OAuthProviderException) when calling the CreateWebhook operation: Unable to create webhook at this time. Please try again later.

Any suggestions?

5 Answers

For other people coming here looking for a solution: For us, it was about the 20 webhook limit per a GitHub repo. We have a monorepo and currently have a trigger for each projects pipeline, which obviously doesn't work out anymore. Obviously a more helpful error message would've saved several hours of debugging...

To add my solution (way after the fact), I fixed this problem by selecting Enable SSO on my GitHub personal Access token. If your GitHub organisation uses SSO, and you want CodeBuild to be able to access a private repo in your organisation, then you will need to allow SSO on the personal access token.

We use Bitbucket IP whitelisting, and despite adding the relevant AWS ranges, I also could not create a web hook. I resorted to disabling IP whitelisting, setting up the CodeBuild again, then re-enabling it.

Note: Bitbucket will notify all admins that the whitelist has been disabled!

Related