Closed jgraef closed 7 years ago
My GPG keyring was just wiped. Is it possible that python-gnupg "resets" the keyring that it uses?
@jgraef if you use gnupg version 2.x (like the default in debian sid) chances are that you are using the new keyring format pubring.kbx and private-keys-v1.d. This format doesn't live well with old style *.gpg keyrings, if you have both a pubring.kbx and a pubring.gpg gpg will show you only the contents of the pubring.gpg :(
I'm not sure if python-gnupg generates the pubring.gpg creating this problem.
I tested this pull req and looks good
Hi @jgraef! I'm not sure that we want to use $HOME/.gnupg
, for exactly the reason of the problem you experienced: we don't want to accidentally erase/damage/change a user's real keyring, or surprise them in any way. If you really want to use your real GNUPGHOME
directory, then please do GPG([…], home='~/.gnupg')
.
The documentation is wrong, however. That should be fixed.
Instead of
_util._conf
use_util._ugpg
as default for homedir.The documentation for the
homedir
parameter says:Therefore the default for it should be
_ugpg
(which is usually$HOME/.gpg
) and not_conf