2017-04-20 151 views
1

我正在使用Grunt构建一个有角的网站。关于1/3的构建,我看到以下错误:Grunt/Git在与github.com连接时抛出未知的SSL协议错误:443

ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/FortAwesome/Font-Awesome.git", exit code of #128 fatal: unable to access 'https://github.com/FortAwesome/Font-Awesome.git/': Unknown SSL protocol error in connection to github.com:443 

Seeting GIT_CURL_VERBOSE = 1和GIT_TRACE_PACKET = 2给出以下:

Additional error details: 
* Couldn't find host github.com in the _netrc file; using defaults 
* timeout on name lookup is not supported 
* Trying 192.30.253.112... 
* TCP_NODELAY set 
* Connected to github.com (192.30.253.112) port 443 (#0) 
* ALPN, offering http/1.1 
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH 
* successfully set certificate verify locations: 
* CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt 
    CApath: none 
* Unknown SSL protocol error in connection to github.com:443 
* stopped the pause stream! 
* Closing connection 0 
fatal: unable to access 'https://github.com/FortAwesome/Font-Awesome.git/': Unknown SSL protocol error in connection to github.com:443 

我曾尝试以下无济于事:

git config --global --add http.sslVersion tlsv1.2 
git config --global http.sslverify false 
git config --global url."https://".insteadOf git:// 
git config --global url."https://github.com/".insteadOf [email protected] 

输入命令“git ls-remote --tags - head https://github.com/FortAwesome/Font-Awesome.git”每次都有效。

回答

0

我知道这听起来很蠢,但你在虚拟机上运行吗?如果是这样,请尝试增加它有权访问的CPU核心数量,因为我们遇到了类似的问题,这似乎解决了这个问题。

+1

尽管听起来这很可笑,这个工作。它连续建造了10次,比它的管理效果要好。谢谢! –

1

问题是当域名是通过IP地址更换,尽量github.com添加到您的hosts文件,并确保它的正确解析。

线路问题出在哪里可见:

* Couldn't find host github.com in the _netrc file; using defaults 
* timeout on name lookup is not supported 
* Trying 192.30.253.112... 
+0

感谢您的想法,但没有改善!不行:*连接到github.com(192.30.253.112)端口443(#0)表明github.com已解决? –

+0

也许,看看这个,也许这将有助于http://stackoverflow.com/questions/38591553/ignore-invalid-self-signed-ssl-certificate-warning-in-grunt –

相关问题