{"thread":{"id":"7322","subject":"[PATCH] Add a HOWTO for setting up a standalone git daemon","startedAt":"2007-03-20T02:29:56Z","lastAt":"2007-03-20T02:29:56Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37571","messageId":"Pine.LNX.4.63.0703200329350.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7322","inReplyTo":null,"subject":"[PATCH] Add a HOWTO for setting up a standalone git daemon","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-20T02:29:56Z","receivedAt":"2007-03-20T02:29:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSetting up a git-daemon came up the other day on IRC, and it is slightly\nnon trivial for the uninitiated.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Documentation/howto/use-git-daemon.txt |   52 ++++++++++++++++++++++++++++++++\n 1 files changed, 52 insertions(+), 0 deletions(-)\n create mode 100644 Documentation/howto/use-git-daemon.txt\n\ndiff --git a/Documentation/howto/use-git-daemon.txt b/Documentation/howto/use-git-daemon.txt\nnew file mode 100644\nindex 0000000..1a1eb24\n--- /dev/null\n+++ b/Documentation/howto/use-git-daemon.txt\n@@ -0,0 +1,52 @@\n+How to use git-daemon\n+\n+Git can be run in inetd mode and in stand alone mode. But all you want is\n+let a coworker pull from you, and therefore need to set up a git server\n+real quick, right?\n+\n+Note that git-daemon is not really chatty at the moment, especially when\n+things do not go according to plan (e.g. a socket could not be bound).\n+\n+Another word of warning: if you run\n+\n+\t$ git ls-remote git://127.0.0.1/rule-the-world.git\n+\n+and you see a message like\n+\n+\tfatal: The remote end hung up unexpectedly\n+\n+it only means that _something_ went wrong. To find out _what_ went wrong,\n+you have to ask the server. (Git refuses to be more precise for your\n+security only. Take off your shoes now. You have any coins in your pockets?\n+Sorry, not allowed -- who knows what you planned to do with them?)\n+\n+With these two caveats, let's see an example:\n+\n+\t$ git daemon --reuseaddr --verbose --base-path=/home/gitte/git \\\n+\t  --export-all -- /home/gitte/git/rule-the-world.git\n+\n+(Of course, unless your user name is `gitte` _and_ your repository is in\n+~/rule-the-world.git, you have to adjust the paths. If your repository is\n+not bare, be aware that you have to type the path to the .git directory!)\n+\n+This invocation tries to reuse the address if it is already taken\n+(this can save you some debugging, because otherwise killing and restarting\n+git-daemon could just silently fail to bind to a socket).\n+\n+Also, it is (relatively) verbose when somebody actually connects to it.\n+It also sets the base path, which means that all the projects which can be\n+accessed using this daemon have to reside in or under that path.\n+\n+The option `--export-all` just means that you _don't_ have to create a\n+file named `git-daemon-export-ok` in each exported repository. (Otherwise,\n+git-daemon would complain loudly, and refuse to cooperate.)\n+\n+Last of all, the repository which should be exported is specified. It is\n+a good practice to put the paths after a \"--\" separator.\n+\n+Now, test your daemon with\n+\n+\t$ git ls-remote git://127.0.0.1/rule-the-world.git\n+\n+If this does not work, find out why, and submit a patch to this document.\n+\n-- \n1.5.1.rc1.2288.g29e7\n"}]}