Using gpg with emacs mu4e and mbsync
famubu
famubu at disroot.org
Thu May 14 08:13:10 CEST 2026
Hi.
I am getting an error when trying to read a gpg encrypted file.
This was the command:
```
gpg -q --for-your-eyes-only --no-tty -d ~/.authinfo.gpg
```
Error:
```
gpg: Sorry, no terminal at all requested - can't get input
```
I think the `--no-tty` is needed because I'm trying to use it from the
emacs editor.
Would anyone here know how to fix this?
Any help would be appreciated.
Versions:
- gpg: 2.2.27
- emacs: 27.1
- mbsync: 1.3.0
- mu4e: 1.4
Background
==========
I'm trying to use mu4e package of emacs as mail client.
mbsync is used to fetch mails.
I got my mail password in a gpg encrypted file: ~/.authinfo.gpg
Now, I need to be able to run mbsync while within emacs/mu4e with the
password prompt showing up in its minibuffer.
For this, I put a 'pinentry loopback' in the conf file of gpg (config
files shown at end of this post).
I think this is not an editor problem because `mbsyc dirname` also
gives the same error about 'no terminal at all requested'
In emacs, it works fine when I open gpg encrypted file where the
editor will prompt me for password in the minibuffer and open the file
in its plain text form.
conf files
==========
These are the contents of the gpg conf files.
gpg.conf:
```
use-agent
pinentry-mode loopback
```
gpg-agent.conf:
```
pinentry-program /usr/bin/pinentry-curses
allow-emacs-pinentry
allow-loopback-pinentry
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20260514/ca573b32/attachment.html>
More information about the Gnupg-users
mailing list