2012-05-18 65 views
1

我需要克隆駐留在Windows服務器d:\GitRepos\test.git上的Git項目。 我通過ssh在管理員服務器d:\cygwin\home\Administrator\t2.gitGit克隆SSH訪問Windows驅動器

在登錄時我做混帳克隆從我的地方:

git clone ssh://[email protected]/~/t2.git ./t2.git ==> this is ok 

我怎麼能克隆test.git駐留在d:\GitRepos\test.git

我已經試過:

git clone ssh://[email protected]/d/GitRepos/test.git ./test.git ==>fail 
git clone ssh://[email protected]/cygdrive/d/GitRepos/test.git ./test.git ==>fail 

任何建議嗎?

沒關係: 我可以

git clone ssh://[email protected]/../../GitRepos/test.git ./test.git 

訪問它提供您的聯繫家是2個文件夾深。

回答

0

假設服務器在cygwin中運行sshd,您需要使用將Windows驅動器映射到cygwin/unix文件空間的cygwin映射,通常爲/cygdrive/dD:\

,所以你應該能夠去

git clone ssh://[email protected]/cygdrive/d/GitRepos/test.git test.git 
+0

試過混帳克隆SSH://[email protected]/cygdrive/d/GitRepos/test.git test.git, 但仍然沒有好。 –

+0

取而代之的是什麼? –