Description of problem: When using git to create a GPG-signed tag, git does not use gpg-agent running with the standard socket (--use-standard-socket) which is now the default instead of setting GPG_AGENT_INFO from the environment. Alternate description: git should use /usr/bin/gpg2 instead of /usr/bin/gpg by default Version-Release number of selected component (if applicable): git-2.5.0-4.fc23.x86_64 gnupg-1.4.20-1.fc23.x86_64 gnupg2-2.1.9-1.fc23.x86_64 How reproducible: 100% Steps to Reproduce: 1. git tag -s -m example mytag HEAD # from any git repo Actual results: The following message appears, followed by a prompt to gpg: gpg-agent is not available in this session Enter passphrase: Expected results: git should use the key in the gpg-agent (triggering Gnome's pinentry program, if not already cached or if passphrase isn't already stored in gnome-keyring) Additional info: Since gpg2 now uses the standard socket by default, the agent no longer sets the GPG_AGENT_INFO environment variable. However, that is still required by gpg 1.4.20 and git appears to use /usr/bin/gpg explicitly, rather than /usr/bin/gpg2
One workaround is to do something like this in your .bashrc (tested and works): gpid="$(pgrep -U "$USER" gpg-agent | head -1 && return "${PIPESTATUS[0]}")" && export GPG_AGENT_INFO=$HOME/.gnupg/S.gpg-agent:$gpid:1 Another workaround might be for the user to specify the gpg.program in their ~/.gitconfig (haven't tested this)
Just tested gpg config --global gpg.program gpg2 and gpg config --global gpg.program /usr/bin/gpg2 and both work.
Yes, this workround is recommended. *** This bug has been marked as a duplicate of bug 568406 ***
Confirmed this works. Though not the above command should be 'git config' instead of 'gpg config'.
(In reply to Milan Bouchet-Valat from comment #4) > Confirmed this works. Though not the above command should be 'git config' > instead of 'gpg config'. Oh geez, you're right. That's a typo.
A nice typo :-) I haven't seen it till now :-)