I followed this example to set up a git repository on my server. It worked, and I successfully push
ed 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?
-
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
From bobobobo - Start up
-
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.
From asjo -
http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/#apachehttp
From claws -
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...
From Sitaram Chamarty
0 comments:
Post a Comment