通过 https 代理使用命令“git clone https://github.com/user/project.git ”时超时。
我之前已经成功地让 git 在代理后面运行,并且已经阅读了与 git 和代理使用相关的其他 stackoverflow。现在,我已在当前组织的主机上将其配置为使用非身份验证代理,但它已超时。
- 代理是 squid,非身份验证
- 不能通过 TCP-443 直接连接
- 我已经确认 git 正在联系代理
- Git 发出命令“CONNECT github.com:443 HTTP/1.1”
- 代理允许请求并在端口 443 上连接到 github.com
- libcurl 验证 github 的证书并建立 SSL 连接 (SSL_RSA_WITH_RC4_128_SHA)
- git 继续坐在那里,等待从未发生过的事情
- 发生超时
有谁之前经历过这个吗?有什么提示吗?
这是系统版本:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
这是 git 版本和更新信息(RH 中最新可用)
$ git --version
git version 1.7.11.3
$ sudo yum check-update git
Loaded plugins: downloadonly, rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
以下是相关的环境变量:
$ export | grep http
declare -x http_proxy="http://proxy.hostname:3128/"
declare -x https_proxy="http://proxy.hostname:3128/"
这是我的 .gitconfig (用于冗余):
$ cat ~/.gitconfig
[http]
proxy = http://proxy.hostname:3128/
[https]
proxy = http://proxy.hostname:3128/
这是 git 运行的示例(并最终超时):
$ GIT_CURL_VERBOSE=1 GIT_DEBUG_LOOKUP=1 GIT_TRANSLOOP_DEBUG=1 GIT_TRANSPORT_HELPER_DEBUG=1 git clone https://github.com/user/project.git 2>&1
Cloning into 'project'...
Debug: Remote helper: -> capabilities
Debug: Remote helper: Waiting...
Debug: Remote helper: <- fetch
Debug: Got cap fetch
Debug: Remote helper: Waiting...
Debug: Remote helper: <- option
Debug: Got cap option
Debug: Remote helper: Waiting...
Debug: Remote helper: <- push
Debug: Got cap push
Debug: Remote helper: Waiting...
Debug: Remote helper: <-
Debug: Capabilities complete.
Debug: Remote helper: Waiting...
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy proxy.hostname 3128 (#0)
* Trying 10.22.74.73... * Connected to proxy.hostname (x.x.x.x) port 3128 (#0)
* Establish HTTP proxy tunnel to github.com:443
> CONNECT github.com:443 HTTP/1.1
Host: github.com:443
User-Agent: git/1.7.11.3
Proxy-Connection: Keep-Alive
Pragma: no-cache
< HTTP/1.0 200 Connection established
<
* Proxy replied OK to CONNECT request
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using SSL_RSA_WITH_RC4_128_SHA
* Server certificate:
* subject: CN=github.com,O="GitHub, Inc.",L=San Francisco,ST=California,C=US,serialNumber=C3268102,incorporationState=California,incorporationCountry=US,businessCategory=Private Organization
* start date: May 27 00:00:00 2011 GMT
* expire date: Jul 29 12:00:00 2013 GMT
* common name: github.com
* issuer: CN=DigiCert High Assurance EV CA-1,OU=www.digicert.com,O=DigiCert Inc,C=US
* Connected to proxy.hostname (x.x.x.x) port 3128 (#0)
这是鱿鱼日志:
1367957877.701 60148 x.x.x.x TCP_MISS/200 3765 CONNECT github.com:443 - DIRECT/204.232.175.90 -
那么,这里发生了什么?有没有人有任何想法?