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?
Execute the following commands in terminal
where
<PUBKEY>
is your missing public key for repository, e.g.8BAF9A6F
.Then update
ALTERNATE METHOD:
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.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).To install it, first add the webupd8 repository for this program:
Update your software list and install Y-PPA-Manager:
Run y-ppa-manager (i.e. type
y-ppa-manager
then press enter key).When the main y-ppa-manager window appears, click on "Advanced."
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.
It happens when you don't have a suitable public key for a repository.
To solve this problem use this command:
which retrieves the key from ubuntu key server. And then this:
which adds the key to apt trusted keys.
The solution can be found here & here & here.
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):
Follow it and click on the key ID link (3):
Save the page, this is your key file.
Now it's time to import it:
Applications > Software Center
,Edit > Software sources...
,Authentication
tab and click onImport Key File...
, finallyOK
.apt can only handle 40 keys in /etc/apt/trusted.gpg.d . 41 keys and you will get the GPG error "no public key found" even if you go through all the steps to add the missing key(s).
Check to see if there are any unused keys in this file from ppa(s) you no longer use. If all are in use, consider removing some ppa(s) along with the corresponding keyfiles in /etc/apt/trusted.gpg.d
Furthermore, using
Is considered a security risk and is not recommended as you are "undermining the whole security concept as this is not a secure way of recieving keys for various reasons (like: hkp is a plaintext protocol, short and even long keyids can be forged, …)". http://ubuntuforums.org/showthread.php?t=2195579
I believe the correct way to add missing keys (for example 1ABC2D34EF56GH78) is
There is a tiny script packaged in the WebUpd8 PPA which I'll link as a single .deb download so you don't have to add the whole PPA - which automatically imports all missing GPG keys.
Download and install Launchpad-getkeys (ignore the ~natty in its version, it works with all Ubuntu versions from Karmic all the way to Oneiric). Once installed, open a terminal and type:
If you're behind a proxy, things are a bit more complicated so see this for more info
I faced the same issue while installing Heroku. The link below solved my problem -
http://naveenubuntu.blogspot.in/2011/08/fixing-gpg-keys-in-ubuntu.html
After fixing the
NO_PUBKEY
issue, the below issue remainedTo fix it I executed the following commands in terminal:
Source - Link to solve it
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:
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:
You may now remove the previously created key file.
Make sure you have
apt-transport-https
installed:Add repository:
Install Skype for Linux:
Source: https://community.skype.com/t5/Linux/Skype-for-Linux-Beta-signatures-couldn-t-be-verified-because-the/td-p/4645756
Good! I finaly found the way!
I've tested all method's to fix GPG error NO_PUBKEY and nothing working for me.
I've deleted the entire contents of the folder /etc/apt/trusted.gpg.d
And I use the Y-PPA-Manager method because I'm too lazy to create all pubkey's manually (too many): http://www.unixmen.com/fix-w-gpg-error-no_pubkey-ubuntu/
run sudo apt-get update again and finaly all work great now! Tanks!
Based Source : post #17 on https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1263540