when running update on my Ubuntu 16.04 lab i have come across following error:
$ sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB] Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] Get:4 http://security.ubuntu.com/ubuntu xenial-security/main Sources [119 kB] Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [472 kB] Get:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB] Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [302 kB] Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [750 kB] Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [617 kB] Err:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A030B21BA07F4FB Fetched 2,566 kB in 1s (1,326 kB/s) Reading package lists... Done W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.cloud.google.com/apt kubernetes-xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A030B21BA07F4FB W: Failed to fetch http://apt.kubernetes.io/dists/kubernetes-xenial/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A030B21BA07F4FB W: Some index files failed to download. They have been ignored, or old ones used instead.
To resolve, i have run below commands:
sudo su -
Re added key that was “missing”
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
and apt-get update works fine now:
$ sudo apt-get update Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease Hit:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease Hit:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease Reading package lists... Done