Error "gpg: keyserver receive failed: No name"
Asked Answered
G

6

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
Gerstner answered 16/2, 2021 at 1:2 Comment(1)
you can configure a new keyserver globally unix.stackexchange.com/questions/155433/…Anjanette
C
178

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
Colugo answered 25/6, 2021 at 14:16 Comment(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.Zeculon
@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>Colugo
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.Zeculon
If that's not working, e.g. due to a firewall, you could also try it with hkp://keyserver.ubuntu.com:80Lex
S
29

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
Smtih answered 27/6, 2021 at 14:19 Comment(1)
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"Wedgwood
H
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

Hiss answered 19/11, 2021 at 19:6 Comment(0)
T
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).

Therm answered 28/11, 2021 at 18:24 Comment(0)
C
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.

Caesium answered 7/8, 2022 at 17:16 Comment(2)
This seems to be a plagiarised version of Waseem Anwar's answer. The sentence content, sentence structure, and command lines are nearly identical.Perambulator
Actually i have added this answer before that but someone deleted my answer and don't know why...!Caesium
T
-6

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

Traitor answered 18/2, 2021 at 11:8 Comment(1)
@MiguelConde See one of the other answers. It seems that these servers do not exist anymore. You should use other server names.Jermayne

© 2022 - 2024 — McMap. All rights reserved.