相关文章推荐
时尚的胡萝卜  ·  org.springframework.we ...·  1 年前    · 
帅气的单杠  ·  oracle中connect by ...·  1 年前    · 
留胡子的打火机  ·  javascript - ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm stuck with this problem and I have no idea to solve it.

I have written a Shell script which will invoke my job using Jenkins CLI by passing my private key.Jenkins version is 2.121.1

java -jar jenkins-cli.jar -s http://localhost:8080 -i ~/.ssh/id_rsa build RTT/RTT-CI-Tools/RTT-CI-Tools-Distribute -s -p SLAVE_REGEX=testserver

Getting Error message as :

ERROR: anonymous is missing the Overall/Read permission

The same script works in another Jenkins (2.7.4). How to fix this issue.

you must give access if you want to run something especially in linux ....you can try this stackoverflow.com/questions/22717773/… – rohit thomas Jun 27, 2018 at 10:57

1) USER exist on jenkins server as same on linux machine.

2) SSH Public key shared on Jenkins server is correct.(manage jenkins --> manage user --> click on ${USER} --> click on configure --> then check ssh public key is correct).

3) CMD i used(working) --> java -jar jenkins-cli.jar -ssh -user ${USER} -i ~/.ssh/id_rsa -s http://localhost:8080/jenkins/ build ${JOB_NAME}

please check if you are executing cmd from same user.

4) SSH port should be enable on Jenkins (go to manage Jenkins--> configure Global security --> SSH Server... set SSHD Port Fixed eg 38844)

Thanks, it worked for me. I also had to open access to Jenkins port 38844 from bastion host, because my Jenkins was in a private subnet. – hit3k Jan 22, 2020 at 2:13

This issue cropped up for me, too, recently (using the cli to automate installing jenkins). I was able to work around it by setting the denyAnonymousReadAccess flag to false in jenkins' config.xml file, and restarting jenkins:

  <authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">  
    <denyAnonymousReadAccess>false</denyAnonymousReadAccess>  
  </authorizationStrategy>  
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.