How-To fix the GPG error: “The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY”

These are the few command-line instruction to fix the GPG Error (NO_PUBKEY) that may appear when trying to run the ‘apt-get update’ command on a APT based system:

“GPG error: http://some.site.com stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY SOMEGPGKEY

This issue may reveal itself when you want to source packages from a repository that is unknown by your copy of the GPG  database, therefore APT will consider the repository as an untrusted source.

If you are sure that the repository is safe, you can circumvent the error manually adding the site’s public key to your GPG database using the following commands:

don’t use sudo if you act as root
$ gpg --keyserver subkeys.pgp.net --recv SOMEGPGKEY
$ gpg --export --armor SOMEGPGKEY | sudo apt-key add -

Comments and feedbacks and ‘like’ are welcome as always!

Comments

comments

Powered by Facebook Comments

About marcomc

Marco M.C. is a System Administrator with 10 years of professional experience in ICT. He has deep knowledge of Mac OS X, Windows, and GNU/Linux. His hobbies vary from DIY, Traveling, learning foreign languages and especially he love to cook and experiment with food from all around the world.
This entry was posted in How-To, IT, Linux and tagged , , , , . Bookmark the permalink.