1

I cannot add-apt-repository because the Ubuntu keyserver times out:

$ sudo add-apt-repository ppa:git-core/ppa -y
gpg: keyring `/tmp/tmpxzw15cei/secring.gpg' created
gpg: keyring `/tmp/tmpxzw15cei/pubring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

$ uname -a
Linux gkistner-dt3 4.2.0-36-generic #41~14.04.1-Ubuntu SMP Tue Apr 19 17:03:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:        14.04
Codename:       trusty

I'm running Xubuntu. Per this post I have checked and found that Xubuntu has no firewall. Per comments on this post I am not behind a corporate proxy (though I am on a corporate LAN that NATs all global traffic); I am able to directly telnet keyserver.ubuntu.com 80.

If I try to hack in this answer I get a similar result:

$ sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E1DF1F24
gpg: directory `/home/gkistner/.gnupg' created
gpg: new configuration file `/home/gkistner/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/gkistner/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/gkistner/.gnupg/secring.gpg' created
gpg: keyring `/home/gkistner/.gnupg/pubring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

How do I add this repository?

  • Are you running in a VM? – user508889 May 16 '16 at 18:44
  • @bc2946088 I am not running in a VM. – Phrogz May 16 '16 at 18:44
  • What version of Kubuntu are you on, have you tried a different key server? – user508889 May 16 '16 at 18:46
  • Nevermind, just read 14.04 -- try to use hkp://keys.gnupg.net – user508889 May 16 '16 at 18:47
  • @bc2946088 Attempting sudo gpg --keyserver hkp://keys.gnupg.net:80 --recv-keys E1DF1F24 eventually appears to succeed, but I cannot then re-run the initial add-apt-repository command successfully. (It still tries to request the key.) – Phrogz May 16 '16 at 18:53
0

A coworker discovered that there is some sort of weird networking going on at our site. Running the original command multiple times in a row sudo add-apt-repository ppa:git-core/ppa -y repeatedly timed out (after 60s+ of delay each time) and then, magically, it succeeded. Same command, no change to any settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.