Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
git clone -v https://github.com/me/myproj
Cloning into 'myproj'...
<minutes pass>
error: Failed connect to github.com:443; Operation now in progress while accessing https://github.com/me/myproj.git/info/refs
fatal: HTTP request failed

I believe there is a problem with SSL certificates and have tried most of the solutions here: http://stackoverflow.com/questions/3777075/ssl-certificate-rejected-trying-to-access-github-over-https-behind-firewall (well, the ones that involve putting certificates in /etc/pki/tls/certs)

Is an SSL CA problem definitely the cause of this error? Any other solutions I can try? The server is RHEL 6.4.

More information

This is the result with GIT_CURL_VERBOSE=1, for a successful checkout from non-HTTPS github:

$ git clone http://github.com/stevage/tilemill-server
Cloning into 'tilemill-server'...
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy bproxy.xxx port 8080 (#0)
*   Trying 131.170.90.1... * Connected to bproxy.xxx (xxx) port 8080 (#0)
> GET http://github.com/stevage/tilemill-server/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.11.3
Host: github.com
Accept: */*
Proxy-Connection: Keep-Alive
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Mon, 09 Sep 2013 06:43:27 GMT
< Content-Type: application/x-git-upload-pack-advertisement
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< 
* Expire cleared
* Connection #0 to host bproxy.rmit.edu.au left intact
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy bproxy.xxx port 8080 (#0)
*   Trying xxx... * connected
* Connected to bproxy.xxx (xxx) port 8080 (#0)
> POST http://github.com/stevage/tilemill-server/git-upload-pack HTTP/1.1
User-Agent: git/1.7.11.3
Host: github.com
Accept-Encoding: deflate, gzip
Proxy-Connection: Keep-Alive
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 174

< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Mon, 09 Sep 2013 06:43:28 GMT
< Content-Type: application/x-git-upload-pack-result
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< 
remote: Counting objects: 17, done.
remote: Compressing objects: 100% (13/13), done.
* Connection #0 to host bproxy.xxx left intact
remote: Total 17 (delta 3), reused 16 (delta 2)
Unpacking objects: 100% (17/17), done.
* Closing connection #0

Now, with HTTPS:

$ git clone https://github.com/stevage/tilemill-server
Cloning into 'tilemill-server'...
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy bproxy.xxx port 8080 (#0)
*   Trying xxx... * Connected to bproxy.xxx port 8080 (#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.1 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,postalCode=94107,STREET=548 4th Street,serialNumber=5157550,incorporationState=Delaware,incorporationCountry=US,businessCategory=Private Organization
*   start date: Jun 10 00:00:00 2013 GMT
*   expire date: Sep 02 12:00:00 2015 GMT
*   common name: github.com
*   issuer: CN=DigiCert High Assurance EV CA-1,OU=www.digicert.com,O=DigiCert Inc,C=US
* Connected to bproxy.xxx (xxx) port 8080 (#0)

(no more output)

I have seen other people successfully connect on HTTPS through this proxy (it's a university-wide proxy - unlikely to be the problem).

share|improve this question
    
The output of GIT_CURL_VERBOSE=1 as shown in the SO question you linked would be essential to diagnosing this problem. Also, the 443 is not an error number but the HTTPS port number. –  msw Sep 5 '13 at 11:27
    
thanks @msw, have updated as requested. –  Steve Bennett Sep 9 '13 at 6:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.