28th Apr2015

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

by Gyro

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

4877

21st Jan2013

Gitlab service doesn’t run on startup/boot/autostart

by Gyro

I have been using Gitlab for a while now to have backups of all my git repositories on my dedicated servers. Now, I needed to reboot one of them for the first time since I installed Gitlab, and ended up with a ‘502 bad gateway' warning by nginx, when trying to access the Gitlab web interface.

I found this on the github, hidden in a small pull request:

gitlab doesn't start on boot if you follow the install instructions on Ubuntu (12.04 LTS Server -- probably others). Turns out gitlab requires redis-server to be running for gitlab to be able to start. Startup script S20redis-server isn't run until after S20gitlab so gitlab fails to start on boot. Webserver will be up, bad gateway 502 error is usually seen/reported. Starting gitlab manually works (because redis-server has started). This change makes gitlab start after redis-server.

The single line for victory:
# sudo update-rc.d gitlab defaults 70 30

Enjoy :enjoy:

source: github

2993