2011-04-12 227 views
1

我已经在远程服务器上的git repo。我有ssh访问这台服务器。当我尝试用命令git clone ssh://[email protected]_addres:9022/repo.git克隆回购时,我无法克隆它。出现的错误是 git clone ssh://[email protected]_address:9022/repo.git Cloning into repo... fatal: '/repo.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly Git远程克隆

回答

1

如果您使用名称login登录该计算机并执行cd /repo.git,您会得到什么?

你可能缺少仓库路径...

+0

当我输入'git:// ip_addres/repo.git'时,一切都很好。 – 2011-04-12 20:15:05

+1

据我记得'git:'的默认端口是'9418'。另一方面,'git:'不是'ssh:'而是其他协议,所以你可以确定你的服务器已经启动并运行了一个ssh服务器,并且它监听你的首选端口'9022'(默认为ssh '22')?试试'ssh nick @ ip_adress:9022' – KingCrunch 2011-04-12 20:21:23

+0

我尝试'ssh nick @ ip_adress:9022'并开始工作。 – 2011-04-12 20:23:24

1

只是一个(合法的;))猜

git clone ssh://[email protected]_adress:9022/~nick/repo.git 

这是@Matthieu答案的结果。我不假设,你的服务器的根目录下有一个目录repo.git。这个答案预计,回购是在'尼克的家。

+0

没有问题是一样的。 – 2011-04-12 20:17:45