On 2022-09-20, Szczezuja.space <
[email protected]> wrote:
On 2022-08-29, Matthew Ernisse <[email protected]> wrote:
On Sun, 28 Aug 2022 18:52:53 -0000 (UTC), Szczezuja.space wrote:
Unfortunately I'm still facing the problem with decryption.
[...]
There aren't good words about it: https://github.com/neomutt/neomutt/issues/1866
"Unless you're a crypto wizard, we recommend a single setting instead: set crypt_use_gpgme = yes"
So I'm a crypto wizard. :-)
I'd like to write a few words because I finally solved my problems. It
seems that I mixed everything and that made me not be able to configure
it.
So as I understand for now:
If mutt is set to use GPGME it is using gpg2 commands, not gpg
commands what I had thought.
I had been testing everything through gpg commands, and finally I
discovered that gpg import isn't the same as gpg2 import. My private key
was inaccessible for gpg2.
In opposite way when I was configuring gpg-agent I wasn't aware that it
is never used by gpg command (only by gpg2 command) because gpg-agent
is part of gpg2.
So finally I was getting an error while accessing private key through
gpg2, or getting passpharse error through gpg-agent. There was two
different errors.
Because I was mixing commands in gpg.rc file sometimes I had signing
working, while it was going through gpg command. It was the weirdest
thing that decryption was never working and produced random messages in
mutt "can't copy message" or general "decryption failed" messages.
And even when I was trying GPGME and gpg-agent I had a third issue.
Because there wasn't set GPG_TTY env variable, and there was problem
with pinentry for gpg-agent.
Everything was weird, but a proper config:
gpg2 --list-secret-key showing my key,
crypt_use_gpgme is yes,
pgp_use_gpg_agent is yes,
GPG-TTY is set
and everything is working fine.
So it's true that it should all work out of the box. The information that
GPGME has problems with mutt is probably outdated. The same, example gpg.rc
and examples of pgp_decrypt_command mappings and so on.
Cheers!
--
.-=-. Szczezuja; on the small-net:
( S\ \ gemini://szczezuja.space/ - gemlog & tinylog
`--' /
gopher://sdf.org:70/0/users/szczezuja/ - phlog
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)