-->

Change the binary that Git uses to invoke GnuPG fo

2020-06-16 11:22发布

问题:

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.

回答1:

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.



标签: git gnupg