2

I have a Jenkins installation on a machine running Windows Server 2008. The Jenkins installation is secured using Jenkins own user database with matrix-based security authorization. Anonymous users don't have any access, except to register an account. I have set up an account and gave this account full access.

Now I'd like to trigger a build remotely from a different machine that hosts the repository. I believe this should be possible by accessing the following URL:

https://[username]:[user_api_token]@[address.of.jenkins]:8080/job/[project]/build?token=[project_api_token]

However, this does not seem to be working for me. When I access this site in a browser, Jenkins forwards to the login-page, and does not start the build.

What am I doing wrong? It seems to be an authentication problem, as I'm not logged in after opening the URL above. Furthermore, if I give anonymous users full access, the URL works.

2
  • You haven't specified which version of Jenkins. The doco describes issues with versions of wget (if that is what your using). wiki.jenkins-ci.org/display/JENKINS/… Nov 17, 2012 at 18:15
  • Thanks, I'm using Jenkins 1.490. I'm using a regular web browser (Chrome to be specific) to access the URL. I believe this is supposed to work.
    – goldfish
    Nov 19, 2012 at 6:13

1 Answer 1

0

Try invoking the build from a command-line program like curl:

curl http://[userid]:[user_token]@localhost:8080/job/[project]/build?token=[proj_token]

or

curl --user [userid]:[user_token] http://localhost:8080/job/[project]/build?token=[proj_token]

I think your issue could be browser related, embedding credentials within the URL (Firefox pops up a warning in my case telling me I'm about to login to Jenkins)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.