Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the binary that Git uses to invoke GnuPG for signing commits?

Tags:

git

gnupg

I'm signing my commits in Git using GnuPG. I'd prefer it greatly if Git would use /usr/bin/gpg2 rather than /usr/bin/gpg for signing commits for some compatibility reasons.

Is there a Git configuration setting which will allow me to set which GnuPG binary to use during signing? I haven't been able to find one.

like image 265
Naftuli Kay Avatar asked Jul 14 '16 05:07

Naftuli Kay


1 Answers

You could try and set the right config:

 git config gpg.program gpg2

From git config man page:

Use this custom program instead of "gpg" found on $PATH when making or verifying a PGP signature.

like image 63
VonC Avatar answered Oct 19 '22 23:10

VonC