Git does not ask me for gpg passphrase and fails my commit

If you are using OSX. It seems like a gpg update (of brew) changed to location of gpg to gpg1, you can change the binary where git looks up the gpg:

git config --global gpg.program gpg1

See this medium blog post.


It stopped prompting me, so I had to kill the daemon

ps aux | grep gpg
mark              3129   0.0  0.0  4397952    820   ??  Ss    8Mar19   0:28.84 gpg-agent --homedir /Users/Mark/.gnupg --use-standard-socket --daemon
mark             18137   0.0  0.0  4286492    848 s000  R+    3:43pm   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn gpg

then

sudo kill -9 3129

Then it worked. It may be a slightly different issue.


I had the similar thing. I had the gpg and gpg2 binaries, both pointing to GPG version 2.0.30. I wasn't being prompted for my passphrase.

In your bash profile (I did it in my .zshrc file) add the following line:

export GPG_TTY=$(tty)

Tags:

Git

Gnupg