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

GPG error [...] NO_PUBKEY [...]

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 mean not to open a terminal?

link|improve this question

78% accept rate
feedback

5 Answers

up vote 8 down vote accepted

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 > Sofware Center,
  • Edit > Sofware 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'.

That's it.

link|improve this answer
Don't lost your time, see the answer bellow. – SpamKids Oct 17 '11 at 9:06
feedback

Execute the following commands in terminal

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8BAF9A6F

and then update

sudo apt-get update
link|improve this answer
It works like a charm for me! :) thanks! – SpamKids Oct 17 '11 at 9:06
man how to reverse this command it make a lot of Ign and didn't work see this : img688.imageshack.us/img688/6885/igny.png – Naruto Feb 19 at 13:29
feedback

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:

sudo launchpad-getkeys

If you're behind a proxy, things are a bit more complicated so see this for more info

link|improve this answer
It is indeed the way I do now, since I saw this program presented on your website. Nevertheless, the aim of the question was to know how to do it in a graphical way. – Agmenor Jun 5 '11 at 22:34
feedback

It happens because 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. This will solve you problem.

The solution can be found here & here.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.