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 got this error in an Ubuntu Docker container. I believe the cause was that the container was missing CA certs. To fix it, I had to run:
apt-get update
apt-get install ca-certificates
By executing the following command, it will save a jenkins-ci.org.key file in the current working directory:
curl -O http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key
Then use the following command to add the key file:
apt-key add jenkins-ci.org.key
If the system returns OK, then the key file has been successfully added.
In my case, the problem turned out to be that the keyfile was behind a 301 Moved Permanently redirect, which the curl command failed to follow. I fixed it by using wget
instead:
wget URL
sudo apt-key add FILENAME
...where FILENAME is the file name that wget
outputs after it downloads the file.
Update: Alternatively, you can use curl -L
to make curl follow redirects.
I also got the same error. I've referred to the below mentioned link and ran this commands
gpg --import fails with no valid OpenPGP data found
gpg --import KEYS
sudo apt-get update
It worked.
I'm using Ubuntu version 12.04
This problem might occur if you are behind corporate proxy and corporation uses its own certificate. Just add "--no-check-certificate" in the command.
e.g.
wget --no-check-certificate -qO - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
It works.
If you want to see what is going on, you can use verbose command instead of quiet before adding "--no-check-certificate" option.
e.g.
wget -vO - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
This will tell you to use "--no-check-certificate" if you are behind proxy.
i got this problem "gpg-no-valid-openpgp-data-found" and solve it with the following first i open browser and paste https://pkg.jenkins.io/debian/jenkins-ci.org.key then i download the key in Downloads folder then cd /Downloads/ then sudo apt-key add jenkins-ci.org.key if Appear "OK" then you success to add the key :)