28th Apr2015
Author: Gyro

Unable to connect to github.com using git://github.com

While installing boostrap-sass using bower, the server returned a weird error message.

Failed to execute "git ls-remote --tags --heads git://github.com/twbs/bootstrap-sass.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.130]: errno=Connection timed out

I was a bit confused as this was working perfectly fine on my localhost, after some searching I found out that "The native git protocol uses port 443 for the main repo and port 9418 for the submodules. If this port is firewalled on the network, recursive clone times out and fails.".

Git can use https:// instead of git://, so the solution is to set it to use https:// by default:

~$ git config --global url."https://".insteadOf git://

Enjoy :crazy:
Gyro

 

Sources:
https://github.com/lagadic/vision_visp/issues/13
https://github.com/angular/angular-phonecat/issues/141

 

Similar error messages:

  • fatal: unable to connect to github.com:
    github.com[0: 192.30.252.131]: errno=Connection timed out
    Clone of ‘git://github.com/lagadic/visp_auto_tracker.git' into submodule path ‘visp_auto_tracker' failed
  • npm ERR! Error: Command failed: fatal: unable to connect to github.com:
    npm ERR! github.com[0: 192.30.252.130]: errno=Connection timed out
  • Failed to execute "git ls-remote --tags --heads git://github.com/twbs/bootstrap-sass.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.130]: errno=Connection timed out
    fatal: unable to connect to github.com:
    github.com[0: 192.30.252.130]: errno=Connection timed out

4665

Keep Me Going
Your Name / Website:
Did you like my post? Buy me a Bitcoffee! 14JX52Li7zTKbyQv2omw4tvu6Bi1KzfHNW



One Response to “Unable to connect to github.com using git://github.com”

Leave a Reply

Your email address will not be published. Required fields are marked *

What is 4 + 8 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)