how to configure default sign key for particular user?

Scott Mcdermott scott at smemsh.net
Mon May 9 01:14:09 CEST 2016


I have multiple keys for the same userid.  When using:

    gpg --sign --user email at address.foo

gpg-2.1.11 is always choosing the wrong one.  The 'default-key'
setting is ignored (as documented) due to presence of '--user'.

Does this mean there is no way to tell gpg to automatically sign
with a particular key, unless I specify the actual keyid instead
of the email? How can I configure the default signing key to use
*for a given userid/address* (not just in unspecified case)?

Otherwise, any application [which knows only username/email] has
to be know also the specific keyid to override gpg's default
selection (which I'm guessing is the first key in the keyring);
this seems wrong, it should be configurable in gpg, just like
it's configurable if no userid is given (i.e. default-key).

(aside: the default key selected for a userid should probably be
the later key anyways, I would think, under the assumption that
one always want to use the newer key, not the oldest one.)

-- 
Scott



More information about the Gnupg-users mailing list