Launchpad-Getkeys is a script (comes packaged in a .deb) that automatically imports all missing GPG keys, even if you're behind a firewall. It was initially created by blackgr @ ubuntuforums but then I decided to completely re-write the script so I can add some options, new features and so on.

How do you know when you have a missing GPG key? Here's an example: when you run "sudo apt-get update", you'll see some errors like this:

[...]
Fetched 47.0kB in 6s (7,710B/s)
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net maverick Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B2DFD25316B94077
W: GPG error: http://ppa.launchpad.net maverick Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1FFD34C9EB13C954
W: GPG error: http://ppa.launchpad.net maverick Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EF4186FE247510BE

Here's a screenshot too:

Further more, if you have missing GPG keys, the update manager will not allow you to update the packages. That's when Launchpad-Getkeys comes in: it can automatically import all these missing GPG keys, thus fix the errors.

Here is a video with Launchpad-getkeys in action to get a better idea on how it works:

Unfortunately my script didn't work if the user was behind a proxy but WebUpd8 reader Saurabh Kumar added proxy support to Launchpad-Getkeys - I couldn't test this (I'm not behind a proxy and even if I'd try to simulate this, I wouldn't know for sure that it works) but I've merged his change into the Launchpad-Getkeys package in the WebUpd8 PPA anyway. Read on to find out how to install and use Launchpad-Getkeys.

Install Launchpad-Getkeys

Launchpad-Getkeys is available for Ubuntu 9.10, 10.04, 10.10 and 11.04, in the WebUpd8 PPA. Add the PPA and install Launchpad-Getkeys using the following commands: