Git Error: The requested URL returned error: 504 Gateway Timeout while accessing http://

做~自己de王妃 提交于 2019-11-30 00:59:07

问题


I am using a VM provisioned by my company's internal cloud (KVM) - RHEL 6.4.

I am able to clone external repositories from the internet. Yet, I cannot figure out how to clone internal repositories on my company's intranet.

At first I didn't set the http_proxy or https_proxy and received this error:

error: The requested URL returned error: 401 Authorization Required while accessing http://....

After setting http_proxy and https_proxy, I now receive this error after waiting about 60 seconds:

error: The requested URL returned error: 504 Gateway Timeout while accessing http://...

I can clone this repo find from my laptop, just not the VM

Any ideas on where I should look?

Thanks.


回答1:


use this in .gitconfig file then this problem will resolved.

- [http]
     proxy = http://127.0.0.1:8087
     sslVerify = false

OR git config --global http.proxy ''




回答2:


The 504 status is most likely because you're trying to access an internal server through the proxy so I don't think you should set the proxy but instead focus on the 401 status since that most likely comes from the server hosting the repositories.

  • Do you have anonymous access to the internal repositories?

  • Are you cloning them in the same way, i.e. using HTTP on both your laptop and on the server, or are you using SSH on the laptop and HTTP on the server?

  • Do you have any credentials stored on your laptop?



来源:https://stackoverflow.com/questions/21085607/git-error-the-requested-url-returned-error-504-gateway-timeout-while-accessing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!