从git存储库克隆时发生TLS错误

从git存储库克隆时发生TLS错误,git,ssl,github,clone,Git,Ssl,Github,Clone,作为ONL(开放网络Linux)构建过程的一部分,尝试从GIT存储库克隆时,我收到以下错误。有人对此有见解吗?这是在Ubuntu13.10上 error: gnutls_handshake() failed: A TLS warning alert has been received while accessing https://git.buildroot.net/buildroot/info/refs fatal: HTTP request failed Clone of 'git:

作为ONL(开放网络Linux)构建过程的一部分,尝试从GIT存储库克隆时,我收到以下错误。有人对此有见解吗?这是在Ubuntu13.10上

error: gnutls_handshake() failed: A TLS warning alert has been received while
    accessing https://git.buildroot.net/buildroot/info/refs
fatal: HTTP request failed
Clone of 'git://git.buildroot.net/buildroot' into submodule path 'buildroot' failed
下面是gnutls实用程序的输出。证书中的主机名似乎不匹配。有没有办法跳过此验证?我已经尝试在git配置中将sslverify设置为FALSE,但没有效果

root@ubuntu:~/git-openssl/git-1.8.3.2# gnutls-cli -p 443 git.buildroot.net
Resolving 'git.buildroot.net'...
Connecting to '140.211.167.224:443'...
*** Non fatal error: A TLS warning alert has been received.
*** Received alert [112]: The server name sent was not recognized
- Certificate type: X.509
 - Got a certificate list of 1 certificates.
 - Certificate[0] info:
  - subject `C=US,ST=OR,L=Corvallis,O=OSU Open Source Lab,CN=busybox.net,EMAIL=dnsadmin@osuosl.org', 
    issuer `C=US,ST=OR,O=OSU Open Source Lab,CN=OSU Open Source Lab CA,EMAIL=dnsadmin@osuosl.org',
    RSA key 2048 bits, signed using RSA-SHA1, activated `2013-01-25 01:31:38 UTC', expires
    `2015-01-25 01:31:38 UTC', SHA-1 fingerprint `e229f69e98cc9065e29cde829e79201dc0ad833c'
- The hostname in the certificate does NOT match 'git.buildroot.net'

证书被颁发给busybox.net,这是导致错误的根本原因


简单的解决方案是删除https://并使用http://,因为URL位于
http://git.buildroot.net/buildroot/info/refs

错误消息的最后一部分是真正的错误,“证书中的主机名与'git.buildroot.net'不匹配”。证书的CN部分应与您正在访问的url匹配,在本例中不匹配,git.buildroot.net!=busybox.net。请尝试http或其他来源。谢谢您的回答-更改为http解决了问题谢谢您的回答-更改为http解决了问题可能是github access位于代理之后的情况,尤其是在公司开发环境中。您可能需要检查~/.gitconfig是否存在,以及它是否使用了正确的IP地址/协议(HTTP)来访问github。