Keychain and GnuPG >= 2.1
A while ago, I started using keychain to manage my ssh and gpg agents. I did this with the following in my
# Start ssh-agent eval $(keychain --quiet --eval id_rsa)
Unfortunately, tools like keychain don't know about that and still expect it to be set, leading to some annoying breakage.
My fix is a quick and dirty one; I appended the following to
export GPG_AGENT_INFO=~/.gnupg/S.gpg-agent:$(pidof gpg-agent):1