keyring search regression in master

Werner Koch wk at gnupg.org
Thu Nov 12 08:54:07 CET 2015


On Wed, 11 Nov 2015 17:42, neal at walfield.org said:

> Your bug report gets an F :-).  Can you please provide some more
> details.  I'm using a keybox and I can't reproduce your problem.

Well, something like this is run when I do a commit or stash:

  $ ../g10/gpg2 -vsbau 0xE3FDFF218E45B72B </etc/motd >/dev/null
  [...]
  gpg: Error: the key specification '0xE3FDFF218E45B72B' is ambiguous.
  gpg: (check argument of option '--local-user')
  gpg: error reading key block for '0xE3FDFF218E45B72B': Unknown system error.
  gpg: Error: the key specification '1E42B367' is ambiguous.
  gpg: (check argument of option '--encrypt-to')
  gpg: error reading key block for '1E42B367': Unknown system error.
  gpg: Warning: value '1E42B367' for --default-key should be a long keyid or a fingerprint.
  gpg: Error: the key specification '1E42B367' is ambiguous.
  gpg: (check argument of option '--default-key')
  gpg: error reading key block for '1E42B367': Unknown system error.
  gpg: writing to stdout
  gpg: EDDSA/SHA256 signature from: "E3FDFF218E45B72B Werner Koch (wheatstone commit signing)"
  wk at wheatstone:~/b/gnupg/tmp$ echo $?
  2

Note that I have only specified a short key id because this is pretty
common and gpg prints only a warning.  Okay.

The real problem is that there are several error messages - one is
sufficient to let gpg exit with a failure and git won't continue.  There
are 2 different kinds of errors:

  gpg: Error: the key specification '0xE3FDFF218E45B72B' is ambiguous.

This is the keyid I specified on the command line.  Let's check it:

  $ ../g10/gpg2 -k 0xE3FDFF218E45B72B
  [...]
  gpg: Error: the key specification '1E42B367' is ambiguous.
  gpg: (check argument of option '--encrypt-to')
  gpg: error reading key block for '1E42B367': Unknown system error.
  gpg: Warning: value '1E42B367' for --default-key should be a long keyid or a fingerprint.
  gpg: Error: the key specification '1E42B367' is ambiguous.
  gpg: (check argument of option '--default-key')
  gpg: error reading key block for '1E42B367': Unknown system error.
  gpg: please do a --check-trustdb
  pub   ed25519/E3FDFF218E45B72B 2015-02-18 [expires: 2025-02-15]
  uid                 [ultimate] Werner Koch (wheatstone commit signing)
  
(and -k shows the same result).
What is the ambiguity here?

The other two error messages are identical one for --encrypt-to and one
for --default-key:

  gpg: Error: the key specification '1E42B367' is ambiguous.

Let's check it:

  $ ../g10/gpg2 -k 1E42B367
  [...]
  gpg: Error: the key specification '1E42B367' is ambiguous.
  gpg: (check argument of option '--encrypt-to')
  gpg: error reading key block for '1E42B367': Unknown system error.
  gpg: Warning: value '1E42B367' for --default-key should be a long keyid or a fingerprint.
  gpg: Error: the key specification '1E42B367' is ambiguous.
  gpg: (check argument of option '--default-key')
  gpg: error reading key block for '1E42B367': Unknown system error.
  gpg: please do a --check-trustdb
  pub   dsa2048/F2AD85AC1E42B367 2007-12-31 [expires: 2018-12-31]
  uid                 [ unknown] Werner Koch <wk at gnupg.org>
  uid                 [ unknown] Werner Koch <wk at g10code.com>
  uid                 [ unknown] Werner Koch <werner at eifzilla.de>
  sub   dsa1024/4F0540D577F95F95 2011-11-02
  sub   rsa2048/1E0FE11D664D7444 2014-01-02 [expires: 2016-12-31]

Also not ambiguous.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list