
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>

On Tue, May 13, 2014 at 04:25:04PM +1000, Brian May wrote:
My ~/.gnupg.conf contains:
# FILE CREATED BY SEAHORSE use-agent
This is gpg in Debian/wheezy.
Is there something I am doing wrong?
i have no idea if your're doing anything wrong and i'm certainly no expert on gnupg, but my ~/.gnupg/gpg.conf contains useful comments like this: (dunno where they came from originally, probably copied from some example file) # Uncomment the following option to get rid of the copyright notice no-greeting # If you have more than 1 secret key in your keyring, you may want to # uncomment the following option and set your preferred keyid. #default-key xxxxxxxx # If you do not pass a recipient to gpg, it will ask for one. Using # this option you can encrypt to a default key. Key validation will # not be done in this case. The second form uses the default key as # default recipient. #default-recipient some-user-id #default-recipient-self explicitly setting some of these options in the config file may help. craig -- craig sanders <cas@taz.net.au> BOFH excuse #23: improperly oriented keyboard

On 14 May 2014 08:32, Craig Sanders <cas@taz.net.au> wrote:
# If you have more than 1 secret key in your keyring, you may want to # uncomment the following option and set your preferred keyid.
#default-key xxxxxxxx
Setting this seems to work. Bit weird though, I only have one secret key, so it shouldn't be required. -- Brian May <brian@microcomaustralia.com.au>

Brian May <brian@microcomaustralia.com.au> writes:
On 14 May 2014 08:32, Craig Sanders <cas@taz.net.au> wrote:
# If you have more than 1 secret key in your keyring, you may want to # uncomment the following option and set your preferred keyid.
#default-key xxxxxxxx
Setting this seems to work. Bit weird though, I only have one secret key, so it shouldn't be required.
You were both signing and encrypting. I speculate the default-recipient-key only affects the latter.
participants (3)
-
Brian May
-
Craig Sanders
-
trentbuck@gmail.com