我遇到了同样的问题,我通过以下步骤解决:
gpg --list-keys
gpgconf --kill gpg-agent
$ export GPG_TTY=$(tty)
$ echo "test" | gpg2 --clearsign
查看提交 b0b70d5,提交 fa47dd6(2022年3月4日)由Todd Zullinger(tmzullinger
)提交。
查看提交 a075e79(2022年3月4日)由Fabian Stelzer(FStelzer
)提交。
(由Junio C Hamano -- gitster
--合并于提交 21b839e,2022年3月13日)
gpg-interface/gpgsm
:v2.3修复协助者:Junio C Hamano
协助者:Todd Zullinger
Checking if signing was successful will now accept '[GNUPG]:
SIG_CREATED
' on the beginning of the first or any subsequent line.
Not just explictly the second one anymore.Gpgsm v2.3 changed its output when listing keys from
fingerprint
tosha1/2 fpr
.
This leads to the gpgsm tests silently not being executed because of a failed prerequisite.
Switch to gpg's--with-colons
output format when evaluating test prerequisites to make parsing more robust.
This also allows us to combine the existinggrep
/cut
/tr
/echo
pipe for writing thetrustlist.txt
into a singleawk
expression.
git merge --no-ff -m msg signed_tag_x509_nokey && GNUPGHOME=. git log --graph --show-signature -n1 plain-x509-nokey
我已经在我的Windows PC上安装了GPG,gpg --list-keys
可以成功地列出我的密钥在Git Bash中(而不是标准的Windows命令行),然而,GitHub Desktop对我来说无法工作。
解决方案是将Git的GPG二进制文件添加到我的PATH变量中。所以我将C:\Program Files\Git\usr\bin
添加到了PATH中,然后GitHub Desktop开始工作。
注意:如果你在电脑上安装了Git,你很可能已经在这个路径下安装了GPG:C:\Program Files\Git\usr\bin\gpg.exe
。
GIT_TRACE=1 git commit -S -m 'test'
命令,Git 是否会显示有关 GnuPG 调用的确切信息? - Nickolay Olshevsky