Page MenuHome GnuPG

gpg: keyserver send failed: Network is unreachable
Closed, ResolvedPublic

Description

gpg (GnuPG/MacGPG2) 2.2.27
macOS 11.3.1

When I try to distribute my public key to a key server:

gpg --keyserver keyserver.ubuntu.com --send-keys <keyID>

It always gives error:

gpg: keyserver send failed: Network is unreachable
gpg: keyserver send failed: Network is unreachable

What I tried:

  1. change keyserver to
keys.openpgp.org

or

pgp.mit.edu
  1. try
gpg --keyserver hkp://keyserver.pgp.com:80 --send-keys <keyID>
  1. try sudo
sudo gpg --keyserver keyserver.ubuntu.com --send-keys <keyID>

I could access keyserver.ubuntu.com, keys.openpgp.org and pgp.mit.edu from browser.
And I also uploaded the public key to keys.openpgp.org, but when I run

gpg --keyserver keys.openpgp.org --recv-keys <keyID>

It still gives me error:

gpg: keyserver receive failed: Network is unreachable

Is that due to Firewall or name resolution?

Could you please take a look? Thank you!

Event Timeline

dingyis renamed this task from gpg: kyserver send failed: Network is unreachable to gpg: keyserver send failed: Network is unreachable.Wed, Oct 6, 9:25 PM
dingyis updated the task description. (Show Details)

I can't tell you why you get this error. However, since Oct 1 the keyserver access does in many case not work anymnore. This has been fixed in GnuPG 2.2.32, which I released a few minutes ago. You may install this on top of gpg4win 3.1.16.

Network unreachable is usually outside of GnuPG. Please ask on a ML or on IRC for networking help.

(BTW, a good bug report includes version numbers and the used OS)

Thank you for your reply! I have updated version numbers and the used OS. I will try with GnuPG 2.2.32

Hi, I have installed 2.2.32, but still get the same error.

What do you mean by asking on a ML or on IRC for networking help?

Works for me:

$ gpg --version
gpg (GnuPG) 2.2.27
libgcrypt 1.9.4-unknown
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/ingo/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

$ gpg --keyserver keyserver.ubuntu.com --recv-keys 712A0910321AC762D48054081A747E4530E0B9D8
gpg: key 1A747E4530E0B9D8: 1 duplicate signature removed
gpg: key 1A747E4530E0B9D8: "Ingo Klöcker <kloecker@kde.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

$ gpg --keyserver keys.openpgp.org --recv-keys 712A0910321AC762D48054081A747E4530E0B9D8
gpg: key 1A747E4530E0B9D8: "Ingo Klöcker <kloecker@kde.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

$ gpg --keyserver pgp.mit.edu --recv-keys 712A0910321AC762D48054081A747E4530E0B9D8
gpg: keyserver receive failed: No data

What do you mean by asking on a ML or on IRC for networking help?

Werner means that there are better places for asking for help with networking problems. gpg relies on a working network.

werner claimed this task.