Adam Bennett
Adam Bennett

Reputation: 92

Grunt/Git throws Unknown SSL protocol error in connection to github.com:443

I am using Grunt to build an Angular Website. On about 1 in 3 builds, I see the following error:

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 and GIT_TRACE_PACKET=2 gives the following:

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

I have tried the following to no avail:

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]

Typing the command "git ls-remote --tags --heads https://github.com/FortAwesome/Font-Awesome.git" works every time.

Upvotes: 1

Views: 551

Answers (2)

Jack K
Jack K

Reputation: 82

I know this may sound stupid but are you running this on a Virtual Machine? If so try increasing the number of CPU cores that it has access to as we had a similar problem and this seemed to fix it.

Upvotes: 1

Nowres Rafed
Nowres Rafed

Reputation: 1138

The problem comes when the domain name is replaced by IP address, try to add github.com to your hosts file and make sure it's correctly resolved.

Lines where the problem is visible:

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

Upvotes: 2

Related Questions