5

I am working on an Ubuntu OS. I have tried cloning several repositories from git.gnome.org such as this -

git clone git://git.gnome.org/newcomers-tutorial Cloning into 'newcomers-tutorial'... fatal: unable to connect to git.gnome.org: git.gnome.org[0: 209.132.180.184]: errno=Connection timed out

And even tried with http:// -

git clone http://git.gnome.org/newcomers-tutorial Cloning into 'newcomers-tutorial'... fatal: http://git.gnome.org/newcomers-tutorial/info/refs not found: did you run git update-server-info on the server?

whereas if i clone any other repo from github it is successfully cloned. Such as -

git clone https://github.com/arduino/Arduino.git Cloning into 'Arduino'... remote: Counting objects: 53558, done. remote: Compressing objects: 100% (617/617), done. ^Cceiving objects: 11% (5996/53558), 23.67 MiB | 1.41 MiB/s

I am working behind a proxy and already have set it by -

git config --global http.proxy $http_proxy

Any help?

Krist
  • 477
  • 4
  • 17

1 Answers1

5

The git protocol uses a special port (9418) which, is you are working behind a proxy, is likely to be blocked.

As for http cloning, the web page of the newcomers-tutorial repo mentions an https url, not an http one:

git clone https://git.gnome.org/browse/newcomers-tutorial

Make sure to set your https proxy as well first:

git config --global https.proxy $http_proxy
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks it worked by https but that was just an example and i'm facing this problem in general, basically when i use jhbuild it clones repos and then also i get the same error, could you suggest something about it? – Krist Feb 13 '15 at 11:35
  • @Krist 'jhbuild' was not part of your original question. Your original question was why the cloned failed and I believe I have adequately answered it. Simply make sure jhbuild uses the right urls `https://git.gnome.org/browse/` – VonC Feb 13 '15 at 11:46
  • Yeah you did answer it and that was correct, just wanted to know how to solve same problem with jhbuild. So should i ask a new fresh question? – Krist Feb 13 '15 at 12:18
  • @Krist yes, with details like your OS, the version of git and the version of jhbuild. Plus, you can include a link back to this first question, for context. – VonC Feb 13 '15 at 12:33