Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get "unable to connect a socket" when I try to clone via a git URL?

Tags:

When I try to clone a project from the GitHub, it gives me the following error.

:git clone git://github.com/project.git github.com[0: 207.97.227.239]: errno=Connection refused fatal: unable to connect a socket (Connection refused) 

But if I use the corresponding HTTP URL, it's fine:

:git clone http://github.com/project.git 

What should I to do to clone through a git URL?

like image 394
Nyambaa Avatar asked Feb 16 '11 11:02

Nyambaa


People also ask

How do I clone a remote repository to a local machine?

From your repository page on GitHub, click the green button labeled Clone or download, and in the “Clone with HTTPs” section, copy the URL for your repository. Next, on your local machine, open your bash shell and change your current working directory to the location where you would like to clone your repository.


1 Answers

Uku Loskit is right about the port being blocked. The solution is to set up your remote's URL without using git://

I use: https://github.com/user/project.git or [email protected]:user/project.git

like image 142
Fabian Avatar answered Sep 21 '22 11:09

Fabian