Unable to create AWS CodeBuild Webhook
Asked Answered
S

5

12

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?

Showmanship answered 28/11, 2017 at 10:31 Comment(1)
The same thing is has been going on for about 24 hours. I guess I just have to wait.Dustheap
S
6

I think it was a server error on AWS' side. I tried again 4 hours later and it's suddenly working now.

Showmanship answered 28/11, 2017 at 14:50 Comment(0)
S
16

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.

Spanking answered 23/3, 2018 at 22:47 Comment(1)
This was also the issue for me. The Github user you're using to authorize CodeBuild must be made an administrator of the project in order to create the webhook. I think the administrator access can be revoked afterwards.Sensitivity
S
6

I think it was a server error on AWS' side. I tried again 4 hours later and it's suddenly working now.

Showmanship answered 28/11, 2017 at 14:50 Comment(0)
A
5

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...

Aniconic answered 25/8, 2020 at 5:38 Comment(0)
H
1

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!

Humanitarianism answered 22/1, 2019 at 14:16 Comment(0)
B
1

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.

Bluegill answered 15/6, 2021 at 6:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.