From Void Linux Wiki
Jump to: navigation, search

Using gpg2 to sign commits with git

It is reccomended that you use gpg2 instead of gpg1 with git as gpg1 is being deprecated.

$ git config --global gpg.program /usr/bin/gpg2

If you are using gpg2, you have to define a pinentry program. First install one of: pinentry-emacs pinentry-gtk pinentry-qt

In your ~/.gnupg/gpg-agent.conf add your chosen pinentry program. For example, if I chose pinentry-gtk, I would add:

pinentry-program /usr/bin/pinentry-gtk-2