Bitbucket Webhook is not triggering Jenkins job even webhook returns 200

Viewed 117

I am using bitbucket cloud and jenkins is running on ec2 instance on the private network. Connection is well established between bitbucket and jenkins as when i run the job manually, the job shows the green status. However when i made the changes in the repo and it gets merged the webhook is not using my app password and as a result the job is getting failed.

I am getting authentication failed and It's basically asking me to use the app password. I have already created it but still webhook is not using it. I am getting the response 200 now in webhook means my webhook is able to reach the jenkins server but i am not sure why i am getting authentication failed.

1 Answers

Can you confirm that:

  1. Your credentials are correctly placed under the credentials section of Jenkins. The username should be the username of the account you are using, and the password should be the app password. It should be present like this:

enter image description here

  1. The ID of the credentials should be used within your pipeline script anywhere you want access to the Bitbucket repository.
  2. Ensure that Bitbucket has access to your EC2 instance that runs Jenkins.

Basically, these are the 3 points where authentication can fail. Checking each point should reveal the problem.

Related