gitremote-repository

git protocol connection refused


I created a GIT Remote Repository in localhost.
Then I push my project.
I can clone my project via :

git clone ssh://127.0.0.1/repo-r/haq

But when I want to use git:// or http:// I get the following error:

$ git clone git://127.0.0.1/repo-r/haq/haq.git
Cloning into 'haq'...
fatal: unable to connect to 127.0.0.1:
127.0.0.1[0: 127.0.0.1]: errno=Connection refused

How do I solve it?


Solution

  • You're not running a http server, so you cannot use http to access your repo. It's as simple as that.

    Same for the (mostly obsolete) git protocol.

    When setting up a http server for git access, you typically have bare repos where you push to from your working non-bare repos. You would not use the same repo.