익명 03:15

can't add key - keyserver timed out

can't add key - keyserver timed out

I'm trying to install mongodb on ubuntu 15.10. While following this - Install Mongo 3.2 on Ubuntu 15.10 - i got the following error message:

W: GPG error: http://repo.mongodb.org trusty/mongodb-org/3.2 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927

So then I attempted to add the key like this:

me@devbox:/etc/test$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D68FA50FEA312927

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.CWnpUGSg5w --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg --keyring /etc/apt/trusted.gpg.d/nginx_ubuntu_stable.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team_ubuntu_java.gpg --keyserver keyserver.ubuntu.com --recv-keys D68FA50FEA312927
gpg: requesting key EA312927 from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

Not sure what else to try. I'm currently looking other posts here on this site to see if this has been addressed.

EDIT 1:

Based on this post: Can't add repo keys

I tried to run the command :

sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D68FA50FEA312927

and then retried:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D68FA50FEA312927

But it's still failing.



Top Answer/Comment:

Try different keyservers, and try using port 80.

A few servers you could try if keyserver.ubuntu.com doesn't work :

  • keys.gnupg.net (this one worked for me today)
  • pgp.mit.edu
  • sks-keyservers.net
  • keyserver.pgp.com
sudo apt-key adv --keyserver hkp://$pgp_server:80 --recv-keys $wanted_key
상단 광고의 [X] 버튼을 누르면 내용이 보입니다