Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Corporate Github behind proxy: Received HTTP code 503 from proxy after CONNECT

Tags:

I am trying to clone from a corporate git repo, but always receive this error message after a while:

fatal: unable to access URL: Received HTTP code 503 from proxy after CONNECT

I have the following .gitconfig file:

[https]
    sslVerify = false
    proxy = https://proxy.corpadderess:8080
[http]
    sslVerify = false
    proxy = http://proxy.corpadderess:8080  
like image 970
ben0it8 Avatar asked Jan 29 '17 16:01

ben0it8


3 Answers

If it is a corporate repo, you might want to ignore proxy settings. One possible solution to your problem is here:

  1. Ignore proxy: export no_proxy=YOUR_CORP_DOMAIN_ON_GITHUB, where the domain name might be in the form of github.acme.net

  2. Ignore SSL verification: git config --global http.sslVerify "false"

You could then clone the repo w/ git clone YOUR_HTTPS_CLONE_URL

like image 84
srctaha Avatar answered Sep 20 '22 01:09

srctaha


In my case I needed to disable both the proxy and authenticating SSL certificates, I don't really like this solution as it doesn't sit well with me - turning off verifying SSL certificates doesn't sound wise!

But here's the command I ran to get it to work:

git clone <addr of repo> --config http.proxy= --config http.sslVerify=false
like image 16
EM-Creations Avatar answered Sep 22 '22 01:09

EM-Creations


If you want to ignore proxy for a single git command you can use -c option, for example:

git clone http://[email protected]/repo.git --config http.proxy=

like image 11
Sadegh Soleimanpour Avatar answered Sep 22 '22 01:09

Sadegh Soleimanpour