GPG decryption with Mutt fails while entering password
by Eupator from LinuxQuestions.org on (#585TJ)
I've been trying to enable gpg in mutt. I can sign and encrypt messages, but I'm unable to decrypt them (at least not inside mutt, more on that later).
Just now, I sent myself an email in mutt. After composing a message in vim, I type "p" and then "e" to ask mutt to encrypt it. It asks for me to choose a public key, and I choose my own. The message arrives, and when I try to open it, I see this (personal details changed):
Quote:
I type my private key password and hit enter, but nothing happens. I don't get a response of any kind until I hit Ctrl+C, at which point I get the message, "There was an error displaying all or part of the message."
However, I can view the attachments and save "msg.asc" to my home folder. Then, I run gpg --output - msg.asc, type my password, hit enter, and see the decrypted message just fine.
I have no problem signing messages or verifying signatures, either.
Here's a copy of my .gpg.rc, which I link from .muttrc with the command, "source ~/.gpg.rc":
Quote:
(My actual key ID is not 01234567, obviously.)
I thought maybe I was having a problem with my terminal emulator, so I've tried this in urxvt and st; no luck with either.
I'm using mutt 1.14.6 and gpg 1.4.23.
Many thanks for any advice you can provide.


Just now, I sent myself an email in mutt. After composing a message in vim, I type "p" and then "e" to ask mutt to encrypt it. It asks for me to choose a public key, and I choose my own. The message arrives, and when I try to open it, I see this (personal details changed):
Quote:
Invoking PGP... You need a passphrase to unlock the secret key for user: "Me <myemail@example.com>" 2048-bit RSA key, ID ABCD1234, created 2020-08-03 (main key ID 01234567) Enter passphrase: |
However, I can view the attachments and save "msg.asc" to my home folder. Then, I run gpg --output - msg.asc, type my password, hit enter, and see the decrypted message just fine.
I have no problem signing messages or verifying signatures, either.
Here's a copy of my .gpg.rc, which I link from .muttrc with the command, "source ~/.gpg.rc":
Quote:
set pgp_decode_command="gpg --no-verbose --output - %f" set pgp_verify_command="gpg --no-verbose --output - --verify %s %f" set pgp_decrypt_command="gpg --no-verbose --output - %f" set pgp_sign_command="gpg --no-verbose --output - --armor --detach-sign --textmode %?a?-u %a? %f" set pgp_clearsign_command="gpg --no-verbose --output - --armor --textmode --clearsign %?a?-u %a? %f" set pgp_encrypt_only_command="pgpewrap gpg --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x01234567 -- -r %r -- %f" set pgp_encrypt_sign_command="pgpewrap gpg --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x01234567 -- -r %r -- %f" set pgp_import_command="gpg --no-verbose --import -v %f" set pgp_export_command="gpg --no-verbose --export --armor %r" set pgp_verify_key_command="gpg --no-verbose --fingerprint --check-sigs %r" set pgp_list_pubring_command="gpg --no-verbose --with-colons --list-keys %r" set pgp_list_secring_command="gpg --no-verbose --with-colons --list-secret-keys %r" set pgp_autosign=yes set pgp_sign_as=0x01234567 set pgp_replyencrypt=yes set pgp_timeout=1800 set pgp_good_sign="^gpg: Good signature from" |
I thought maybe I was having a problem with my terminal emulator, so I've tried this in urxvt and st; no luck with either.
I'm using mutt 1.14.6 and gpg 1.4.23.
Many thanks for any advice you can provide.