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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.