Lệnh "git clone https://github.com/user/project.git" hết thời gian khi được sử dụng thông qua proxy https.git clone hết thời gian khi được sử dụng thông qua https proxy
Tôi đã thực hiện thành công chức năng git đằng sau proxy trước đó và đã đọc luồng stackover khác liên quan đến việc sử dụng git và proxy. Bây giờ tôi đã cấu hình nó trên một máy chủ trong tổ chức hiện tại của tôi để sử dụng một proxy không xác thực, nhưng nó đã hết thời gian.
- proxy là mực, không chứng thực
- kết nối trực tiếp thông qua giao thức TCP-443 không phải là một lựa chọn
- Tôi xác nhận rằng git được liên hệ với proxy
- Git hành lệnh "CONNECT github .com: 443 HTTP/1.1"
- Proxy cho phép các yêu cầu và kết nối với github.com trên cổng 443
- libcurl xác minh cert github và thiết lập một kết nối SSL (SSL_RSA_WITH_RC4_128_SHA)
- git tiền thu được để ngồi ở đó, chờ đợi một cái gì đó mà không bao giờ xảy ra
- timeout xảy ra
Có ai có kinh nghiệm này trước đây chưa? Có lời khuyên nào không?
Đây là phiên bản hệ điều:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Dưới đây là phiên bản git và cập nhật thông tin (mới nhất có sẵn trong 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.
Dưới đây là các biến môi trường có liên quan:
$ export | grep http
declare -x http_proxy="http://proxy.hostname:3128/"
declare -x https_proxy="http://proxy.hostname:3128/"
Dưới đây là my .gitconfig (để dự phòng):
$ cat ~/.gitconfig
[http]
proxy = http://proxy.hostname:3128/
[https]
proxy = http://proxy.hostname:3128/
Dưới đây là một ví dụ về git chạy (và cuối cùng thời gian ra ngoài):
$ 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)
Dưới đây là các bản ghi mực:
1367957877.701 60148 x.x.x.x TCP_MISS/200 3765 CONNECT github.com:443 - DIRECT/204.232.175.90 -
Vì vậy, những gì đang xảy ra ở đây? Có ai có ý tưởng nào?
bạn có thể dán đầu ra của 'ssh -vT git @ github.com' không? –
Bạn cũng có thể kiểm tra bài đăng tuyệt vời từ @AmirHD tại đây: http://stackoverflow.com/a/21820716/1049572 – Neonigma