Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed this example to set up a git repository on my server. It worked, and I successfully pushed my code to it.

But now, how do I pull or clone?

Using the docs, I tried

git clone http://REMOTE_SERVER/home/git/example.git

.. But for me, I'm getting:

fatal: http://myserverip/home/git/example.git/info/refs not found: did you run git update-server-info on the server?

I ran git-update-server info, but nothing changed


Ah, hold on. I changed it to git clone ssh://REMOTE_SERVER/home/git/example.git and I'm getting something.. it wants my user/pass, but how do I make the server public then not requiring login?

share|improve this question

If you want to serve it via (simple) http, you need to run git-update-server-info in the repository on the server after each update.

You can automate that by making the post-update hook run it (usually the default post-update hook just needs to be enabled (make the script executable)).

With a little more configuration of your webserver git-http-backend can give you better performance.

share|improve this answer

Ah, wait, I got it, this explains how to do it using git-daemon:


  • Start up git-daemon &
  • touch git-daemon-export-ok


git clone git://myserverip/home/git/example.git

share|improve this answer

In all my git talks I speak of DAV as the "Loch Ness monster" -- I've heard it exists but have not actually seen it :-)

And as of late last year, with git-http-backend, you no longer need this "monster". Please upgrade past 1.6.6 and treat yourself to a much better experience. No more DAV... just plain apache with a smart little CGI talking to real git...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.