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

梦想与她 提交于 2020-01-22 14:38:10

问题


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.



来源:https://stackoverflow.com/questions/38366490/change-the-binary-that-git-uses-to-invoke-gnupg-for-signing-commits

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!