Git、ssh、Cygwin 以及 Cygdrive 安装文件夹之外的文件夹
我在获取远程计算机上 C:/ 驱动器上的文件时遇到了麻烦。 如果项目位于 Cygwin 安装文件夹下,我可以克隆它们。 但如果我的真实项目位于“/cygdrive/c/myproject/git/export”之类的地方,我就无法进行任何操作?
下面的行中获取任何内容
所以我无法从“ssh://user@remote/cygdrive/c/myproject/git/export”
,但这可以工作(用于测试)
“ssh://user@remote/myproject/export”
我会真的很感谢一些帮助。 我在这上面浪费了很多时间。 两台计算机都成功地使用了 Cygwin+SSH+Git,除了尝试从非 Cygwin 默认文件夹中拉取、克隆项目之外
I am having terrible time getting files that reside on C:/ drive on remote computer. I can clone projects if they are under Cygwin installation folder. But I cannot get anything going with my real projects if they reside in something like "/cygdrive/c/myproject/git/export"?
So I cannot get anything from the line below
"ssh://user@remote/cygdrive/c/myproject/git/export"
But this works (for test)
"ssh://user@remote/myproject/export"
I would really appreciate some help. I wasted quite a bit of time on this.
Both computers use Cygwin+SSH+Git successfully inside out except trying to pull, clone projects from non Cygwin default folders
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先(当你经常连接到远程 cygwin 时,这种方法很有用)
您可以通过 regedit (请参阅键 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2)或通过实用程序创建类似 UNIX 的映射
挂载[>]
使用 cygpath.exe 根据 Windows 路径规范发现路径。
至少你总是可以使用带有引号“c:\myproject”的直接获胜路径的符号
此外,你也可能遇到权限问题,这就是为什么 ssh 不允许你获取
/cygdrive/c 的内容
First of all(this way useful when you will connect to remote cygwin often)
you can create unix-like mapping either by regedit (see key HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2) or by utility
mount [<win32path> <posixpath>]
Use cygpath.exe to discover path by windows path specification.
At least you can always use notation with direct win path framed by quotes "c:\myproject"
Also it is possible that you have problems with permission, that is why ssh doesn't allow you get content of
/cygdrive/c