Add user credential in .netrc file at Jenkins $HOME And on enabling matrix bases strategy , add user for giving permission to build .
Then curl -x post Jenkins-build-url-with-token-value should work from user's computer script . Regards Hiteswar > On Mar 21, 2015, at 1:17 AM, Vinoth raj <[email protected]> wrote: > > ALSO.... > > I enabled the Logged-in users can do anything. > This means that anonymous users do not have rights to build. > > Strangely, the following triggers a build: > curl -X POST http://jenkins/job/projectname/build?token=tokenvalue > > which I think it should not. Not sure what is happening. > > If I enable Matrix-based or Project based Matrix strategy, I get > authentication required as mentioned before. Please HELP! > > >> On Fri, Mar 20, 2015 at 8:32 PM, Suckow, Thomas J <[email protected]> >> wrote: >> You probably need -X POST >> https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API >> >> From: Vinoth raj <[email protected]> >> Reply-To: "[email protected]" <[email protected]> >> Date: Thursday, March 19, 2015 at 10:38 PM >> To: "[email protected]" <[email protected]> >> Subject: Unable to get Remote build trigger working >> >> I know this post applies to user group but I haven't have found any response >> there. >> I believe the developers will be prudent to spot my issue and propose a >> solution instantly. >> >> I need to use curl to remotely trigger build for a project. >> >> Jenkins ver. 1.580.3 >> Following setting is done: >> In Configure Global Security section: >> - Jenkins' own user database set is enabled >> - Project based matrix authorization strategy is enabled >> There is one user who has all rights enabled here. >> >> Project settings: >> Trigger builds remotely is enabled (gave token a value '123abc') >> Also, API token for the user is retrieved from user configure page. >> >> Tried different versions of post from curl. >> >> curl -user <username:apiToken> >> http://[jenkins:port]/job/projectname/build?token=123abc >> >> I always get: >> Authentication required >> You are authenticated as: anonymous >> Groups that you are in: >> Permission you need to have (but didn't): hudson.model.Hudson.Read >> >> >> Not sure what is causing this authentication fail. Please help! >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" 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-dev/1f71a2fc-8ba9-4792-a6ab-56e79de2deef%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Developers" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-dev/O74r3I2Mm1Y/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/D1318489.1107F%25thomas.suckow%40pnnl.gov. >> >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" 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-dev/CAOMxDiSwbxaCKBY38Ew6o6fRYik%2BzMRq89t6D1jbS_AOmuBm0g%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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-dev/F0FBFBBC-082B-4C6B-BAF9-13537D2D7C95%40gmail.com. For more options, visit https://groups.google.com/d/optout.
