Page MenuHome GnuPG

gpg operation fails the first time if ~/.gnupg doesn't exist
Closed, ResolvedPublic

Description

gpg --recv-keys fails the ~/.gnupg directory does not exist:

$ gpg --recv-keys 493B3065
gpg: directory `/home/test/.gnupg' created
gpg: new configuration file `/home/test/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/test/.gnupg/gpg.conf' are not yet active during
this run
gpg: keyring `/home/test/.gnupg/secring.gpg' created
gpg: keyring `/home/test/.gnupg/pubring.gpg' created
gpg: no keyserver known (use option --keyserver)
gpg: keyserver receive failed: bad URI

The same operation the second time around works. I don't think that printing a
warning really excuses this from being a bug :)

Details

Version
1.4.10

Event Timeline

jturner added projects: gnupg, Bug Report.
jturner added a subscriber: jturner.
werner added a subscriber: werner.

I don't see that as a bug. The created conf file depends on your local
installation and thus may or may not include a keyserver option.

Automatically restarting gpg to read the conf file is too complicated and error
prone. There is a clear warning for this case.

werner claimed this task.