Gangmax Blog

Fix RVM Installation 'gpg: keyserver timed out' Issue

In my working environment, when installing RVM with the offical instructions:

1
2
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable

I got error message for the “gpg” command like below:

1
2
3
4
5
6
# gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyring `/home/gang/.gnupg/secring.gpg' created
gpg: keyring `/home/gang/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

The reason is the firewall. I get the solution from here:

Nevermind - this is a firewall issue
One of two solutions:

  1. iptables -I OUTPUT -p tcp –dport 11371
  2. gpg –keyserver hkp://keys.gnupg.net:80 –recv-keys D39DC0E3 to force it to talk port 80

Comments