how to pass login credentials in url when invoking job by url from browser

2,022 views
Skip to first unread message

uday kumar

unread,
Apr 30, 2012, 2:38:09 AM4/30/12
to Jenkins Users
how to pass login credentials in url when invoking job by url from
browser

arjan.v...@steria.ch

unread,
Apr 30, 2012, 2:41:59 AM4/30/12
to jenkins...@googlegroups.com
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
arjan.v...@steria.ch
www.steria.ch
Think before you print - Steria is committed to supporting a sustainable
world.
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.



uday kumar

unread,
Apr 30, 2012, 3:13:01 AM4/30/12
to Jenkins Users
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:apiT...@jenkins.yourcompany.com/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, arjan.verst...@steria.ch 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
> arjan.verst...@steria.chwww.steria.ch
> Think before you print - Steria is committed to supporting a sustainable
> world.
>

Udaya Satya Kumar Yatham

unread,
May 1, 2012, 1:29:35 AM5/1/12
to Jenkins Users
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
Reply all
Reply to author
Forward
0 new messages