gpt4 book ai didi

macos - Mac 上的 Github 桌面,错误 : cannot run gpg: No such file or directory

转载 作者:行者123 更新时间:2023-12-03 09:19:16 25 4
gpt4 key购买 nike

尝试使用 GitHub Desktop 提交我的更改并获得以下信息:
enter image description here

error: cannot run gpg: No such file or directory

error: could not run gpg.

fatal: failed to write commit object(128)


首先,这也不适用于终端,我创建了 gpg-key 并插入了我的 GitHub 帐户
现在它在终端中运行良好,但桌面版仍然无法运行。

In Oficial doccumentation for GitHub Desktop i found some notation:

Note: GitHub Desktop does not support GPG signing.

最佳答案

解决了。
因此,当 GitHub Desktop 提示无法找到 gpg(我是通过自制软件安装的)时,我认为应该有一种方法可以告诉 git gpg 的确切路径,结果是:

gpg.programUse this custom program instead of "gpg" found on $PATH when making or verifying a PGP signature. The program must support the same command-line interface as GPG, namely, to verify a detached signature, "gpg --verify $file - <$signature" is run, and the program is expected to signal a good signature by exiting with code 0, and to generate an ASCII-armored detached signature, the standard input of "gpg -bsau $key" is fed with the contents to be signed, and the program is expected to send the result to its standard output.https://git-scm.com/docs/git-config


所以运行以下解决了这个问题:
git config --global gpg.program "$(which gpg)"
GitHub 回复我说有些用户也需要使用:
echo "no-tty" >> ~/.gnupg/gpg.conf

关于macos - Mac 上的 Github 桌面,错误 : cannot run gpg: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36941533/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com