Git错误:请求的URL返回错误:504访问http://时的网关超时

Mat*_*sen 16 git http-status-code-504

我正在使用由我公司的内部云(KVM) - RHEL 6.4配置的VM.

我能够从互联网克隆外部存储库.然而,我无法弄清楚如何在我公司的内部网上克隆内部存储库.

起初我没有设置http_proxyhttps_proxy收到此错误:

error: The requested URL returned error: 401 Authorization Required while accessing http://....
Run Code Online (Sandbox Code Playgroud)

设置完成后http_proxyhttps_proxy,我现在正在等待约60秒后收到此错误:

error: The requested URL returned error: 504 Gateway Timeout while accessing http://...
Run Code Online (Sandbox Code Playgroud)

我可以从我的笔记本电脑克隆这个repo find,而不是VM

关于我应该在哪里看的任何想法?

谢谢.

小智 16

在.gitconfig文件中使用此功能,然后此问题将得到解决.

- [http]
     proxy = http://127.0.0.1:8087
     sslVerify = false
Run Code Online (Sandbox Code Playgroud)

要么 git config --global http.proxy ''

  • 它对我有用:或者git config --global http.proxy''谢谢 (3认同)
  • “git config --global --unset http.proxy”命令对我有用。 (3认同)

Ran*_*niz 5

504 状态很可能是因为您尝试通过代理访问内部服务器,因此我认为您不应该设置代理,而是应该关注 401 状态,因为这很可能来自托管存储库的服务器。

  • 您可以匿名访问内部存储库吗?

  • 您是否以相同的方式克隆它们,即在笔记本电脑和服务器上都使用 HTTP,还是在笔记本电脑上使用 SSH,在服务器上使用 HTTP?

  • 您的笔记本电脑上是否存储了任何凭据?