curl - Jenkins Remote Trigger Not Working -


i getting following error when try triggering build using following command:

curl http://jenkins_server:port/jenkins/job/job_name/build?token=token_name

output:

authentication required

<-- authenticated as: anonymous
groups in:

permission need have (but didn't): hudson.model.hudson.read
... implied by: hudson.security.permission.genericread
... implied by: hudson.model.hudson.administer
->

i have admin rights , have enabled 'authentication token'. have build, discover , read rights on job. using jenkins 1.614.

i did check several posts online not find works me.

tried few options such as
1) curl -x post http://jenkins_server:port/jenkins/job/job_name/build?token=token_name
2) curl -u user:api (prints long html page)

any suggestions.

i install build token root plugin solve issue before

https://wiki.jenkins-ci.org/display/jenkins/build+token+root+plugin

then same, setup authentication token

finally, either use curl trigger remote build (be careful escape character "\")

curl http://jenkins_url/buildbytoken/build?job=job_name\&token=token_name

or paste url browser (no needs escape character "\")

http://jenkins_url/buildbytoken/build?job=job_name&token=token_name

if see succeed, means trigger remote jenkins successfully.

note that, don't have setup build, discover, , read rights on job

for more information, reference https://cloudbees.zendesk.com/hc/en-us/articles/204338790-why-are-builds-not-being-triggered-with-build-token-root-plugin-


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -