Skip to content

Commit 62e5d0a

Browse files
committed
Fix issue #312: /srv/git instead of /opt/git for server repositories
1 parent 8267a20 commit 62e5d0a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

book/04-git-server/sections/git-on-a-server.asc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,29 @@ It takes the Git repository by itself, without a working directory, and creates
3737
==== Putting the Bare Repository on a Server
3838

3939
Now that you have a bare copy of your repository, all you need to do is put it on a server and set up your protocols.
40-
Let's say you've set up a server called `git.example.com` that you have SSH access to, and you want to store all your Git repositories under the `/opt/git` directory.
41-
Assuming that `/opt/git` exists on that server, you can set up your new repository by copying your bare repository over:
40+
Let's say you've set up a server called `git.example.com` that you have SSH access to, and you want to store all your Git repositories under the `/srv/git` directory.
41+
Assuming that `/srv/git` exists on that server, you can set up your new repository by copying your bare repository over:
4242

4343
[source,console]
4444
----
45-
$ scp -r my_project.git [email protected]:/opt/git
45+
$ scp -r my_project.git [email protected]:/srv/git
4646
----
4747

48-
At this point, other users who have SSH access to the same server which has read-access to the `/opt/git` directory can clone your repository by running
48+
At this point, other users who have SSH access to the same server which has read-access to the `/srv/git` directory can clone your repository by running
4949

5050
[source,console]
5151
----
52-
$ git clone [email protected]:/opt/git/my_project.git
52+
$ git clone [email protected]:/srv/git/my_project.git
5353
----
5454

55-
If a user SSHs into a server and has write access to the `/opt/git/my_project.git` directory, they will also automatically have push access.
55+
If a user SSHs into a server and has write access to the `/srv/git/my_project.git` directory, they will also automatically have push access.
5656

5757
Git will automatically add group write permissions to a repository properly if you run the `git init` command with the `--shared` option.(((git commands, init, bare)))
5858

5959
[source,console]
6060
----
6161
62-
$ cd /opt/git/my_project.git
62+
$ cd /srv/git/my_project.git
6363
$ git init --bare --shared
6464
----
6565

0 commit comments

Comments
 (0)