git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Linus TorvaldsNext: H. Peter Anvin
Message 2 of 4 in “"git daemon"”
  1. Linus TorvaldsJul 14, 2005
  2. Linus TorvaldsJul 14, 2005
  3. H. Peter AnvinJul 16, 2005
  4. Linus TorvaldsJul 16, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.