Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: "git daemon"

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:02


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help