117

I started using GNU Privacy Guard. An error occurs when trying to import a key from any server:

gpg --keyserver keys.gnupg.net --recv-key 908F435E

Output:

gpg: keyserver receive failed: No name
0

6 Answers 6

175

I stumbled upon this today and found the fix at Maven Central Repository Documentation. The SKS Keyserver Network is being deprecated and probably gone by now. Just use another GPG key server like:

  • keyserver.ubuntu.com
  • keys.openpgp.org
  • pgp.mit.edu

So for example

gpg --keyserver keyserver.ubuntu.com --recv-key 908F435E
4
  • 4
    Curious. I am getting the same error as the OP, but this doesn't fix it to me. The error message changes from "No name" to "No data" though. Jun 29, 2021 at 9:22
  • 2
    @JeroenvanderMeer That probably indicates the key itself does not exist on the server. To add a key to the keyserver use gpg --keyserver <key-server> --send-keys <id> Jun 29, 2021 at 9:35
  • 1
    That appears to give the same error, regardless of the choice of key server. Hmm, but let me not digress from the topic of this thread too much --- I'll see what I can do. Jun 29, 2021 at 9:57
  • 1
    If that's not working, e.g. due to a firewall, you could also try it with hkp://keyserver.ubuntu.com:80
    – mYnDstrEAm
    Jan 12, 2022 at 0:19
28

Try these command one by one. It works for me.

curl -sSL https://rvm.io/mpapis.asc | gpg2 --import
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import
1
  • 4
    I don't know if this problem is specific from rvm, but this one actually works. Trying hkp://keys.openpgp.org hkp://pgp.mit.edu hkp://keyserver.pgp.com hkp://keyserver.ubuntu.com does not work "gpgkeys: key ... can't be retrieved"
    – Andy
    Aug 3, 2021 at 23:23
5

As an alternative to the options above, from the RVM security documentation,

If you encounter problem with the key server above, try a different one. Some alternatives are presented below:

  • hkp://ipv4.pool.sks-keyservers.net
  • hkp://pgp.mit.edu
  • hkp://keyserver.pgp.com

The second one worked for me, hkp://pgp.mit.edu

2

Replace $key with the corresponding $key you want to add.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $key

This works on Ubuntu 20.04 (Focal Fossa).

0

Please use these commands one by one:

curl -sSL https://rvm.io/mpapis.asc | gpg --import -

curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -

Or you can refer to the rvm.io.

2
  • This seems to be a plagiarised version of Waseem Anwar's answer. The sentence content, sentence structure, and command lines are nearly identical. Aug 19, 2022 at 16:10
  • Actually i have added this answer before that but someone deleted my answer and don't know why...! Aug 19, 2022 at 18:54
-5

keys.gnupg.net is just an alias to pool.sks-keyservers.net. You can point directly to this second address and it will work.

1
  • @MiguelConde See one of the other answers. It seems that these servers do not exist anymore. You should use other server names.
    – ASdeL
    Jul 12, 2021 at 17:46

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.