2012-05-18 79 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

取而代之的是什么? –