Not sure when this happened, but running gpg-agent as per readme:
$ gpg-agent --daemon --write-env-file ~/.gnupg/.gpg-agent-info
gpg-agent[1389]: WARNING: "--write-env-file" is an obsolete option - it has no effect
$ gpg-agent --version
gpg-agent (GnuPG/MacGPG2) 2.2.3
libgcrypt 1.8.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Despite the fact that this is an obsolete option, the previously generated .gpg-agent-info file does work and does seem to be necessary.
i.e.
$ git commit --allow-empty -m "empty commit"
You need a passphrase to unlock the secret key for
user: "Lucy Davies <lucy@lucymhdavies.com>"
2048-bit RSA key, ID AB609F34, created 2016-10-20 (main key ID E334C5E2)
Enter passphrase:
vs
$ source ~/.gnupg/.gpg-agent-info
$ export GPG_AGENT_INFO
$ echo $GPG_AGENT_INFO
/Users/lucy/.gnupg/S.gpg-agent:1489:1
$ git commit --allow-empty -m "empty commit"
You need a passphrase to unlock the secret key for
user: "Lucy Davies <lucy@lucymhdavies.com>"
2048-bit RSA key, ID AB609F34, created 2016-10-20 (main key ID E334C5E2)
[master f357c8d] empty commit
Also, the use-standard-socket option is obsolete:
gpg-agent[8927]: /Users/lucy/.gnupg/gpg-agent.conf:1: obsolete option "use-standard-socket" - it has no effect
For now, until I can figure out how to use this newer version of gpg-agent, I've just got this in my bashrc:
# GPG agent
if test -f ~/.gnupg/.gpg-agent-info -a -n "$(pgrep gpg-agent)"; then
# TODO: where does this 1489:1 come from?
export GPG_AGENT_INFO=~/.gnupg/S.gpg-agent:1489:1
GPG_TTY=$(tty)
export GPG_TTY
else
echo "Starting gpg-agent daemon"
eval $(gpg-agent --daemon)
fi
Not sure when this happened, but running gpg-agent as per readme:
Despite the fact that this is an obsolete option, the previously generated .gpg-agent-info file does work and does seem to be necessary.
i.e.
vs
Also, the
use-standard-socket
option is obsolete:For now, until I can figure out how to use this newer version of gpg-agent, I've just got this in my bashrc: