我想通過克隆工作桌面上存在的git存儲庫到我的筆記本電腦,在家工作。這兩個系統都在cygwin shell中運行msysgit。這兩個系統都使用cygwin的ssh。'X'似乎不是git倉庫(我敢肯定路徑是正確的)
如果我ssh到該服務器,我可以看到倉庫處的路徑/ cygdrive/d /項目/ TheProject
$ ssh TheDesktop
[email protected]'s password: ...I enter the password, see the MOTD, and I'm in...
$ cd /cygdrive/d/Projects/TheProject
...See the git repository here. Even see the current branch in the prompt...
但我嘗試克隆和失敗:
$ git clone ssh://TheDesktop/cygdrive/d/Projects/TheProject
Cloning into TheProject
[email protected]'s password: ...I enter the password...
fatal: '/cygdrive/d/Projects/TheProject' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
我也試着將系統信息庫符號鏈接到我的個人文件夾:
$ ssh TheDesktop
[email protected]'s password: ...I enter the password...
$ ln -s /cygdrive/d/Projects/TheProject .
$ exit
$ git clone ssh://TheDesktop/~/TheProject
Cloning into TheProject
[email protected]'s password: ...I enter the password...
fatal: '/cygdrive/d/Projects/TheProject' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
我當然在很多問題上看到這個錯誤在這裏,他們幾乎總是關係到一條糟糕的道路。但我確定我的路徑是正確的。我感覺到它與桌面上的環境有關,但我真的無法弄清楚什麼。還有什麼其他的東西會導致這個錯誤
更多疑難解答提示 – sehe 2011-04-20 15:48:03
我需要使用D:/ Projects/TheProject路徑而不是cygwin ssh路徑。非常感謝你! – 2011-04-20 15:54:14
很高興幫助(我很快就可以使用這些知識!) – sehe 2011-04-20 16:14:39