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

64,907

Solution 1

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

Solution 2

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

Solution 3

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=

Solution 4

you can add in your .gitconfig file for ignore your corporate proxy :

[http "http://proxy.corpadderess:8080"]
    sslVerify = false
    proxy =     

Solution 5

Even I had the similar problem while pushing my code changes into corporate gitlab after I set "HTTP_PROXY" and "HTTPS_PROXY" into my environment variable to use the proxy for accessing other sites that are blocked by the company. I ran the following command in Git Bash console to ignore the proxy before pushing the code and it worked for me.

export no_proxy=YOUR_CORP_DOMAIN_ON_GITLAB,

where the domain name might be in the form of gitlab.aptask.com (I didn't put any http:// or https://)

Share:
64,907

Related videos on Youtube

ben0it8
Author by

ben0it8

Updated on July 09, 2022

Comments

  • ben0it8
    ben0it8 almost 2 years

    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  
    
  • Brandon S
    Brandon S almost 6 years
    On Windows, the command is: set no_proxy=YOUR_CORP_DOMAIN_ON_GITHUB
  • Arka Mukherjee
    Arka Mukherjee over 2 years
    Excellent answer, still helps :)