2016-04-29 26 views
18

尝试使用GitHub的桌面和获得提交我的变化是:Git的枢纽桌面Mac上,错误:无法运行GPG:没有这样的文件或目录

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.

+0

当你看到来自GitHub桌面的这个错误时,'git status'会显示你什么? –

+0

显示所有更改,我只是试图设置MAC并得到这个麻烦之前使用Win操作系统... –

+0

您在Mac上配置GitHub桌面? –

回答

31

解决了它。

因此,作为GitHub的桌面在抱怨不能够找到GPG(我已经通过自制软件安装),我想应该有办法让Git GPG的确切路径,原来有:

gpg.program Use 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 - https://git-scm.com/docs/git-config

所以运行下面的解决了这个问题:

git config --global gpg.program $(which gpg) 

GitHub的回来对我说,有些用户还需要使用:

echo "no-tty" >> ~/.gnupg/gpg.conf 
+1

也通过https://github.com/isaacs/github/issues/675进行了追踪 – balupton

相关问题