2016-04-29 28 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

相關問題