Received http Code 503 from Proxy After Connect

received HTTP code 503 from the proxy after CONNECT


I checked many posts related to this problem, but nothing seems to fix my problem. So now I hope you guys can give me a magical answer.

I am using Intellij (but also tried it with SourceTree) to pull / push / clone a repository from Fisheye. However, I am getting the error:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin

fatal: unable to access 'https://myUser@myUrl/fisheye/git/myRepo.git/': Received HTTP code 503 from proxy after CONNECT

The 503 hints means temporary downtime due to maintenance doesn't work for me as this problem has been going on for a week now.

Hints about wrong / missing proxy settings don't seem to work either. I have configured http and https proxies for the git system and for the IDE (Intellij).

This has worked before, I was able to clone the repository. Then I created a new branch, made some changes and wanted to check it back to master.

I'm really looking forward to some clever advice.


UPDATE

I added::

export GIT_TRACE_PACKET=1 export GIT_TRACE=1 export GIT_CURL_VERBOSE=1

and I got the following log :

$ git fetch
trace: built-in: git 'fetch'
trace: run_command: 'git-remote-https' 'origin' 'https://Username@myWebService.de/randomGit.git/'
* Couldn't find host myWebService in the _netrc file; using defaults
*   Trying 15.46.16.11...
* Connected to myProxy.com (15.46.16.11) port 8080 (#0)
* Establish HTTP proxy tunnel to myWebService.de:443
> CONNECT myWebService.de:443 HTTP/1.1
Host: webapp-entw.mlp.de:443
User-Agent: git/1.9.5.msysgit.1
Proxy-Connection: Keep-Alive
Pragma: no-cache

< HTTP/1.1 503 Service Unavailable
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: close
< Connection: close
< Content-Length: 732
<
* Received HTTP code 503 from proxy after CONNECT
* Closing connection 0
fatal: unable to access 'https://Username@myWebService.de/randomGit.git/': Received HTTP code 503 from proxy after CONNECT

I had the exact same error code. The symptom for me was that I could successfully push to a remote repo, but not pull ... In my case it turned out to be a name resolution issue.

First, I found these settings to shed more light on network events.

export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1

With these settings, I got a trace like this:

PROMPT$ git pull
...
15:21:17.015575 run-command.c:351       trace: run_command: 'git-remote-https' 'origin' 'https://gitub.com/USERNAME/REPO'
* Couldn't find host gitub.com in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
*   Trying PROXY-SERVER-IP-ADDRESS...
* Connected to (PROXY-SERVER-IP-ADDRESS) port 80 (#0)
* Establish HTTP proxy tunnel to gitub.com:443
> CONNECT gitub.com:443 HTTP/1.1
Host: gitub.com:443
User-Agent: git/2.3.2 (Apple Git-55)
Proxy-Connection: Keep-Alive
Pragma: no-cache

< HTTP/1.1 503 Service Unavailable
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: close
< Connection: close
< Content-Length: 787
< 
* Received HTTP code 503 from proxy after CONNECT
* Connection #0 to host PROXY-SERVER-IP-ADDRESS left intact
fatal: unable to access 'https://gitub.com/USERNAME/REPO/': Received HTTP code 503 from proxy after CONNECT

I made some calls to github.com, then www.github.com and noticed some other results. This prompted me to update my origin url as follows.

git remote set-url origin https://www.github.com/USERNAME/REPO

Simply adding "www." at origin url solved my connection problem in this case. No more 503-jerk and pulls both successes.

UPDATE

Based on your updated trace, this looks very similar to the problem I had. You can try to temporarily replace the actual IP address of the repository server you are using (not the hostname). If that works, then look at name resolution solutions like modifying / etc / hosts. also, can you confirm that you tried git remote set-url origin to include the fully qualified hostname, not just the domain name?


I found that my proxy does not recognize the address of the web application, so I installed Privoxy and told it to pass all requests except those intended for my git. And it works.

So if I need to connect to the repository, I skip the proxy and connect directly.