# Ubuntu – How to fix the GPG error “NO_PUBKEY”

aptgnupg

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:

W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F

I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?

By far the simplest way to handle this now is with Y-PPA-Manager (which now integrates the launchpad-getkeys script with a graphical interface).

1. To install it, first add the webupd8 repository for this program:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager

2. Update your software list and install Y-PPA-Manager:

sudo apt-get update
sudo apt-get install y-ppa-manager

3. Run y-ppa-manager (i.e. type y-ppa-manager then press enter key).

4. When the main y-ppa-manager window appears, click on "Advanced."

5. From the list of advanced tasks, select "Try to import all missing GPG keys" and click OK.

You're done! As the warning dialog says when you start the operation, it may take quite a while (about 2 minutes for me) depending on how many PPA's you have and the speed of your connection.