2017-04-20 152 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 –

相關問題