簡體   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