【问题标题】:Cloning git repository Failure克隆 git 存储库失败
【发布时间】:2019-09-21 19:51:01
【问题描述】:

当我尝试从存储库克隆以下内容时:

git clone git://gitorious.org/qt/qt5.git qt5

我收到此错误:

fatal: Unable to look up gitorious.org (port 9418) (This is usually a temporary error         during hostname resolution and means that the local server did not receive a response from an authoritative server. )

有什么问题?

我的网络使用代理的另一件事,我已经设置了它:

 git config --global http.proxy http://192.168.0.7:8080

【问题讨论】:

  • 为我工作。还有为什么它被标记为github
  • 如果你通过代理,很可能你不通过代理就不能与外界建立连接,而且这个代理只支持 HTTP/HTTPS 请求(不支持 GIT)。所以你可能应该使用网址:https://git.gitorious.org/qt/qt5.git
  • 我很确定是因为设置了代理,因为我已经在没有代理服务器的地方测试了它并且它可以工作,那么为git设置代理的正确方法是什么?!跨度>
  • 试试这个git config --global url.https://github.com/.insteadOf git://github.com/

标签: git url git-clone


【解决方案1】:

首先尝试使用 https 地址,而不是 git 地址(需要特殊端口)

https://git.gitorious.org/qt/qt5.git

替代方案可能很复杂(如ssh port forwarding

【讨论】: