apt-get – GPG error: NO_PUBKEY


W: GPG error: http://debmirror sarge Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY EA8E8B2116BA136C W: You may want to run apt-get update to correct these problems


gpg --recv-keys KEY-ID
gpg --armor --export  KEY-ID | apt-key add -

or you could just tell APT to allow unauthenticated sources…

echo "APT::Get::AllowUnauthenticated 1" >> /etc/apt/apt.conf

If you are having trouble recieving the keys, make sure your /root/.gnupg/gpg.conf contains:

keyserver hkp://subkeys.pgp.net
keyserver-options auto-key-retrieve honor-http-proxy broken-http-proxy

If you are using a proxy server, you should add export http_proxy=”http://myproxy:port” to your .bashrc/.cshrc or equivelent file.

1 thought on “apt-get – GPG error: NO_PUBKEY

Comments are closed.