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.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
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.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
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.
curl -fsSL --no-check-certificate https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
but it gave me command not found
and gpg: no valid OpenPGP data found.
error. –
Kershner --no-check-certificate
is a command-line option for wget
, not curl
. –
Horologe gpg --keyserver hkp://keyserver.ubuntu.com --refresh-keys
–
Munshi 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
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
| APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add -
–
Redeemer 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
.
https://dl.winehq.org/wine-builds/winehq.key
) it was because of a bad cert. Strangely enough, chrome accepts the https
connection, but wget
(on Ubuntu 18.04) complains. I assume Chrome and linux are using different certificate chains. The key to understand the problem was to remove the -q
flag from wget
as you suggest, and the problem became plain and clear. I had to add --no-check-certificate
for wget
to work. –
Outdated curl
also has --show-error
>When used with -s, --silent, it makes curl show an error message if it fails. –
Doykos 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/"
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 :)
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 -
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.
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 -
wget
the key, and on the apt-key add
command the questioner uses sudo
–
Ealasaid gpg: no valid OpenPGP data found
. –
Skiff Try executing the commands separately.
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc
then
sudo apt-key add -
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.
export https_proxy=http://user:pswd@host:port
^^^^
Use http
for https_proxy instead of https
install gpg and
1-Import the repository’s GPG key:
wget -qO - https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
2-this is code repository elasticserach in linux for download
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
3-link download elasticsearch
https://www.elastic.co/downloads/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 - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
Solution 1 - Update CA certificates
Update your system's certificate authorities (CA) certificates to ensure they are current and can verify SSL certificates correctly. In Ubuntu, you can do this with the following command:
sudo apt-get install --reinstall ca-certificates
Solution 2 - Use wget
instead of curl
If updating the CA certificates doesn't resolve the issue, try using wget instead of curl to download the Docker GPG key
sudo wget -O /usr/share/keyrings/docker-archive-keyring.gpg https://download.docker.com/linux/ubuntu/gpg
Solution 3 - Check your network and firewall settings
Make sure your internet connection is working correctly, and there are no firewall rules or other network restrictions preventing the secure connection to the "download.docker.com" server. You can try accessing the URL directly in your web browser to check if it's accessible.
Solution 4 - Verify DNS settings
Ensure that your DNS settings are configured correctly. If your DNS server is not resolving the hostname properly, it can lead to SSL certificate verification issues. You can check your DNS settings by running:
cat /etc/resolv.conf
Solution 5 - Disable SSL certificate verification (not recommended)
Please note that disabling SSL certificate verification is not recommended from a security standpoint. However, as a temporary workaround for testing purposes, you can use the --insecure option with curl to ignore SSL certificate verification:
sudo curl -fsSL --insecure https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
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 have solved the error gpg: no valid OpenPGP data found. For my Ubuntu 20.04 Firstly:
sudo apt-get update
then,
sudo apt-get install ca-certificates
Finally,
sudo apt install curl
For those facing gpg: no valid OpenPGP data found. during docker installation due to curl: (5) Could not resolve proxy: could clear their list of proxies and try again;
env | grep -i proxy //for listing all proxies
unset <name of the proxy> // remove all proxies that is shown in the error
Example :
unset http_proxy
unset HTTPS_PROXY
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
gpg --import KEYS
will bypass (work like) apt-key add KEYS
? –
Faltboat © 2022 - 2024 — McMap. All rights reserved.
-O
option but not-0
one – Nev