Ubuntu / Linux news and application reviews.

You probably know that to use a Launchpad PPA repository, you must also import the GPG key. This is how it worked until Ubuntu Karmic Koala:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247510BE


And starting with Ubuntu Karmic Koala, you can add both the GPG key and the PPA repository, with a single command:
sudo add-apt-repository ppa:PPA_NAME


BUT keyserver.ubuntu.com goes down from time to time. When it's down, you'll see an error similar to this:
gpg: keyserver receive failed: keyserver error


Lately it happens quite often (people leave comments about this all the time, on Web Upd8 - example), so how can we solve this?

Korben (thank you!) came up with the idea to replace keyserver.ubuntu.com with any of the following servers:
pool.sks-keyservers.net
subkeys.pgp.net
pgp.mit.edu
keys.nayr.net
keys.gnupg.net
wwwkeys.XX.pgp.net - replace XX with your country code (fr, en, de... etc) 


That means we must use the old method of adding a PPA, for Ubuntu Karmic Koala too:



1. Add the PPA using this command:
sudo sh -c "echo 'deb http://ppa.launchpad.net/PPA_NAME/ppa/ubuntu UBUNTU_VERSION main' >> /etc/apt/sources.list"
Or the graphic way - by going to System > Administration > Software Sources, etc.

2. Add the GPG key:
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys XXXXXXX

Where XXXXXXX can be found on the page for the PPA we want to use:

launchpad - finding yout the PGP key


and keys.gnupg.net can be any server from the list I was telling you about in the beginning of the post.


If you use the Launchpad automatic GPG keys import script (automatically installs the GPG keys for all your PPAs), you can edit it to use a different keyserver too.