Gpg: can’t import key: “new key but contains no user ID – skipped”

gnupg

I am trying to import Github's webflow signing key on a fresh install of Raspbian (Debian) Buster.

 $ gpg2 --recv-keys 5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23
gpg: key 4AEE18F83AFDEB23: new key but contains no user ID - skipped
gpg: Total number processed: 1
gpg:           w/o user IDs: 1

I don't understand the error message and am having a hard time finding other users encountering the same error. gpg version:

$ gpg --version
gpg (GnuPG) 2.2.12
libgcrypt 1.8.4
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 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/pi/.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

I'm certain this key has a User ID! (Verified on OSX)

Best Answer

You are probably using the keys.openpgp.org keyserver, which has an owner approval system – it will strip all user IDs unless the owner of the corresponding email address has allowed them to be published.

Try to download the key from elsewhere, such as --keyserver hkps://keyserver.ubuntu.com.

(Future GnuPG versions will accept keys without an UID, although it won't be terribly useful except for direct fingerprint-based comparison.)

Related Question