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 - | sudo apt-key add - 217 Answers
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 - | 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 - | sudo apt-key add - This will tell you to use "--no-check-certificate" if you are behind proxy.
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 3Managed to resolve it. separated the command in to two commands and used directly the file name which was downloaded example -
wget -q -O - | sudo apt-key add - can be separated into
wget -q -O -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="" export https_proxy="" 1gpg: 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.
i got this problem "gpg-no-valid-openpgp-data-found" and solve it with the following first i open browser and paste 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 :)
0I had a similar issue.
The command I used was as follows:
wget -qO | 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 - | apt-key add - 1In 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.
By executing the following command, it will save a jenkins-ci.org.key file in the current working directory:
curl -O 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.
export https_proxy= ^^^^ Use http for https_proxy instead of https
you forgot sudo ... try with sudo and you will get OK
sudo wget -q -O - | sudo apt-key add - 2install gpg and
1-Import the repository’s GPG key:
wget -qO - | sudo apt-key add - 2-this is code repository elasticserach in linux for download
echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list 3-link download elasticsearch
if error "Job for elasticsearch.service failed because a timeout was exceeded. See "systemctl status elasticsearch.service" and "journalctl -xe" for details."
solution:
1-sudo journalctl -f
2-sudo systemctl enable elasticsearch.service
3-sudo systemctl start elasticsearch
I guess the issue is with wrong GPG key. Jenkins changed their GPG key recently (16 April 2020). You might need to import the correct key following the current official directions.
wget -q -O - | sudo apt-key add -
Try executing the commands separately.
wget --quiet -O - then
sudo apt-key add - wget may not be using up to date root certificates. In that case it will output nothing to stdout, causing apt-key to throw the error of the description. I could resolve this by upgrading my debian 9.5 image to the latest 9.13
apt-get update apt-get upgrade -y before running wget
There's another, very basic reason that triggers the error message that is the title of this post:
This error message happens if you try to decrypt an unencrypted file.
The message is saying that gpg did try to read the file to decrypt, but it could not find the info it needed, the info the encrypt process writes there.
So the message can also mean "double-check you gave the correct file to decrypt, it looks like it is not an encrypted file".
Like this:
# Encrypt your file encrypt my_text_file > my_encrypted_file # ERROR! You try to decrypt the unencrypted file DON'T DO THIS decrypt my_text_file > decrypted_file gpg: no valid OpenPGP data found. gpg: decrypt_message failed: Unknown system error # You unencrypt the correct (encrypted) file and it works decrypt my_encrypted_file > decrypted_file 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
3