A program (git-remote-gcrypt) calls gpg like follows:


--- cut ---
$ gpg -se --default-recipient-self

You need a passphrase to unlock the secret key for
user: "Brian May <brian@microcomaustralia.com.au>"
4096-bit RSA key, ID B9D02636, created 2010-01-13

No such user ID.

Current recipients:

Enter the user ID.  End with an empty line: 
gpg: Interrupt caught ... exiting
--- cut ---


gpg complains "No such user ID". Why?


It has clearly identified my secret key, so it should be able to find the corresponding public key right?


The man page says:

--default-recipient-self
              Use the default key as default recipient if option --recipient is not used and don't ask if this is a valid one. The default key is the first one from the secret keyring or the one set with --default-key.

--default-key name
              Use name as the default key to sign with. If this option is not used, the default key is the first key found in the secret keyring.  Note that -u or --local-user overrides this option.

Which is what I expected.



My ~/.gnupg.conf contains:

# FILE CREATED BY SEAHORSE
use-agent


This is gpg in Debian/wheezy.


Is there something I am doing wrong?
--
Brian May <brian@microcomaustralia.com.au>