Git:连接后从代理收到HTTP代码503

Git:连接后从代理收到HTTP代码503,git,intellij-idea,proxy,atlassian-sourcetree,http-status-code-503,Git,Intellij Idea,Proxy,Atlassian Sourcetree,Http Status Code 503,我查看了很多与这个问题相关的帖子,但似乎没有任何东西能解决我的问题。所以现在我希望你们能给我一个神奇的答案 我正在使用Intellij(但也尝试使用SourceTree)从Fisheye中拉/推/克隆存储库。但是,我收到了错误: git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin fatal: unable to access 'https://myUser@myUrl/fisheye/git/myRepo

我查看了很多与这个问题相关的帖子,但似乎没有任何东西能解决我的问题。所以现在我希望你们能给我一个神奇的答案

我正在使用Intellij(但也尝试使用SourceTree)从Fisheye中拉/推/克隆存储库。但是,我收到了错误:

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
关于503的提示意味着由于维护导致的临时停机对我来说不起作用,因为这个问题持续了一周

关于错误/缺少代理设置的提示似乎也不起作用。我为system git和IDE(Intellij)设置了http和https代理

它以前工作过,我能够克隆存储库。然后我创建了一个新的分支,进行了一些更改,并希望将其推回到主分支

我真的很期待一些聪明的建议

谢谢你

更新

我补充说:

export GIT\u TRACE\u PACKET=1
export GIT\u TRACE=1
export GIT\u CURL\u VERBOSE=1

我收到了以下日志:

$ 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
$git fetch
跟踪:内置:git'fetch'
跟踪:运行命令:“git远程https”“源”https://Username@myWebService.de/randomGit.git/'
*在_netrc文件中找不到主机myWebService;使用默认值
*正在尝试15.46.16.11。。。
*已连接到myProxy.com(15.46.16.11)端口8080(#0)
*建立到myWebService的HTTP代理隧道。de:443
>connectmywebservice.de:443http/1.1
主持人:webapp entw.mlp.de:443
用户代理:git/1.9.5.msysgit.1
代理连接:保持活动状态
Pragma:没有缓存
我有同样的错误代码。对我来说,症状是我可以成功推动远程回购,但不能拉。。。就我而言,这似乎是一个名称解析问题

首先,我发现这些设置可以更清楚地了解网络事件

export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
通过这些设置,我收到了如下跟踪:

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
在本例中,只需将“www.”添加到源URL即可解决我的连接问题。没有更多的503——推拉都成功了

更新


根据您更新的跟踪,这看起来与我遇到的问题非常相似。您可以尝试暂时替换您正在使用的存储库服务器的实际IP地址(而不是主机名)。如果可行,那么研究名称解析的解决方案,比如修改/etc/hosts。另外,您能否确认您尝试过git remote set url origin以包含完整的主机名而不仅仅是域名?

我发现我的代理无法识别webapp地址,因此我安装了Privoxy,并告诉他传递所有请求,除了那些针对我git的请求。它是有效的


因此,如果我必须连接到存储库,我会跳过代理直接连接

你能显示
git remote-v
的输出吗?
origin https://[myUser]@[myGit].git(fetch)
origin https://[myUser]@[myGit].git(push)
所以我应该把
origin https://[myUser]@[myGit].git
改为
originhttps://www.[myUser]@[myGit].git(推送)
?所以我添加了
export GIT\u TRACE\u PACKET=1
git remote set-url origin https://www.github.com/USERNAME/REPO