无法访问github.com

时间:2017-08-28 20:40:58

标签: git ssl github

我将代码推送到github repo时出现以下错误消息,昨天一切正常。

git push -u origin master

fatal: unable to access 'https://github.com/resumic/schema/': SSL certificate 
problem: self signed certificate in certificate chain

1 个答案:

答案 0 :(得分:0)

好吧,有些人或其他人假装你是GitHub。在浏览器中打开GitHub并检查证书链(F12→安全性)。

或者使用curl:

$ curl -vI https://github.com

*   Trying 192.30.253.113...
* Connected to github.com (192.30.253.113) port 443 (#0)
...
* Server certificate:
*  subject: businessCategory=Private Organization; jurisdictionC=US; jurisdictionST=Delaware; serialNumber=5157550; street=88 Colin P Kelly, Jr Street; postalCode=94107; C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
*  start date: Mar 10 00:00:00 2016 GMT
*  expire date: May 17 12:00:00 2018 GMT
*  subjectAltName: host "github.com" matched cert's "github.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*  SSL certificate verify ok.

如果您收到证书验证错误,请使用curl -kvI(即使证书未经验证,仍然可以使用“握手”{。1}}。)

或OpenSSL:

-k

撰写本文时的链是:

chain

根证书指纹:
$ openssl s_client -connect github.com:443 -servername github.com 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, jurisdictionC = US, jurisdictionST = Delaware, serialNumber = 5157550, street = "88 Colin P Kelly, Jr 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/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=5157550/street=88 Colin P Kelly, Jr 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

EV叶证书:
‎5f b7 ee 06 33 e2 59 db ad 0c 4c 9a e6 d3 8f 1a 61 c7 dc 25