Docker Community Forums

Share and learn in the Docker community.

Gpg key for docker repo fail to fetch from key server

This was working previously, doesn’t work for me today. Changing the key server results in the same error. Is the docker apt repo GPG key broken?

ubuntu@ubuntu-xenial:~$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: /tmp/tmp.fJN2XFwACA/gpg.1.sh --keyserver
hkp://p80.pool.sks-keyservers.net:80
–recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
?: [fd 4]: read error: Connection reset by peer
gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D partially retrieved (probably corrupt)
gpg: no valid OpenPGP data found.
gpg: key 2C52609D: no valid user IDs
gpg: this may be caused by a missing self-signature
gpg: Total number processed: 1
gpg: w/o user IDs: 1

Same problem here. Tried to install the key today and retrieved:
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Executing: /tmp/tmp.t2nhJuuRaD/gpg.1.sh --keyserver
hkp://p80.pool.sks-keyservers.net:80
–recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
?: [fd 4]: read error: Connection reset by peer
gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D partially retrieved (probably corrupt)
gpg: no valid OpenPGP data found.
gpg: key 2C52609D: no valid user IDs
gpg: this may be caused by a missing self-signature
gpg: Total number processed: 1
gpg: w/o user IDs: 1

My problem was inside the environment:
macOS Siera 10.12.1 and VirtualBox Version 5.1.8 r111374 (Qt5.5.1) running a Linux Ubuntu 16.04 VM.

Problem was solved via: Changing the network settings inside VirtualBox from: NAT to Bridged adapter!

It’s definitely a problem with the network configuration.

Cheers.

I also encountered this problem, for me in an ubuntu 16.04 server running inside VirtualBox 5.18 r111374 with NAT network type. Here is my output:

$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: /tmp/tmp.2wAEXnwYVg/gpg.1.sh --keyserver
hkp://p80.pool.sks-keyservers.net:80
--recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
?: [fd 4]: read error: Connection reset by peer
gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D partially retrieved (probably corrupt)
gpg: no valid OpenPGP data found.
gpg: key 2C52609D: no valid user IDs
gpg: this may be caused by a missing self-signature
gpg: Total number processed: 1
gpg:           w/o user IDs: 1

Similar to @gutwinalex, I was able to work around this by shutting down the server, changing the network type to Bridged, bringing up the server, running the same command, then shutting down the server again to return the network type back to NAT.

When I did all that, here was the output:

$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: /tmp/tmp.I5cCsuUeeU/gpg.1.sh --keyserver
hkp://p80.pool.sks-keyservers.net:80
--recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

The problem is in the VirtualBox version that you are using. I solved the issue by downgrading to version 4.3.40.

Hi All,

Same problem here
sudo apt-key adv \

–keyserver hkp://ha.pool.sks-keyservers.net:80
–recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: /tmp/tmp.RSqIWxvBvQ/gpg.1.sh --keyserver
hkp://ha.pool.sks-keyservers.net:80
–recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server ha.pool.sks-keyservers.net
?: ha.pool.sks-keyservers.net: Host not found
gpgkeys: HTTP fetch error 7: couldn’t connect: Success
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver unreachable
gpg: keyserver communications error: public key not found
gpg: keyserver receive failed: public key not found

I am trying of physical machine with ubuntu16.04,it’s not a virtual machine.
Please suggest what might be wrong?

Finally done.
I refer this link:-

I solved the issue by upgrading to VirtualBox 5.1.14