I can curl and wget google.com and other sites using https (not all of them though).

Github is one of them. The following commands don't work on my Ubuntu 14.04 machine:

  • This hangs indefinitely

    /usr/local/bin/git ls-remote git://github.com/sstephenson/rbenv.git -h refs/heads/v0.4.0

  • This results in: curl: (35) Unknown SSL protocol error in connection to github.com:443

    curl https://github.com

  • This results in: Resolving github.com (github.com)... 192.30.252.130 Connecting to github.com (github.com)|192.30.252.130|:443... connected. Unable to establish SSL connection.

    wget https://github.com

  • openssl shows no certificate (is that the best hint?)

    openssl s_client -connect github.com:443
    CONNECTED(00000003)
    write:errno=104
    ---
    no peer certificate available
    ---
    No client certificate CA names sent
    ---
    SSL handshake has read 0 bytes and written 305 bytes
    ---
    New, (NONE), Cipher is (NONE)
    Secure Renegotiation IS NOT supported
    Compression: NONE
    Expansion: NONE
    ---
    

Why is Github a problem here? Is my system blocking SSL traffic? It is possible that a firewall rule is blocking traffic as well. If that's the case please point it out as I don't have the knowledge to determine whether this is the reason.


I can't git clone repos that are public and don't belong to my account (which I have SSH keys for) either. Can clone repos from my own Github account all I want though.

Here is an strace of the command (notice it hangs on the last line)

share|improve this question
    
I notice you use the git:// protocol, what happens if you use it over ssh or https://? – Willem Van Onsem May 13 '15 at 23:47
    
@CommuSoft I get: fatal: unable to access 'https://github.com/sstephenson/rbenv.git/': Unknown SSL protocol error in connection to github.com:443 – sargas May 13 '15 at 23:49
    
I have a similar problem when I'm connected via the wifi at a hospital near my house. SSH / HTTPS works fine, but not to GitHub. Does the issue reproduce in multiple locations / connections? – Aaron Brager May 14 '15 at 0:53
    
@AaronBrager I haven't tried connecting from other machines or connections – sargas May 14 '15 at 5:21
up vote 1 down vote accepted
openssl s_client -connect github.com:443
CONNECTED(00000003)
write:errno=104

I suggest that your are behind some firewall middlebox which restricts the sites you can access. In case of https the restriction depends on the target (it is probably looking into the SSL handshake) and will thus allow the TCP connection but then close it once the "wrong" target was detected, causing a connection reset by peer (errno=104). With git instead it is simply blocking the port 9418 so the connection attempt hangs.

share|improve this answer
    
This was precisely the case. Since the server was in a very restrictive environment, they blocked all traffic, allowing stuff only by request. I wish they'd told me that since the beginning (assuming the type of work web developers do). – sargas May 14 '15 at 18:18

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.