gpg2 not able to download keys "receive failed: try again later"

I'm attempting to add the keys for RVM, however, I am getting an error from gpg2.

$ gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: keyserver receive failed: Try again later

I've also tried a more verbose approach but I get the same error:

$ gpg2 -vvv --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: using character set 'utf-8'
gpg: keyserver receive failed: Try again later

Right now the only Google search for the exact error message I'm getting is from the Arch Linux support boards. Here's the thread. It's a little terse and I'm not quiet able to follow it, but the symlink mentioned at the end of the settings is in place.

/etc/resolv.conf shows this

nameserver 127.0.0.53
options edns0

Results of resolvectl query keys.gnupg.net

keys.gnupg.net: 209.244.105.201 -- link: enp37s0 (hkps.pool.sks-keyservers.net)
-- Information acquired via protocol DNS in 478.3ms.
-- Data is authenticated: no

and resolvectl status says that my current DNS server is my router (Orbi model) 192.168.1.1. This is strange because when I load the Orbi app it says that the DNS servers are what I set them to which is 1.1.1.1 and 1.0.0.1 (unless Orbi proxies to them).

I've also tried some related Google searches and set my /root/.gnupg/dirmngr.conf and ~/.gnupg/dirmngr.conf (not sure if that one is required, but I thought it was worth a try) files to contain a one-line file that says standard-resolver and then killall dirmngr. This did not seem to fix the problem.

5

1 Answer

Considering you're able to locate the server via DNS. The default port utilized by key servers may be blocked by your firewall. Attempt specifying port 80 as some key servers permit sending keys via over http.

gpg2 -vvv --keyserver hkp://keys.gnupg.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

You can also open the port for outbound and established inbound connections:

sudo ufw allow 11371

or

sudo iptables -A OUTPUT -p tcp --dport 11371 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 11371 -m state --state ESTABLISHED,RELATED -j ACCEPT

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like