The following should allow you to perform signed git actions without having to input your passphrase everytime (These steps are for OSX)
-
Install GPG tools
-
Uncomment line 199 in ~/.gnupg/gpg.conf that reads
use-agent -
Add the following to your bash profile
[ -f ~/.gpg-agent-info ] && source ~/.gpg-agent-info
if [ -S "${GPG_AGENT_INFO%%:*}" ]; then
export GPG_AGENT_INFO
else
eval $( gpg-agent --daemon --write-env-file ~/.gpg-agent-info )
fi
export GPG_TTY=`tty`-
Do a signed git commit and enter your GPG passphrase when prompted
git commit --gpg-sign -m "q" -
Do a git stash, if requested enter your GPG passphrase
-
Optional: set global signing key
git config --global user.signingkey <Your key ID>
to default signing all commits across all projects:
git config --global commit.gpgsign true