What is working
My gpg-agent pinentry works fine under X. I can run
echo "test" | gpg2 -ase --default-recipient-self | gpg2
to cache my passwords and later run
killall gpg-agent -1 to flush them.
By default, it opens pinentry-gtk (from the looks of it) and prompts me for my password.
What is not working
However, if I try to run the same command without an X server, the it appears that gpg2 is hanging (no prompt or anything). If I kill it, then I can see that there is also a
pinentry process which continues to exist but not anywhere useful.
What I expect to happen
I expect that running
gpg2 without an X server would give me a pinentry-curses prompt, the same way that
pass does. Additionally, I seem to remember that with older version of gpg, it just prompted me for my password from stdin, and I'm not quite sure why that doesn't happen either.
What I have tried
I have tried the following "fixes" but none have caused the aforementioned command to execute properly. In fact, forcing pinentry-curses causes the aforementioned command to fail even with the X environment (
pass still works).
pinentry-program /usr/bin/pinentry-cursesin `gpg-agent.conf``
Starting gpg-agent like this:
gpg-agent --daemon --keep-tty --use-standard-socket --pinentry-program=/usr/bin/pinentry-curses
using an environment variable:
I have a nearly empty .gpg-agent config file; all it has is cache timeouts.
I am calling gpg-agent directly upon login like
eval $(gpg-agent --daemon). I am not booting into X so I use getty to log in.