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

CLI command install-plugin does not take Proxy configuration into account

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: cli, core
    • Labels:
      None
    • Similar Issues:

      Description

      When trying to install a plugin with the Jenkins CLI and providing a URL as argument, the proxy configuration of the Jenkins master does not seem to be taken into account.

      For example if I use the following command:

      java -jar jenkins-cli.jar -logger FINE -s https://my.jenkinsexample.com -noCertificateCheck -auth myUser:myPassword install-plugin https://jenkins-updates.cloudbees.com/download/plugins/cloudbees-aws-cli/1.5.9/cloudbees-aws-cli.hpi
      

      But requires to be behind an HTTP proxy to be able to download that plugin, it fails with:

      ERROR: Unexpected exception occurred while performing install-plugin command. 
      java.net.ConnectException: Connection timed out 
      

      Even if I have a proxy configured under *Manage Jenkins > Manage Plugins > Advanced*.

      Evidence

      Workaround

      Only workaround seem to be to set the proxy via system properties on the master:

      -Dhttps.proxyHost=myproxy.server.com
      -Dhttps.proxyPort=8080
      -Dhttps.proxyUser=myUser
      -Dhttp.proxyPassword=myPassword
      

        Attachments

          Issue Links

            Activity

            Hide
            heazzouz Houssem Eddine Azzouz added a comment -

            Hello, is there any progress regarding this bug? 

            Show
            heazzouz Houssem Eddine Azzouz added a comment - Hello, is there any progress regarding this bug? 
            Hide
            christian Christian Kipping added a comment - - edited

            Hello,

            I also have this problem with the Jenkins Docker image 
            https://hub.docker.com/r/jenkins/jenkins 
            and the jenkins-plugin-cli. There it is not possiblity to add the parameter 
            -Dhttps.proxyHost=myproxy.server.com -Dhttps.proxyPort=8080
            and so on to the command line call of jenkins-plugin-cli but you can use the JAVA_TOOL_OPTIONS environment variable like
            JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=myproxy.server.com -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=localhost|127.*|[::1]"

            [The readme of the Jenkins image (without that information) can be found at
            https://github.com/jenkinsci/docker/blob/master/README.md|https://hub.docker.com/r/jenkins/jenkins]

            Show
            christian Christian Kipping added a comment - - edited Hello, I also have this problem with the Jenkins Docker image  https://hub.docker.com/r/jenkins/jenkins   and the jenkins-plugin-cli. There it is not possiblity to add the parameter  -Dhttps.proxyHost=myproxy.server.com -Dhttps.proxyPort=8080 and so on to the command line call of jenkins-plugin-cli but you can use the JAVA_TOOL_OPTIONS environment variable like JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=myproxy.server.com -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=localhost|127.*| [::1] " [The readme of the Jenkins image (without that information) can be found at https://github.com/jenkinsci/docker/blob/master/README.md |https://hub.docker.com/r/jenkins/jenkins]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              allan_burdajewicz Allan BURDAJEWICZ
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: