Reputation: 353
I'm trying to create a webhook via AWS CodeBuild and this is the error I receive.
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?
Upvotes: 13
Views: 12416
Reputation: 53
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.
Upvotes: 1
Reputation: 51
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...
Upvotes: 5
Reputation: 539
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!
Upvotes: 1
Reputation: 859
I ran into the same problem and was able to resolve it by getting proper permissions for my Github user. Basically my Github user did not have access to create a webhook, though I had permission to read the repo.
Upvotes: 16
Reputation: 353
I think it was a server error on AWS' side. I tried again 4 hours later and it's suddenly working now.
Upvotes: 6