I am getting the following error when i try triggering a build using the following command:
curl http://jenkins_server:port/jenkins/job/job_name/build?token=token_name
Output:
Authentication required
<-- You are authenticated as: anonymous
Groups that you are in:Permission you need to have (but didn't): hudson.model.Hudson.Read
... which is implied by: hudson.security.Permission.GenericRead
... which is implied by: hudson.model.Hudson.Administer
->
I have admin rights and have also enabled 'Authentication Token'. I also have Build, Discover and Read rights on Job. I am using Jenkins 1.614.
I did check several posts online but could not find anything that works for 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 a long HTML page)
Any suggestions.