1 The 2.X branch of [[GnuPG]] comes with [gpg-agent][] for caching
2 passphrases. The documentation is good, but here are my notes
3 outlining my usual usage.
7 if [ -f "${HOME}/.gnupg/agent-info" ]; then
8 source "${HOME}/.gnupg/agent-info"
14 $ gpg-agent --daemon --write-env-file "${HOME}/.gnupg/agent-info"
15 $ echo "GPG_TTY='${GPG_TTY}'; export GPG_TTY" >> "${HOME}/.gnupg/agent-info"
16 $ source "${HOME}/.gnupg/agent-info"
18 The `GPG_TTY` bit will spawn the `pinentry` call in the designated
19 TTY. This avoids troublesome issues like pinentry clobbering [[Mutt]]
20 if they are both using ncurses.
22 When you are done with the agent, kill it with
25 $ rm -f "${HOME}/.gnupg/agent-info"
27 [gpg-agent]: http://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html