Page MenuHome GnuPG

v2.2.28 fails to locate-key from keyserver by email: Invalid user ID
Closed, ResolvedPublic


gpg since version 2.2.28 fails to get a key from a keyserver by email address using --locate-key with the error message: "Invalid user ID".


❯ gpg --homedir="$(mktemp -d)" --auto-key-locate clear,nodefault,keyserver --locate-external-key
gpg: keybox '/tmp/tmp.rBu85OTSb3/pubring.kbx' created
gpg: /tmp/tmp.rBu85OTSb3/trustdb.gpg: trustdb created
gpg: error retrieving '' via keyserver: Invalid user ID
gpg: error reading key: Invalid user ID

Arguments without an "@" result in the (to be expected) error: "No public key".

Using --locate-key with a fingerprint or key-ID still works as expected.

This appears to not be related to a specific keyserver.

It worked in version 2.2.27.


gpg v2.2.28