Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve the error : "Unable to access jarfile jenkins-cli.jar"

I'm trying to run commands on jenkins in a Ubuntu machine, but when I try do any thing through terminal, like a simple restart just for a test,is displayed that error:

Unable to access jarfile jenkins-cli.jar

So, my jenkins-cli.jar may be in the wrong place. Any help is welcome.

Thanks.

like image 792
DTondin Avatar asked Jul 10 '13 19:07

DTondin


1 Answers

Remember yo have to download the jenkins-cli.jar file (I think even if you are working where jenkins is hosted). Go to http://jenkins_url/cli (in my case is http://host_machine:8080/jenkins/cli). There you have the link to download the file. Save it where you want.

Then try tu run an instruction. For example, for building a project run

java -jar /path_to_cli-file/jenkins-cli.jar -s http://jenkins_url build job_name

Remember that the user you are working with should have the right permissions to execute the action.

I've just tested that, so I hope it works.

If you still have problems don't hesistate to ask.

like image 133
Nicolás Arias Avatar answered Sep 19 '22 17:09

Nicolás Arias