How to solve GPG warning about apt/aptitude repository update
When you add a repository in your /etc/apt/sources.list and run a apt-update you'll get the update of the newly added repository but also a warning about a GPG key like the following one :
Hit http://ppa.launchpad.net intrepid/main Sources
Hit http://fr.archive.ubuntu.com intrepid-proposed/universe Packages
Hit http://ppa.launchpad.net intrepid/main Packages
Fetched 309B in 0s (519B/s)
Reading package lists... Done
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 D702BF6B8C6C1EFD
W: You may want to run apt-get update to correct these problems
Running again apt-update won't solve the issue.
This warning can be safely ignored, but I don't like to leave warning when there is a solution to get rid of it... because when something is going wrong, it would complicate to sort out what is safe to be ignored and what tells about a real issue.
So, to get rid of this warning here is the two command you need to execute :
gpg --keyserver subkeys.pgp.net --recv D702BF6B8C6C1EFD
gpg --export --armor D702BF6B8C6C1EFD | sudo apt-key add -
sudo apt-get update
which will give this output :
thomas@daisybox:~$ gpg --keyserver subkeys.pgp.net --recv D702BF6B8C6C1EFD
gpg: directory `/home/thomas/.gnupg' created
gpg: new configuration file `/home/thomas/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/thomas/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/thomas/.gnupg/secring.gpg' created
gpg: keyring `/home/thomas/.gnupg/pubring.gpg' created
gpg: requesting key 8C6C1EFD from hkp server subkeys.pgp.net
gpg: /home/thomas/.gnupg/trustdb.gpg: trustdb created
gpg: key 8C6C1EFD: public key "Launchpad PPA for Bazaar Developers" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
thomas@daisybox:~$ gpg --export --armor D702BF6B8C6C1EFD | sudo apt-key add -
OK
thomas@daisybox:~$ sudo apt-get update
Hit http://fr.archive.ubuntu.com intrepid Release.gpg
....
Hit http://packages.medibuntu.org intrepid/free Sources
Hit http://packages.medibuntu.org intrepid/non-free Sources
Fetched 309B in 0s (478B/s)
Reading package lists... Done
thomas@daisybox:~$
No more warning ;)
Comments