Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58057

Jenkins CLI - notable to execute

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: cli
    • Labels:
      None
    • Environment:
      Jenkins latest version
    • Similar Issues:

      Description

      D:\Program Files (x86)\Jenkins\tools>java -jar jenkins-cli.jar -s http://myservername:8080/ -auth myusername:mypassword help
      java.io.IOException: Server returned HTTP response code: 401 for URL: http://myservername:8080/cli?remoting=false
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
              at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:72)
              at hudson.cli.CLI.plainHttpConnection(CLI.java:279)
              at hudson.cli.CLI._main(CLI.java:271)
              at hudson.cli.CLI.main(CLI.java:83)

        Attachments

          Activity

          kshahzad Khurram Shahzad created issue -
          kshahzad Khurram Shahzad made changes -
          Field Original Value New Value
          Assignee Rohit Kumar [ 0511 ]
          Hide
          ydabo Lamine Drame added a comment -

          What's in your jenkins log file ?

          /var/lib/jenkins/jenkins.log

          Show
          ydabo Lamine Drame added a comment - What's in your jenkins log file ? /var/lib/jenkins/jenkins.log
          Hide
          bkguy Bk Guy added a comment -

          I was having the same issue. What works for me is I generated a token from here,  JENKINS_URL/me/configure, and use the token as the password.

          Show
          bkguy Bk Guy added a comment - I was having the same issue. What works for me is I generated a token from here,   JENKINS_URL/me/configure , and use the token as the password.
          Hide
          sanbrother David added a comment -

          I met this 'issue', because I have a special char '$' in my password. You should escape special char with a backslash like this '\$'

          Show
          sanbrother David added a comment - I met this 'issue', because I have a special char '$' in my password. You should escape special char with a backslash like this '\$'
          Hide
          jleonelion James added a comment - - edited

          I am encountering the same problem - no $ in my password, but I do have a ! - tried escaping that as with backslash but no difference. 

          I've never used the CLI agent against this server, does the "remoting=false" in response indicate something needs to be enabled on the Jenkins master to allow using the CLI agent? It just feels like a permission issue.

          PS.  Using version 2.236.4

           

          Show
          jleonelion James added a comment - - edited I am encountering the same problem - no $ in my password, but I do have a ! - tried escaping that as with backslash but no difference.  I've never used the CLI agent against this server, does the " remoting=false " in response indicate something needs to be enabled on the Jenkins master to allow using the CLI agent? It just feels like a permission issue. PS.  Using version 2.236.4  

            People

            Assignee:
            0511 Rohit Kumar
            Reporter:
            kshahzad Khurram Shahzad
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: