1

我正在尝试通过 ssh 克隆一个远程 git repo。当我尝试 ssh 进入远程主机时,它会提示输入密码并且可以工作:

$ ssh gerry@5.12.221.37

但是,当我尝试克隆存储库时,它会出现此错误

$ git clone ssh://gerry@5.12.221.37:/home/gerry/gitrepos/Test.git
ssh: Could not resolve hostname 5.12.221.37:: nodename nor servname provided, or not known
fatal: The remote end hung up unexpectedly

没有任何网络问题,因为我什至可以远程登录到 5.12.221.37 端口 22。

我正在使用 mac osx 10.8,有谁知道我如何解决/解决这个问题?

4

1 回答 1

5

摆脱结肠:

git clone ssh://gerry@5.12.221.37/home/gerry/gitrepos/Test.git  

于 2012-11-11T22:03:58.410 回答