Erro na verificação de SSL com git (no github) no Ubuntu 14.04

5

Estou tentando clonar o repositório do atom que foi totalmente código-fonte aberto e tive alguns problemas.

A tentativa de git clone do repositório está produzindo um erro SSL:

wug@wugputer:/src/test$ git clone https://github.com/atom/atom.git
Cloning into atom...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/atom/atom.git/info/refs

fatal: HTTP request failed

A pesquisa no Google indicou que esta é uma chamada CURL com falha e que existe uma variável de ambiente que posso definir para obter mais informações, mas que não mostra nada particularmente útil:

wug@wugputer:/src/test$ GIT_CURL_VERBOSE=1 git clone https://github.com/atom/atom.git
Cloning into atom...
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy proxy.wugcorp.com port 3128 (#0)
*   Trying 10.1.2.3... * Connected to proxy.wugcorp.com (10.1.2.3) 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.4.1
Proxy-Connection: Keep-Alive
Pragma: no-cache

< HTTP/1.0 200 Connection established
< 
* Proxy replied OK to CONNECT request
* Connected to proxy.wugcorp.com (10.1.2.3) port 3128 (#0)
* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Expire cleared
* Closing connection #0
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy proxy.wugcorp.com port 3128 (#0)
*   Trying 10.1.2.3... * Connected to proxy.wugcorp.com (10.1.2.3) 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.4.1
Proxy-Connection: Keep-Alive
Pragma: no-cache

< HTTP/1.0 200 Connection established
< 
* Proxy replied OK to CONNECT request
* Connected to proxy.wugcorp.com (10.1.2.3) port 3128 (#0)
* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Expire cleared
* Closing connection #0
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/atom/atom.git/info/refs

fatal: HTTP request failed

Estou no trabalho, proxy.wugcorp.com é o nosso proxy da web (espera-se que esteja lá). Eu consegui clonar coisas recentemente da semana passada sem nenhum problema. Eu também sou capaz de curl o arquivo git está reclamando sem fazer nenhum truque engraçado:

wug@wugputer:/src/test$ curl https://github.com/atom/atom.git/info/refs
Please upgrade your git client.
GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days

openssl também informa que o certificado está bem:

wug@wugputer:/src/test$ openssl s_client -connect github.com:443 -CApath /etc/ssl/certs
CONNECTED(00000003)
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert High Assurance EV Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert SHA2 Extended Validation Server CA
verify return:1
depth=0 businessCategory = Private Organization, 1.3.6.1.4.1.311.60.2.1.3 = US, 1.3.6.1.4.1.311.60.2.1.2 = Delaware, serialNumber = 5157550, street = 548 4th Street, postalCode = 94107, C = US, ST = California, L = San Francisco, O = "GitHub, Inc.", CN = github.com
verify return:1
---
Certificate chain
 0 s:/businessCategory=Private Organization/1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/serialNumber=5157550/street=548 4th Street/postalCode=94107/C=US/ST=California/L=San Francisco/O=GitHub, Inc./CN=github.com
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
 1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
---
Server certificate
-----BEGIN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.1.4.1.311.60.2.1.2=Delaware/serialNumber=5157550/street=548 4th Street/postalCode=94107/C=US/ST=California/L=San Francisco/O=GitHub, Inc./CN=github.com
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
---
No client certificate CA names sent
---
SSL handshake has read 3233 bytes and written 443 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES128-GCM-SHA256
    Session-ID: B5209FBCD0437CE4443399C5488071EAF6236ED8C489C0EF62E73A4453E3AB7C
    Session-ID-ctx: 
    Master-Key: 61E892AA74B881B7CE7C69DD0843B282BCAF6646282BB8099C2D3D84C63F3D311211822FB129432AE112A7E99BF07BCB
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1399403523
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

A coisa mais estranha, porém, é que a chamada original do clone do git será REPRODUZIDA SE FUNCIONAR em strace.

wug@wugputer:/src/test$ strace git clone https://github.com/atom/atom.git
[lots of output snipped]
[works correctly]

Eu não tenho ideia do que está acontecendo. Por que o git está tão irritado com o certificado do github.com, quando tudo está ok? e, mais importante, por que a questão desaparece quando tento inspecioná-la?

    
por Wug 06.05.2014 / 21:17

1 resposta

1

Parece que seu tráfego passa por um proxy:

 About to connect() to proxy proxy.wugcorp.com port 3128

A mensagem de erro:

certificate verify failed while accessing https://github.com/atom/atom.git/info/refs
fatal: HTTP request failed

me faz pensar que, por algum motivo, o proxy não atende a essa solicitação específica. Pode não estar passando por algum motivo. Eu sugiro que você procure alguém nos registros do servidor proxy.

    
por 17.12.2016 / 18:57