gpg: keyserver receive failed: No name

Gnupg

Gnupg Problem Overview


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

@ubuntu:~/Desktop$ gpg --keyserver keys.gnupg.net --recv-key 908F435E
gpg: keyserver receive failed: No name

Gnupg Solutions


Solution 1 - Gnupg

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

Solution 2 - Gnupg

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

Solution 3 - Gnupg

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

Solution 4 - Gnupg

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 Ubuntu20.04

Solution 5 - Gnupg

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

Categories

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionErfView Question on Stackoverflow
Solution 1 - GnupgJacob van LingenView Answer on Stackoverflow
Solution 2 - GnupgWaseem AnwarView Answer on Stackoverflow
Solution 3 - Gnupgwellthatdidn'tworkView Answer on Stackoverflow
Solution 4 - Gnupguser17533332View Answer on Stackoverflow
Solution 5 - GnupgReeSilva_SPFCView Answer on Stackoverflow