|
how to pass login credentials in url when invoking job by url from
browser |
|
Hi Uday Kumar
See https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients Example (works for us): wget --auth-no-challenge --http-user=user --http-password=password http://our-build-system/jenkins/job/the-job/build Arjan Verstoep Software development engineer BTS TM DS Steria Schweiz AG Steinackerstrasse 47 CH-8902 Urdorf Switzerland Tel: +41 44 734 80 00 [hidden email] www.steria.ch Think before you print - Steria is committed to supporting a sustainable world. From: uday kumar <[hidden email]> To: Jenkins Users <[hidden email]> Date: 30.04.2012 08:38 Subject: how to pass login credentials in url when invoking job by url from browser Sent by: [hidden email] how to pass login credentials in url when invoking job by url from browser This message is intended exclusively for the designated addressee. It may contain confidential material. If you are not the correct addressee, please notify the sender immediately and destroy the message. The content of this message will engage the responsibility of Steria only if it has been sent by an authorized person acting in the strict scope of his functions and for purposes that are related to his competence. Although reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus. |
|
Hi,
Thanks for your reply.I have tried with both wget --auth-no-challenge --http-user=user --http-password=apiToken http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN wget http://user:apiToken@.../job/your_job/build?token=TOKEN but i am getting "403 Forbidden error".What should i do.? and one more question is can't we directly access the url from browser by passing the credentials there itself. Thanks, Uday Kumar On Apr 30, 11:41 am, [hidden email] wrote: > Hi Uday Kumar > > Seehttps://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+c... > > Example (works for us): > wget --auth-no-challenge --http-user=user --http-password=passwordhttp://our-build-system/jenkins/job/the-job/build > > Arjan Verstoep > Software development engineer > BTS TM DS > Steria Schweiz AG > Steinackerstrasse 47 > CH-8902 Urdorf > Switzerland > Tel: +41 44 734 80 00 > [hidden email] > Think before you print - Steria is committed to supporting a sustainable > world. > > From: uday kumar <[hidden email]> > To: Jenkins Users <[hidden email]> > Date: 30.04.2012 08:38 > Subject: how to pass login credentials in url when invoking job by > url from browser > Sent by: [hidden email] > > how to pass login credentials in url when invoking job by url from > browser > > This message is intended exclusively for the designated addressee. It may > contain confidential material. If you are not the correct addressee, > please notify the sender immediately and destroy the message. The content > of this message will engage the responsibility of Steria only if it has > been sent by an authorized person acting in the strict scope of his > functions and for purposes that are related to his competence. Although > reasonable efforts have been made to keep this transmission free from > viruses, the sender will not be liable for damages caused by a transmitted > virus. |
|
In reply to this post by uday kumar
Hi,
I have enabled the security in Jenkins and so that i am able to invoke the job/project by URL from browser as below http://hostname:8080/job/project/build?token=myjob its working fine and i am able to run the job from browser.But now i want to it in secure manner ,so i have enabled matrix based security and added admin and some users (with limited permissions).The question is how can invoke job now by URL from browser.I have tried as below, http://hostname:8080/job/project/build?token=myjob&j_username=xxxxxxx&j_password=xxxxxx and http://username:password@hostname:8080/job/project/build?token=myjob but its not working.i know we can also do it by "wget ......", but i want to do it directly from browser.So please tell the way.... thanks, uday |
|
This post has NOT been accepted by the mailing list yet.
Hi Arjan Verstoep,
I tried the wget as how you explained but I am getting service unavailable. Also I didnt observed any thing in jenkins.log file. I am able to access this "http://localhost:8080/job/OnsiteBuild/build?token=IntegrationOnsiteBuild" URL from browser. samba@dt-corp-sfd-samba:~$ wget --proxy-user=myuser --proxy-password=mypassword --auth-no-challenge --http-user=jenkinsuser --http-password=jenkinspasswrd http://localhost:8080/job/OnsiteBuild/build?token=IntegrationOnsiteBuild --2012-05-01 13:35:44-- http://localhost:8080/job/OnsiteBuild/build?token=IntegrationOnsiteBuild Connecting to 172.20.53.8:3128... connected. Proxy request sent, awaiting response... 503 Service Unavailable 2012-05-01 13:35:44 ERROR 503: Service Unavailable. FYI, I am running jenkins with war file as "jre1.6/bin/java -jar jenkins.war" Thanks Samba Damerla |
| Powered by Nabble | Edit this page |
