No Valid GPG found while installing kubernetes

10/5/2018

Error while adding kubernetes key

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
gpg: no valid OpenPGP data found.

I tried using wget verbose command

wget --no-check-certificate -vO - https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
--2018-10-05 09:55:13--  https://packages.cloud.google.com/apt/doc/apt-key.gpg
Resolving packages.cloud.google.com (packages.cloud.google.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host addresspackages.cloud.google.comgpg: no valid OpenPGP data found.

How can I get past that error in my Kubernetes installation step?

-- sushma
gnupg
kubernetes
openpgp
package
pgp

2 Answers

10/5/2018

Check first if you should be using a proxy to access external URLs (you would then have to declare that proxy in a .wgetrc)

But see also if using curl -4 -s... (forcing IPV4 instead of a possible default IPV6) would work better, as described in "Ubuntu 16.04: curl, wget, ssh could not resolve host from dnsmasq with IPv6".

-- VonC
Source: StackOverflow

10/5/2018

Thank you all.

Not sure what is the exact issue but below below solution helped me resolve this issue

cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

as this file was lacking nameservers. Adding nameservers resolved the issue

-- sushma
Source: StackOverflow