I have added bitbucket webhook for jenkins integration in my repository settings but it is returning 403 error. The webhook URL is provided in the following format:
https://username:apitoken@jenkins-url/bitbucket-hook/
The username provided also have admin access in Jenkins still it is giving :
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /bitbucket-hook/
on this server.<br />
</p>
</body></html>
I have tried all the combinations like username:password instead of API token but it is throwing error in all conditions.
Just to let you know that Jenkins can successfully pull the code from bitbucket when the job is triggered manually.