gpg: can't import key: "new key but contains no user ID - skipped"

Solution 1:

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
  • --keyserver hkps://pgp.surf.nl (ex-SKS pool)
  • --keyserver hkp://pgp.rediris.es (ex-SKS pool)

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