使用 ssh 进行 Git 克隆 - 找不到存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2433049/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git clone using ssh - can't find repository
提问by Steve
I'm trying to setup a Git server on Windows 7, using CopSsh, PuTTY and msysgit. I'm having problems cloning a repository using ssh.
我正在尝试使用 CopSsh、PuTTY 和 msysgit 在 Windows 7 上设置 Git 服务器。我在使用 ssh 克隆存储库时遇到问题。
If I use a regular directory path, it works:
如果我使用常规目录路径,它可以工作:
$ git clone ~/vc/git/depot/test.git/ /c/dev/es/app
Initialized empty Git repository in c:/dev/es/app/.git/
warning: You appear to have cloned an empty repository.
Ssh, doesn't work. I've tried an different paths without success.
ssh,不起作用。我尝试了不同的路径但没有成功。
$ git clone ssh://steve@test:4837/~/vc/git/depot/test.git/ /c/dev/es/app
Initialized empty Git repository in c:/dev/es/app/.git/
fatal: '~/vc/git/depot/eastApp.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
I followed the instructions from here: http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/
我按照这里的说明进行操作:http: //www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/
Any clues?
有什么线索吗?
回答by Steve
I got the path wrong...
我走错路了...
git clone "ssh://steve@test:4837/Program Files (x86)/ICW/home/steve/vc/git/depo/test.git"
/c/dev/es/app/
worked.
工作。