grunt/git引发了与github.com相关的未知SSL协议错误:443



我正在使用Grunt来建立一个角度网站。在大约三分之一的版本中,我看到以下错误:

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 git@github.com

键入命令" git ls-remote-tags - -heads https://github.com/fortawesome/font-awesome.git"每次都起作用。

当域名替换为IP地址时,问题出现了,尝试将github.com添加到主机文件中并确保其正确解决。

可见问题的行:

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

我知道这听起来可能很愚蠢,但是您在虚拟机上运行它吗?如果是这样,请尝试增加它具有类似问题的CPU核心数量,这似乎可以解决。

最新更新