更改Git用来调用GnuPG进行签名提交的二进制文件? [英] Change the binary that Git uses to invoke GnuPG for signing commits?
本文介绍了更改Git用来调用GnuPG进行签名提交的二进制文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用GnuPG在Git中签名我的提交.如果出于某些兼容性原因,如果Git使用/usr/bin/gpg2
而不是/usr/bin/gpg
来签署提交,我会更喜欢它.
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.
是否有一个Git配置设置,可以让我设置在签名期间使用哪个GnuPG二进制文件?我找不到一个.
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.
推荐答案
您可以尝试设置正确的配置:
You could try and set the right config:
git config gpg.program gpg2
来自 git config
手册页:
在制作或验证PGP签名时,请使用此自定义程序代替在
$PATH
上找到的"gpg
".
Use this custom program instead of "
gpg
" found on$PATH
when making or verifying a PGP signature.
这篇关于更改Git用来调用GnuPG进行签名提交的二进制文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文