Hi Guys!
I am having some issue with credentials when using jenkins.
I have created a token for the job, and then a token a token for the user i am building the JOB with, and using the following sytanx for the job to be executed from a script:
http://<ROBOT-USER>:<TOKEN1>@<JENKINS_PATH>/jenkins/job/<JOBNAME>/buildWithParameters?token=<TOKEN2>&gitrepo="+gitrepoPath+"&testcase="+tctorun
This approach working as long as I am logged in jenkins whichever user, so not necessarily with the robot user, but for example admin user, the script execution works.
If i am not logged in jenkins, the script return “Forbidden” error, which i assume have something to do with the credentials, but as I have provided the tokens, I can’t really figure out what caueses the issue.
It would be nice if someone could give me a hand in solving this issue, becasue it would have been a huge security issue to open jenkins for everyone, using the “Everyone can do anything” option.
Do you have any ideas what I am missing here?
Thank you in advance,
Richard Z.