gpg: keyserver receive failed: Server indicated a failure

Behind a firewall you should use the port 80 instead of the default port 11371 :

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9A2FD067A2E3EF7B

Sample output:

Executing: /tmp/apt-key-gpghome.mTGQWBR2AG/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 9A2FD067A2E3EF7B
gpg: key 9A2FD067A2E3EF7B: "Launchpad PPA for GNS3" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

It has to do with DNS and what your DNS server does or does return for dirmngr ;( It got introduce since 2.1.16 with dirmngr, and I've been looking for solution myself on 2.1.6 with Debian's default packages. ;(

The correct answer, is: Upgrade to version 2.2.x or later that fixed this problem first time.


This issue was really though for me, none of the proposed solutions worked for me until I found this post on reddit. I just went and added this line to /etc/resolv.conf

nameserver 8.8.8.8 # Google dns

you can try any other dns and see which one works for you.

Tags:

Debian

Apt

Gpg