Hello ,

I can not connect to jenkins using these commands even if the option Enable 
CLI over Remoting is activated in Configure Global Security:


1-java -jar jenkins-cli.jar -s jenkinsUrl help

2-java -jar jenkins-cli.jar -http -auth myusername:mypassword -s JenkinsUrl 
get-job jobName > jobName.xml

3-java -jar jenkins-cli.jar -http -auth myusername:myApiToken-s JenkinsUrl 
get-job jobName > jobName.xml

4-java -jar jenkins-cli.jar -s JenkinsUrl -auth myusername:myApiToken get-job 
jobName > jobName.xml

5-java -jar jenkins-cli.jar -s JenkinsUrl -auth myusername:mypassword get-job 
jobName > jobName.xml


I had this error :

java.io.IOException: Server returned HTTP response code: 401 for URL: 
myJenkinsUrl/cli?remoting=false

        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)

        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

        at 
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown 
Source)

        at 
hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:101)

        at hudson.cli.CLI.plainHttpConnection(CLI.java:652)

        at hudson.cli.CLI._main(CLI.java:612)

        at hudson.cli.CLI.main(CLI.java:426)


Any help will be appreciated.


Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" 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-users/28773b6a-e37d-4a64-89db-c20c23634656%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to