2012-04-20 16 views
8

我有一個奇怪的問題。我使用TortoiseGIT(Win7)和我的倉庫放在vritual服務器(Debian)上,在那裏我使用gitolite和SSH密鑰。拉不工作 - Debian + gitolite上的TortoiseGIT/Windows 7/GIT

我可以clone庫到我的電腦,我可以運行FetchPushCommitSync ..一切,但試圖從Pull服務器Pushed其他貢獻者的變化時,出現以下錯誤:

git.exe pull -v --progress  "origin" 
fatal: 'pull' appears to be a git command, but we were not 
able to execute it. Maybe git-pull is broken? 
git did not exit cleanly (exit code 128) 

我不明白,爲什麼只是pull命令不工作..感謝您的任何幫助。

我可以製作存儲庫的克隆,並提供更改..但不能Pull對我在PC上創建的存儲庫的更改。

回答

1

錯誤消息有很大關係到Git的,和來自help.c

static const char bad_interpreter_advice[] = 
    N_("'%s' appears to be a git command, but we were not\n" 
    "able to execute it. Maybe git-%s is broken?"); 

,這類似issue 40(另一個界面,這裏terminal-ide)。

在這種情況下,這是由於所述遠程GIT中的安裝,這是不全

Comments 3 of issue 19

GIT中合併也從安裝缺失的,可以固定

$> ln -s git git-merge 

in system/bin/

的分辨率可能不準確你的情況是相同的,但它可能與一個錯誤的Git安裝。

+0

感謝您的回覆。我在虛擬服務器上做的唯一事情就是componen更新(也許它有幫助)。現在它工作正常。我不知道是什麼問題,但我真的很感謝你的幫助。我將爲未來保存你的答案。 – arnie 2012-07-24 08:36:32

2

卸載舊的Git並重新安裝最新版本爲我解決了這個問題。

下面是安裝程序的鏈接 Link to get installers

我確切的錯誤信息被

C:\Program Files (x86)\Git/libexec/git-core\git-pull: line 304: exec: git-merge: not found 
fatal: 'pull' appears to be a git command, but we were not 
able to execute it. Maybe git-pull is broken? 
13

我改變的git bash可執行文件sh.exe爲始終以管理員身份運行(後遇到了同樣的問題繞過另一個問題)。然後,它在某些情況下讓git無法訪問它,並導致各種「也許git- *被破壞?」錯誤。也許這可能會幫助別人......

+0

我不能夠感謝你!這是一個非常不明顯的解決方案,您的答案可能會節省我幾個小時。即使重新安裝msysgit也無濟於事,即使可執行文件本身已被刪除,Windows顯然仍然堅持這一設置。 – sundar 2013-08-29 20:07:50

+0

我認爲這個錯誤信息可能有許多父親,但你的答案爲我解決了它。只是想確保這個答案對那些陷入同一個陷阱中的人來說很重要。 此外,它發生在我的Git擴展中,而不是TortoiseGit – EatATaco 2013-12-04 21:22:02

+1

+1這就是答案。 – fiberOptics 2014-08-27 04:56:34

0

我看到你可以運行「git fetch」。如果你也可以運行「git merge」,運行序列「git fetch」後跟「git merge」將完成與「git pull」相同的操作。

來源: http://git-scm.com/docs/git-pull

+1

運行'git config --global merge.defaultToUpstream true'來模仿'git pull'的行爲 – 2014-08-18 09:11:15

+0

+1更清潔 – CW0lf 2014-10-28 19:44:16