There doesn't need to be a root user in Jenkins - just make sure the
username and token you pass through in the script are valid to perform the
functions you require on the Jenkins server.

I think the examples given in the URL should be enough to show what
parameters need to be passed in the HTTP request with your
language/HTTP-client of choice?

Richard

On 10:34AM, Fri, 3/04/2015 Murthy Gandikota <[email protected]> wrote:

>
>
> On Thursday, April 2, 2015 at 11:07:17 AM UTC-7, Eric Pyle wrote:
>>
>>  See Authenticating Scripted Clients
>> <https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients>
>> page on the wiki.
>>
>> On 4/2/2015 12:22 PM, Murthy Gandikota wrote:
>>
>>  Hi All
>>
>>  I am trying to run a shell script in a project as root. Without
>> security enabled it runs fine.
>> With security using Jenkins database -- no fancy LDAP or
>> anything--- enabled, the script fails thus:
>>
>>  $ /bin/sh -xe /tmp/hudson8715135757129650687.sh
>> + echo root
>> root
>> + chmod a+x ./myscript.sh
>> + ./myscript.sh
>>
>>
> Hi Eric
> The script is run as root. There is no root user in Jenkins. Should I
> create one?
> Otherwise, could you tell me whose API token needs to be used?
> Also, the URL you gave covers wget besides perl, java, etc. but not shell
> scripting (bash).
> We have a master-slave set up.
>
> Thank you
>
>
>> --2015-04-01 23:35:54--
>> *http://ci.westechdev.org:8080/job//backup-jenkins-jobs/config.xml*
>> <http://ci.westechdev.org:8080/job//backup-jenkins-jobs/config.xml>
>> Resolving ci.mycom.org... 192.168.100.1
>> Connecting to ci.westechdev.org|192.168.100.1|:8080... connected.
>> HTTP request sent, awaiting response... 403 Forbidden
>> 2015-04-01 23:35:54 ERROR 403: Forbidden.
>>
>>  Can anyone help?
>>
>>  Thanks
>> murthy
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>>
>>
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/jenkinsci-users/77fc4aec-b6ab-4828-9a83-
>> 01def2d05263%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/77fc4aec-b6ab-4828-9a83-01def2d05263%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/6494dd27-adcc-41f0-88df-6c4f8d0f5297%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/6494dd27-adcc-41f0-88df-6c4f8d0f5297%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMui947xViVdd4JkZsAmH52m7tg6oucGxB8%3DQ_N1qgBN57ZZ4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to