Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git克隆ssh访问windows驱动器_Git_Ssh_Clone - Fatal编程技术网

Git克隆ssh访问windows驱动器

Git克隆ssh访问windows驱动器,git,ssh,clone,Git,Ssh,Clone,我需要克隆驻留在windows server上的git项目d:\GitRepos\test.git。 我在服务器上的Administrator下通过ssh登录d:\cygwin\home\Administrator\t2.git 当我从本地进行git克隆时: git clone ssh://Administrator@host.com/~/t2.git ./t2.git ==> this is ok 如何克隆驻留在d:\GitRepos\test.git上的test.git 我试过: g

我需要克隆驻留在windows server上的git项目
d:\GitRepos\test.git
。 我在服务器上的Administrator下通过ssh登录
d:\cygwin\home\Administrator\t2.git

当我从本地进行git克隆时:

git clone ssh://Administrator@host.com/~/t2.git ./t2.git ==> this is ok
如何克隆驻留在
d:\GitRepos\test.git
上的test.git

我试过:

git clone ssh://Administrator@host.com/d/GitRepos/test.git ./test.git ==>fail
git clone ssh://Administrator@host.com/cygdrive/d/GitRepos/test.git ./test.git ==>fail
有什么建议吗

无所谓: 我可以使用

git clone ssh://Administrator@host.com/../../GitRepos/test.git ./test.git

如果您的管理主页有两个文件夹深。

假设服务器在cygwin中运行sshd,您需要使用cygwin映射,将windows驱动器映射到cygwin/unix文件空间,通常是
/cygdrive/d
d:\

所以你应该可以去

git clone ssh://Administrator@host.com/cygdrive/d/GitRepos/test.git test.git

尝试了git克隆ssh://Administrator@host.com/cygdrive/d/GitRepos/test.git test.git,但仍然不好。