首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git克隆ssh访问windows驱动器

Git克隆ssh访问windows驱动器
EN

Stack Overflow用户
提问于 2012-05-18 12:17:40
回答 1查看 624关注 0票数 1

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

当我从本地克隆git时:

代码语言:javascript
复制
git clone ssh://Administrator@host.com/~/t2.git ./t2.git ==> this is ok

如何克隆驻留在d:\GitRepos\test.git上的test.git

我试过了:

代码语言:javascript
复制
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

有什么建议吗?

不要紧:我可以用以下命令访问它

代码语言:javascript
复制
git clone ssh://Administrator@host.com/../../GitRepos/test.git ./test.git

假设您的管理员主页有2个文件夹深度。

EN

回答 1

Stack Overflow用户

发布于 2012-05-18 12:23:08

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

所以你应该可以去

代码语言:javascript
复制
git clone ssh://Administrator@host.com/cygdrive/d/GitRepos/test.git test.git
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10646650

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档