GPG: GNUPGHOME variable is not respected
Linux Distribution:
Arch Linux
Software Versions:
Output of: gpg --version
gpg (GnuPG) 2.2.10
libgcrypt 1.8.3
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Output of gpg-agent --version
:
gpg-agent (GnuPG) 2.2.10
libgcrypt 1.8.3
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Output of gnome-shell --version
:
GNOME Shell 3.28.3
Output of 'evolution --version`:
evolution 3.28.5
Steps to Reproduce:
-
export
aGNUPGHOME
variable to somewhere other than~/.gnupg
.
export GNUPGHOME="${HOME}/.config/gnupg
-
mv
your.gnupg
folder to that location.
mv ~/.gnupg ~/.config/gnupg
- Verify that
gpg
is reading your keys from the correct directory:
gpg --verbose --version | grep "${GNUPGHOME}"
gpg --list-secret-keys
Example output:
Home: /home/dbeste/.config/gnupg
/home/dbeste/.config/gnupg/pubring.kbx
-------------------------------------
sec# rsa4096/0x4F293B426D113556 2017-06-24 [SC] [expires: 2020-01-01]
Key fingerprint = 71D3 8A95 A374 9895 F805 1A2D 4F29 3B42 6D11 3556
uid [ultimate] Daniel Raymond Beste <dan.ray.beste@gmail.com>
ssb rsa4096/0xEA7B5243949A7586 2017-06-24 [E] [expires: 2019-01-02]
Key fingerprint = 2554 19CE AAAB A260 F78B 4C39 EA7B 5243 949A 7586
ssb rsa4096/0x9894426FA740B074 2017-11-20 [S] [expires: 2019-01-02]
Key fingerprint = E077 69D2 8300 60B2 EFDC 0911 9894 426F A740 B074
-
Start
evolution
and configure GPG encryption / signing. -
Encrypt / sign a test email.
-
evolution
should output agpg
error similar to the following:
gpg: encryption failed: No user secret key
Edited by Ghost User