Automatically Import All Missing Launchpad PPA GPG Keys [Ubuntu .deb]

Automatically Import All Missing Launchpad PPA GPG Keys [Ubuntu .deb]: "
Almost a year ago, we posted a script created by an Ubuntuforums user (blackgr) which automatically imports Launchpad GPG keys in Ubuntu for all the PPAs you have added to your software sources.

We didn't talk about it much since then because meanwhile, the 'add-apt-repository' was introduced in Ubuntu - a command which adds a PPA via command line and also imports the GPG key. But if you add a PPA when the Ubuntu keyserver is down, the key is not added. And if you add multiple PPAs when this happens, it can be quite annoying to search for and manually import the GPG keys for every PPA. For instance, when Ubuntu 10.04 was released, the Ubuntu Keyserver was down so a lot of people possibly have some missing GPG keys.

When a GPG key is missing, an error similar to this is displayed when you run an update:
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9BF3BB4E5E17B5
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B22AB97AF1CDFA9
W: You may want to run apt-get update to correct these problems


For this reason I've created an Ubuntu .deb package for the script I was talking about which you can install via the WebUpd8 PPA. If you have the PPA added to your sources, simply paste this in a terminal:
sudo apt-get install launchpad-getkeys


If you don't want to add the WebUpd8 PPA, simply download launchpad-getkeys .deb manually:

-Ubuntu 10.10 Maverick Meerkat:
launchpad-getkeys_0.1~webupd8~maverick_all.deb (1.5 KiB)

-Ubuntu 10.04 Lucid Lynx:
launchpad-getkeys_0.1~webupd8~lucid3_all.deb (1.5 KiB)

-Ubuntu 9.10 Karmic Koala:
launchpad-getkeys_0.1~webupd8~karmic_all.deb (1.5 KiB)

-Ubuntu 9.04 Jaunty Jackalope:
launchpad-getkeys_0.1~webupd8~jaunty_all.deb (1.5 KiB)


Once installed, to import all the missing GPG keys for your PPAs, simply use the following command:
sudo launchpad-getkeys


That's it!


In a future release, I might add some mirrors for getting the GPG keys to make sure the server launchpad-getkeys tries to access is not down. We'll see...

© www.webupd8.org 2009-2010. | What's New on the World Wide Web



"