I want to use webhook w/ Jenkins. My jenkins server doesn't allow for anonymous access and therefore I need to specify username and password. I do have an api key that I use to trigger the job via curl command, but I just don't see where I'd specify credentials in our bitbucket server. It attempts to post the request as anonymous and therefore it fails. Do we have a mechanism for providing credentials in the webshoot uri? Embedding them in the url perhaps? please advise.
Thanks,
Henry
I have been scouring the internet for this exact thing as well! I’ve found several things on the Jenkins side that allow you to make the request with inline credentials like:
Http://user:pass@jenkins_url/job/...
But the native webhooks in Bitbucket seem to strip off the credentials and forces the request to anonymous.
I’ve submitted a support ticket to Atlassian and will let you know if I hear back. In the mean time I did find this Jenkins plugin: https://plugins.jenkins.io/build-token-root/
which allows you to keep your Jenkins locked down, but exposes a new endpoint which you can use with the remote trigger tokens inside Jenkins. I have tested this with my Bitbucket and Jenkins and it works great, but I’m still a little disappointed Atlassian doesn’t provide a better webhook with basic auth capabilities.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.