Tuesday, February 3, 2009

Fixing GPG errors (NO_PUBKEY...) in apt-get

W: GPG error…NO_PUBKEY 60D11217247D1CFF - WTF!




3
02
2009



I fired up the update manager today and received the wonderful error message of…


W: GPG error: http://ppa.launchpad.net
intrepid Release: The following signatures couldn’t be verified because
the public key is not available: NO_PUBKEY 60D11217247D1CFF


It sounds like this sort of message will come up from time to time.
It is caused by the way signing of packages was changed recently. Here
is a post about it on the launchpad site.


To solve the issue you need to import the signature to your local keyring. This is done with the following command.


gpg --keyserver keyserver.ubuntu.com --recv 60D11217247D1CFF

gpg –export –armor 60D11217247D1CFF | sudo apt-key add -


You can do it through the user interface but the above command list is the easiest and quickest way.


Second source:

The error message you see is caused by invalid PGP key (because the
content on the PPA server has changed, probably an update has been
uploaded). All you have to do is retrieve the key then add it to your
apt trusted keyring. You can do this by entering these commands:

Code: Select all
gpg --keyserver keyserver.ubuntu.com --recv-key [KEY_ID]

Since
the error message tells you that the missing KEY_ID is
60D11217247D1CFF, the exact command you have to enter is as follows:
Code: Select all
gpg --keyserver keyserver.ubuntu.com --recv-key 60D11217247D1CFF

That
will tell gpg to retrieve the key from keyserver.ubuntu.com. Now you
can export the key and save it to a file, in case you need to add it on
another installation:
Code: Select all
gpg --export --armor 60D11217247D1CFF > ooo.pgp

Your
newly retrieved PGP is now saved to a file called ooo.pgp in your home
directory. Then add the key to your trusted keyring using this command:
Code: Select all
sudo apt-key add ooo.pgp

Last thing you will have to do is refresh apt's package information:
Code: Select all
sudo apt-get update

Done.



Third source:


Issue

Getting the following message when trying to update:

W: GPG error: http://ppa.launchpad.net
hardy Release: The following signatures couldn't be verified because
the public key is not available: NO_PUBKEY 60D11217247D1CFF


Fix
In terminal, run the following commands:

gpg --keyserver keyserver.ubuntu.com --recv 60D11217247D1CFF
gpg --export --armor 60D11217247D1CFF | sudo apt-key add -
sudo apt-get update




Fourth source:

To fix this,  copy the number (010908312D230C5F in the example) and type:


  • gpg –keyserver subkeys.pgp.net –recv [NUMBER]
  • gpg –export –armor [NUMBER] | apt-key add -

Then, let try “apt-get update” again.


11 comments:

  1. ah! this helped alot. all the best from London. Michael

    ReplyDelete
  2. AMAZING!!! Thank you soooo much!!!

    ReplyDelete
  3. Excellent. Thank you for an excellent post.

    M

    ReplyDelete
  4. merci (tank you )
    philippe (france)

    ReplyDelete
  5. I have the same problem, but when I run command gpg --keyserver keyserver.ubuntu.com --recv 60D11217247D1CFF
    I got answer:
    gpg: requesting key 247D1CFF from hkp server keyserver.ubuntu.com
    gpgkeys: key 60D11217247D1CFF not found on keyserver
    gpg: no valid OpenPGP data found.
    gpg: Total number processed: 0

    Does anybody have any solution. Thanx

    ReplyDelete
  6. Meanwhile I found the problem. I'm behind proxy so when I tried to get key in web browser (http://keyserver.ubuntu.com:11371/pks/lookup?search=0xD2BB86E0EBD0F0A43D4DB3A760D11217247D1CFF&op=index) I was getting

    The system returned:
    (111) Connection refused

    Afterall I was able to get key with help of anonymous browsing. After I got key I folowed the instructions on http://blog.launchpad.net/ppa/adding-a-ppas-key-to-ubuntu

    If anybody needs the key:
    -----BEGIN PGP PUBLIC KEY BLOCK-----
    Version: SKS 1.0.10

    mI0ESXanRwEEAOTPu1sTcJChTjkA9LkIh6WqiBgPzxNY2p8w18Qt/cE3ev4VyjiIadZtr+fh
    C+kuRRQuRinLV+MzeD7Od3uqyR1plc90lqUeLeKJMgXfCoGMmKwng0qD2gpevIvEEpdlmsRo
    1hutsyRxAL3o/NfFpovg6dWC27Y1Vwwma8UIL5wXABEBAAG0K0xhdW5jaHBhZCBQUEEgZm9y
    IE9wZW5PZmZpY2Uub3JnIFNjcmliYmxlcnOItgQTAQIAIAUCSXanRwIbAwYLCQgHAwIEFQII
    AwQWAgMBAh4BAheAAAoJEGDREhckfRz/4QoEAOJ429PsO5oi1xsnX/lraHACYpHNvk4KVghu
    cY2p6J8M0WTTlfls96jRYGlDBDuyZcfW0W+VJlaiu28u2Y9zEnXTWHMlIk6PiOmLPxXofgDf
    lKRqvBFYdRD8+33TBeD6u6qajNOLYTL08dnqCfVqmJTGZxqXTmYIOF1NdIs0KlF/
    =1y5I
    -----END PGP PUBLIC KEY BLOCK-----

    ReplyDelete
  7. Thank you! I've been wanting an easy way to fix these GPG errors for years, and this finally cleared it up for me.

    A note on a typo near the top:
    gpg –export –armor 60D11217247D1CFF | sudo apt-key add -

    should read:
    gpg --export --armor 60D11217247D1CFF | sudo apt-key add -

    Thanks!

    ReplyDelete