<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi.</p>
<p>I am getting an error when trying to read a gpg encrypted file.</p>
<p>This was the command:</p>
<p>```<br />gpg -q --for-your-eyes-only --no-tty -d ~/.authinfo.gpg<br />```</p>
<p>Error:</p>
<p>```<br />gpg: Sorry, no terminal at all requested - can't get input<br />```</p>
<p>I think the `--no-tty` is needed because I'm trying to use it from the<br />emacs editor.</p>
<p>Would anyone here know how to fix this?</p>
<p>Any help would be appreciated.</p>
<p><br /></p>
<p>Versions:</p>
<p> - gpg: 2.2.27</p>
<p> - emacs: 27.1</p>
<p> - mbsync: 1.3.0</p>
<p> - mu4e: 1.4</p>
<p><br /></p>
<p>Background<br />==========<br />I'm trying to use mu4e package of emacs as mail client.<br />mbsync is used to fetch mails.<br />I got my mail password in a gpg encrypted file: ~/.authinfo.gpg</p>
<p>Now, I need to be able to run mbsync while within emacs/mu4e with the<br />password prompt showing up in its minibuffer.</p>
<p>For this, I put a 'pinentry loopback' in the conf file of gpg (config<br />files shown at end of this post).</p>
<p>I think this is not an editor problem because `mbsyc dirname` also<br />gives the same error about 'no terminal at all requested'<br /> <br />In emacs, it works fine when I open gpg encrypted file where the<br />editor will prompt me for password in the minibuffer and open the file<br />in its plain text form.</p>
<p>conf files<br />==========<br />These are the contents of the gpg conf files.</p>
<p>gpg.conf:</p>
<p>```<br />use-agent<br />pinentry-mode loopback<br />```</p>
<p>gpg-agent.conf:</p>
<p>```<br />pinentry-program /usr/bin/pinentry-curses<br />allow-emacs-pinentry<br />allow-loopback-pinentry<br />```</p>
</body></html>