Re: "git daemon"
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 14, 2005, 03:11 UTC
- Message-ID
- <Pine.LNX.4.58.0507131956580.17536@g5.osdl.org>
- In-Reply-To
- <Pine.LNX.4.58.0507131946540.17536@g5.osdl.org>
On Wed, 13 Jul 2005, Linus Torvalds wrote:
> > Anyway, this would be a _wonderful_ interface for read-only updates, ie > people pulling from my (and other peoples) git repositories.
I guess I should say what the interface is, so that people don't have to read the sources to find out..
On the server side:
# mark all repositories you want to export with the # "git-daemon-export-ok" file in the .git directory.. # # .. and let the port (9418) through any firewalls etc, # of course
git-daemon >& logfile &
(NOTE! "git-daemon" will not disassociate from any tty's or anything fancy like that.)
On the client side:
git pull git://servername/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
And you're done.
(or "git clone", for that matter - I just fixed a one-liner that caused "clone" to not work, so make sure that you have a commit that says 'Fix the "close before dup" bug in clone-pack too').
If you want to use a different port number (maybe 9418 is some really 133t port, and google just doesn't know about it), you can give git-daemon a "--port=x" command line argument, and you can use
git://servername:port/pathname
on the client side. At least that was my intention, I didn't actually test whether that worked (but the default port has been tested).
Linus