当前位置:  开发笔记 > 编程语言 > 正文

当通过https代理使用时,git clone超时

如何解决《当通过https代理使用时,gitclone超时》经验,为你挑选了0个好方法。

通过https代理使用时,命令"git clone https://github.com/user/project.git "超时.

我以前成功地在代理后面运行了git,并且已经阅读了与git和代理使用相关的其他stackoverflow.现在我已经在我当前组织的主机上配置它以使用非身份验证代理,但它已超时.

代理是鱿鱼,非认证

通过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 -

那么,这里发生了什么?有没有人有任何想法?

推荐阅读
U友50081205_653
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有