I am trying to install Jenkins on Ubuntu 13.10 and I am getting the above mentioned error when i try to run the following command:
wget -q -O - http://pkg.je
I had a similar issue.
The command I used was as follows:
wget -qO https://download.jitsi.org/jitsi-key.gpg.key | apt-key add -
I forgot a hyphen between the flags and the URL, which is why wget threw an error.
This is the command that finally worked for me:
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add -
Managed to resolve it. separated the command in to two commands and used directly the file name which was downloaded example -
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
can be separated into
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key
sudo apt-key add jenkins-ci.org.key
I too got the same error, when I did this behind a proxy. But after I exported the following from a terminal and re-tried the same command, the problem got resolved:
export http_proxy="http://username:password@proxy_ip_addr:port/"
export https_proxy="https://username:password@proxy_ip_addr:port/"
you forgot sudo ... try with sudo and you will get OK
sudo wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
export https_proxy=http://user:pswd@host:port
^^^^
Use http
for https_proxy instead of https
gpg: no valid OpenPGP data found.
In this scenario, the message is a cryptic way of telling you that the download failed. Piping these two steps together is nice when it works, but it kind of breaks the error reporting -- especially when you use wget -q
(or curl -s
), because these suppress error messages from the download step.
There could be any number of reasons for the download failure. My case, which wasn't exactly listed so far, was that the proxy settings were lost when I called the enclosing script with sudo
.