繁体   English   中英

mac osx 10.8 ssh可以工作,但是git说无法解析主机名

[英]mac osx 10.8 ssh works but git says could not resolve hostname

我正在尝试通过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执行telnet。

我正在使用Mac OS X 10.8,有人知道如何解决/解决此问题吗?

摆脱冒号:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM