Git Error: returned request error: 504 Gateway timeout while accessing http: //

I am using the VM provided by my company internal area (KVM) - RHEL 6.4.

I can clone external repositories from the Internet. However, I cannot figure out how to clone the internal repositories on my corporate intranet.

At first, I did not set http_proxy or https_proxy and got this error:

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

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

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

I can clone this repo search from my laptop, not VM

Any ideas on where I should look?

Thanks.

+6
source share
2 answers

use this in the .gitconfig file, then this problem will be solved.

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

OR git config --global http.proxy ''

+5
source

The 504 status is most likely because you are trying to access the internal server through a proxy server, so I don’t think you should install a proxy server, but instead focus on the 401 status, as this most likely happens from the server which hosts the repositories.

  • Do you have anonymous access to internal repositories?

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

  • Do you have credentials stored on your laptop?

+3
source

All Articles