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

"git daemon"

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 14, 2005, 02:53 UTC
Message-ID
<Pine.LNX.4.58.0507131946540.17536@g5.osdl.org>
Guys,
 I've written a really simple TCP git daemon that normally listens on 
port "DEFAULT_GIT_PORT" aka 9418. It waits for a connection, and will just 
execute "git-upload-pack" when it gets one.

It's actually a bit more careful than that, in that there's a magic request-line that gives the command and what directory to upload, and it verifies that the directory is ok.

In particular, it verifies that the directory has the magic file "git-daemon-export-ok", and it will refuse to export any git directory that hasn't explicitly been marked for export this way.

What I'd ask people to check is how comfortable for example kernel.org would be to have one machine that runs this kind of service? I've tried very hard to set it up so that it doesn't have any security issues: the daemon can be run as "nobody", and it shouldn't ever even write to any files, although I guess we should do a full check of that.

In fact, it doesn't even really accept any user input except for the list of SHA1's that you give the upload which denote the "I have these" list. So I really think it should be hard to fool into doing anything bad, and the code isn't _that_ complicated, but hey, it's a daemon. They're always buggy, and there are always security issues.

Anyway, this would be a _wonderful_ interface for read-only updates, ie people pulling from my (and other peoples) git repositories.

		Linus
Next: Linus Torvalds
Message 1 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.