Skip to content

Commit e82f514

Browse files
authored
Merge pull request #885 from rpjday/git_daemon
Minor aesthetic tweaks to "Git Daemon" section
2 parents 19b96cd + e78ad78 commit e82f514

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

book/04-git-server/sections/git-daemon.asc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
=== Git Daemon
22

33
(((serving repositories, git protocol)))
4-
Next we'll set up a daemon serving repositories over the ``Git'' protocol.
5-
This is common choice for fast, unauthenticated access to your Git data.
6-
Remember that since it's not an authenticated service, anything you serve over this protocol is public within its network.
4+
Next we'll set up a daemon serving repositories using the ``Git'' protocol.
5+
This is a common choice for fast, unauthenticated access to your Git data.
6+
Remember that since this is not an authenticated service, anything you serve over this protocol is public within its network.
77

8-
If you're running this on a server outside your firewall, it should only be used for projects that are publicly visible to the world.
8+
If you're running this on a server outside your firewall, it should be used only for projects that are publicly visible to the world.
99
If the server you're running it on is inside your firewall, you might use it for projects that a large number of people or computers (continuous integration or build servers) have read-only access to, when you don't want to have to add an SSH key for each.
1010

1111
In any case, the Git protocol is relatively easy to set up.
@@ -16,7 +16,7 @@ Basically, you need to run this command in a daemonized manner:(((git commands,
1616
$ git daemon --reuseaddr --base-path=/srv/git/ /srv/git/
1717
----
1818

19-
`--reuseaddr` allows the server to restart without waiting for old connections to time out, the `--base-path` option allows people to clone projects without specifying the entire path, and the path at the end tells the Git daemon where to look for repositories to export.
19+
The `--reuseaddr` option allows the server to restart without waiting for old connections to time out, while the `--base-path` option allows people to clone projects without specifying the entire path, and the path at the end tells the Git daemon where to look for repositories to export.
2020
If you're running a firewall, you'll also need to punch a hole in it at port 9418 on the box you're setting this up on.
2121

2222
You can daemonize this process a number of ways, depending on the operating system you're running.
@@ -50,7 +50,7 @@ You might have noticed that Git daemon is started here with `git` as both group
5050

5151
Modify it to fit your needs and make sure provided user exists on the system.
5252

53-
Finally, you'll run `systemctl enable git-daemon` to automatically start the service on boot, and the usual service commands like `service start` and `service stop` are instantly available.
53+
Finally, you'll run `systemctl enable git-daemon` to automatically start the service on boot, and can start and stop the service with, respectively, `systemctl start git-daemon` and `systemctl stop git-daemon`.
5454

5555
Until LTS 14.04, Ubuntu used upstart service unit configuration.
5656
Therefore, on Ubuntu <= 14.04 you can use an Upstart script.
@@ -75,7 +75,7 @@ exec /usr/bin/git daemon \
7575
respawn
7676
----
7777

78-
For security reasons, it is strongly encouraged to have this daemon run as a user with read-only permissions to the repositories you can easily do this by creating a new user 'git-ro' and running the daemon as them.
78+
For security reasons, it is strongly encouraged to have this daemon run as a user with read-only permissions to the repositories -- you can easily do this by creating a new user 'git-ro' and running the daemon as them.
7979
For the sake of simplicity we'll simply run it as the same 'git' user that `git-shell` is running as.
8080

8181
When you restart your machine, your Git daemon will start automatically and respawn if it goes down.
@@ -86,7 +86,7 @@ To get it running without having to reboot, you can run this:
8686
$ initctl start local-git-daemon
8787
----
8888

89-
On other systems, you may want to use `xinetd`, a script in your `sysvinit` system, or something else as long as you get that command daemonized and watched somehow.
89+
On other systems, you may want to use `xinetd`, a script in your `sysvinit` system, or something else -- as long as you get that command daemonized and watched somehow.
9090

9191
Next, you have to tell Git which repositories to allow unauthenticated Git server-based access to.
9292
You can do this in each repository by creating a file named `git-daemon-export-ok`.

0 commit comments

Comments
 (0)