danielbeck Maybe this could be reopen. Or maybe this is related to https://issues.jenkins-ci.org/browse/JENKINS-44361 ? The issue with the HTTP / HTTPS redirect is corrupting the file when downloading using the CLI.
If I use wget https://updates.jenkins.io/download/plugins/groovy/2.2/groovy.hpi and then do a sha1sum groovy.jpi I can see the right sha 85af4e8de47e981d3bf22adaf0c7f5747b991d83.
If I use the Jenkins CLI to install from https://updates.jenkins.io, it succeeds:
java -jar jenkins-cli.jar -logger FINE -s http:Jul 19, 2019 2:34:09 PM org.apache.sshd.common.util.security.SecurityUtils register
FINE: register(BC) not registered - enabled=true, supported=false
Jul 19, 2019 2:34:09 PM org.apache.sshd.common.util.security.AbstractSecurityProviderRegistrar getOrCreateProvider
INFO: getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider
Jul 19, 2019 2:34:09 PM hudson.cli.CLI _main
FINE: using connection mode HTTP
Jul 19, 2019 2:34:09 PM hudson.cli.CLI plainHttpConnection
FINE: Trying to connect to http:Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: establishing download side
Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: established download side
Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: establishing upload side
Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: established upload side
Installing a plugin from https:
but the sha of the $JENKINS_HOME/plugins/groovy.hpi is wrong 7c5e3f4ae6540474cf24bd4cb3ece2d31e701965. The file contains the HTTP response:
<!DOCTYPE HTML PUBLIC "->
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http:>here</a>.</p>
</body></html>
This will break Jenkins startup on the next restart.
If I use the Jenkins CLI to install from http://updates.jenkins.io, it succeeds:
java -jar jenkins-cli.jar -logger FINE -s http:Jul 19, 2019 2:34:09 PM org.apache.sshd.common.util.security.SecurityUtils register
FINE: register(BC) not registered - enabled=true, supported=false
Jul 19, 2019 2:34:09 PM org.apache.sshd.common.util.security.AbstractSecurityProviderRegistrar getOrCreateProvider
INFO: getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider
Jul 19, 2019 2:34:09 PM hudson.cli.CLI _main
FINE: using connection mode HTTP
Jul 19, 2019 2:34:09 PM hudson.cli.CLI plainHttpConnection
FINE: Trying to connect to http:Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: establishing download side
Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: established download side
Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: establishing upload side
Jul 19, 2019 2:34:09 PM hudson.cli.FullDuplexHttpStream <init>
FINE: established upload side
Installing a plugin from https:
And the sha of the $JENKINS_HOME/plugins/groovy.hpi is correct 85af4e8de47e981d3bf22adaf0c7f5747b991d83*
Note that it works for the update site at jenkins-updates.cloudbees.com/ whether you use http or https
But that's a different problem. It's a communication problem between the CLI client and the Jenkins server. You should open another issue for that problem.