Apt-get : NO_PUBKEY / GPG error

If you get an error like this:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY STRING      

W: There is no public key available for the following key IDs:    
STRING

Where the STRING is you ID

The solution:

gpg --keyserver pgpkeys.mit.edu --recv-key  STRING
gpg -a --export STRING | apt-key add -

Note: you can use keyserver.ubuntu.com instead pgpkeys.mit.edu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.