Ant*_*ack 2 git gnupg git-commit
每当我尝试通过命令行提交更改时,我都会收到此错误消息:
error: cannot spawn gpg2: No such file or directory
Run Code Online (Sandbox Code Playgroud)
更新:我正在运行 Windows 10
(在 Windows 10 中使用 Github 桌面)
在如下链接中制作新的 gpg 之后,(我想签署我的承诺)
https://gist.github.com/BoGnY/f9b1be6393234537c3e247f33e74094a
在命令中,我可以毫无错误地使用git commit。
但是在桌面应用程序中,我遇到了同样的错误,并且设置 gpg 路径对我有用。(通过应用程序验证提交)
where gpg
Run Code Online (Sandbox Code Playgroud)
它会给出类似“C:\Program Files\Git\usr\bin\gpg.exe”的内容
并使用 git bash,试试这个命令
git config --global gpg.program "/c/Program Files/Git/usr/bin/gpg.exe"
Run Code Online (Sandbox Code Playgroud)
grg*_*grg -4
您可以通过设置为 false 来禁用 Git 中的 GPG 提交签名commit.gpgsign:
git config --global commit.gpgsign false
Run Code Online (Sandbox Code Playgroud)