14

After creating aws codepipeline, am getting error like

Could not register webhook . The webhook was created, and your pipeline was updated, but the webhook could not be registered with GitHub. Wait a few minutes and then try again. If the problem continues, contact your AWS administrator or AWS Support. Failed on the following operation: RegisterWebhookWithThirdParty. The following message contains details on the exception: Webhook could not be registered with GitHub. Error cause: Not found [StatusCode: 404, Body: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/repos/hooks/#create-a-hook"}]

Does anyone have idea about this issues? Thanks in advance

simbu
  • 141
  • 1
  • 3

3 Answers3

20

You can create a webhook only when you have admin access to bitbucket/github.Try creating a webhook from an admin account.That should solve your problem.

Shubham Chopra
  • 1,678
  • 17
  • 30
  • 1
    @simbu Please accept the answer if it solved your problem.Thanks – Shubham Chopra Apr 30 '19 at 08:40
  • @ShubhamChopra I changed permission level collaborators to Admin, but still get error – Nam Lee Nov 15 '19 at 06:44
  • @ShubhamChopra I create an organization, then I create repository in this organization. When I create pipeline, I get the same error as in the post: Could not register webhook webhook-abc123-... The webhook was created, and your pipeline was updated, but the webhook could not be registered with GitHub... – Nam Lee Nov 15 '19 at 08:37
  • @ShubhamChopra When I connect to github and select repo, it will not suggest the Repo that I created in the other organization. But when I filled in the name by text, it was still ok. But when creating the pipeline, it fails. – Nam Lee Nov 15 '19 at 08:42
  • @ShubhamChopra In setting of organization, I removed restrictions in Third-party application access policy. So now, it's ok <3. – Nam Lee Nov 15 '19 at 11:04
0

Errors like this from Github can be particularly difficult to triage because of the way Github that handles what should be a 403 Forbidden as a 404 Not Found.

The very likely cause of this issue is that while you may have read and write permissions to Github your Github Personal Access Token likely does not have Webhook permissions.

The resolution to this is to have the repo administrator grant the appropriate Webhook creation permissions to the Github user account that is requesting to create the Webhook.

hephalump
  • 5,860
  • 1
  • 22
  • 23
0
  1. Go to the repository settings
  2. Select the Webhooks tab.
  3. Delete all webhooks related to codepipeline.
  4. Redeploy your pipelines.