Wednesday, July 27, 2011

Ubuntu Keyserver Update Failure Fix


I was trying to update my Ubuntu PPA via terminal when I got this message. If it couldn't connect to the keyserver.ubuntu.com, how the heck it is going to get my key??? So here's the solution I found on http://www.serenux.com . Thanks to Allah, this article saved my day. :)


I get an “HTTP fetch” error when I try to import a GPG public key!
If you get the following error:


$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C
gpg: requesting key 249AD24C from hkp server keyserver.ubuntu.com
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
$
It is because your firewall is blocking access to the Keyserver. Keyservers use port 11371 to communicate, not port 80 which is the normal HTTP port, so open 11371 as an outbound port on your firewall and re-run the command and it will work fine.

No comments: