How do I fix the GPG error "NO_PUBKEY"?
The Question: 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?
Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):
== This solution helped 34 people ==
You need to get and import the key.
To get the key from a PPA, visit the PPA's Launchpad page. On every PPA page at
Launchpad you will find this link (2), after clicking on 'Technical details
about this PPA' (1):
[image_1]
Follow it and click on the key ID link (3):
[image_2]
Save the page, this is your key file.
----
Now it's time to import it:
Applications > Software Center,
Edit > Software sources...,
Enter your password,
Go to the Authentication tab and click on Import Key File..., finally
Select the saved key file and click on OK.
== This solution helped 3 people ==
More generally, the following method should work for every repository. First of
all search, with eventual help of a search engine, for a text on the program
provider's website looking like the following:
----BEGIN PGP PUBLIC KEY BLOCK----
Version: GnuPG v1.4.1 (GNU/Linux)
[...]
----END PGP PUBLIC KEY BLOCK----
Such a text is for example displayed on http://deb.opera.com. Copy the passage,
paste it in an empty file that you create on your desktop. This results in the
key file.
Then continue with the importation of the key:
Applications > Sofware Center
Edit > Sofware sources..., enter password
Authentication tab, click on 'Import Key File...'
Select the saved key file and click on 'Ok'.
You may now remove the previously created key file.
== This solution helped 491 people ==
Execute the following commands in terminal
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>
where <PUBKEY> is your missing public key for repository, e.g. 8BAF9A6F.
Then update
sudo apt-get update
ALTERNATE METHOD:
sudo gpg --keyserver pgpkeys.mit.edu --recv-key <PUBKEY>
sudo gpg -a --export <PUBKEY> | sudo apt-key add -
sudo apt-get update
Note that when you import a key like this using apt-key you are telling the
system that you trust the key you're importing to sign software your system
will be using. Do not do this unless you're sure the key is really the key of
the package distributor.
== This solution helped 41 people ==
It happens when you don't have a suitable public key for a repository.
To solve this problem use this command:
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 9BDB3D89CE49EC21
which retrieves the key from ubuntu key server. And then this:
gpg --export --armor 9BDB3D89CE49EC21 | sudo apt-key add -
which adds the key to apt trusted keys.
The solution can be found https://help.ubuntu.com/community/Rep...
Ubuntu#Authentication%20Tab & here & here.
With thanks & praise to God! With thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free... | Images: https://stocksnap.io/license & others | With thanks to user xiota (https://askubuntu.com/users/567307), user Wilf (https://askubuntu.com/users/178596), user Pedram (https://askubuntu.com/users/10494), user NeurOSick (https://askubuntu.com/users/163957), user monotasker (https://askubuntu.com/users/29588), user mchid (https://askubuntu.com/users/167115), user karthick87 (https://askubuntu.com/users/5691), user htorque (https://askubuntu.com/users/3037), user guntbert (https://askubuntu.com/users/134729), user Eduardo Cuomo (https://askubuntu.com/users/24155), user dennyac (https://askubuntu.com/users/127321), user Curt J. Sampson (https://askubuntu.com/users/354600), user Alin Andrei (https://askubuntu.com/users/662), user Agmenor (https://askubuntu.com/users/5592), and the Stack Exchange Network (http://stackoverflow.com/questions/13.... Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.