7

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

Edit:

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?

1

4 Answers 4

2

http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/#apachehttp

5

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.

0

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

SERVER:

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

CLIENT:

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

0

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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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