Skip to content

Commit 4884cc0

Browse files
committed
Minor punctuation/font/wording tweaks to "Getting Git on a Server"
Tweaks include: - standardize on " -- " for em dashes - rewording for grammar/clarity
1 parent 1bf5bfb commit 4884cc0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Here we'll be demonstrating the commands and steps needed to do basic, simplifie
99
Actually setting up a production server within your infrastructure will certainly entail differences in security measures or operating system tools, but hopefully this will give you the general idea of what's involved.
1010
====
1111

12-
In order to initially set up any Git server, you have to export an existing repository into a new bare repository a repository that doesn't contain a working directory.
12+
In order to initially set up any Git server, you have to export an existing repository into a new bare repository -- a repository that doesn't contain a working directory.
1313
This is generally straightforward to do.
1414
In order to clone your repository to create a new bare repository, you run the clone command with the `--bare` option.(((git commands, clone, bare)))
15-
By convention, bare repository directories end in `.git`, like so:
15+
By convention, bare repository directory names end with the suffix `.git`, like so:
1616

1717
[source,console]
1818
----
@@ -30,22 +30,22 @@ This is roughly equivalent to something like
3030
$ cp -Rf my_project/.git my_project.git
3131
----
3232

33-
There are a couple of minor differences in the configuration file; but for your purpose, this is close to the same thing.
33+
There are a couple of minor differences in the configuration file but, for your purpose, this is close to the same thing.
3434
It takes the Git repository by itself, without a working directory, and creates a directory specifically for it alone.
3535

3636
[[_bare_repo]]
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 `/srv/git` directory.
40+
Let's say you've set up a server called `git.example.com` to which you have SSH access, and you want to store all your Git repositories under the `/srv/git` directory.
4141
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
----
4545
$ 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 `/srv/git` directory can clone your repository by running
48+
At this point, other users who have SSH-based read access to the `/srv/git` directory on that server can clone your repository by running
4949

5050
[source,console]
5151
----
@@ -66,8 +66,8 @@ $ git init --bare --shared
6666
You see how easy it is to take a Git repository, create a bare version, and place it on a server to which you and your collaborators have SSH access.
6767
Now you're ready to collaborate on the same project.
6868

69-
It's important to note that this is literally all you need to do to run a useful Git server to which several people have access just add SSH-able accounts on a server, and stick a bare repository somewhere that all those users have read and write access to.
70-
You're ready to go nothing else needed.
69+
It's important to note that this is literally all you need to do to run a useful Git server to which several people have access -- just add SSH-able accounts on a server, and stick a bare repository somewhere that all those users have read and write access to.
70+
You're ready to go -- nothing else needed.
7171

7272
In the next few sections, you'll see how to expand to more sophisticated setups.
7373
This discussion will include not having to create user accounts for each user, adding public read access to repositories, setting up web UIs and more.
@@ -77,24 +77,24 @@ However, keep in mind that to collaborate with a couple of people on a private p
7777

7878
If you're a small outfit or are just trying out Git in your organization and have only a few developers, things can be simple for you.
7979
One of the most complicated aspects of setting up a Git server is user management.
80-
If you want some repositories to be read-only to certain users and read/write to others, access and permissions can be a bit more difficult to arrange.
80+
If you want some repositories to be read-only for certain users and read/write for others, access and permissions can be a bit more difficult to arrange.
8181

8282
===== SSH Access
8383

8484
(((serving repositories, SSH)))
8585
If you have a server to which all your developers already have SSH access, it's generally easiest to set up your first repository there, because you have to do almost no work (as we covered in the last section).
86-
If you want more complex access control type permissions on your repositories, you can handle them with the normal filesystem permissions of the operating system your server runs.
86+
If you want more complex access control type permissions on your repositories, you can handle them with the normal filesystem permissions of your server's operating system.
8787

88-
If you want to place your repositories on a server that doesn't have accounts for everyone on your team whom you want to have write access, then you must set up SSH access for them.
88+
If you want to place your repositories on a server that doesn't have accounts for everyone on your team for whom you want to grant write access, then you must set up SSH access for them.
8989
We assume that if you have a server with which to do this, you already have an SSH server installed, and that's how you're accessing the server.
9090

9191
There are a few ways you can give access to everyone on your team.
9292
The first is to set up accounts for everybody, which is straightforward but can be cumbersome.
9393
You may not want to run `adduser` and set temporary passwords for every user.
9494

95-
A second method is to create a single 'git' user on the machine, ask every user who is to have write access to send you an SSH public key, and add that key to the `~/.ssh/authorized_keys` file of your new 'git' user.
96-
At that point, everyone will be able to access that machine via the 'git' user.
97-
This doesn't affect the commit data in any way the SSH user you connect as doesn't affect the commits you've recorded.
95+
A second method is to create a single 'git' user account on the machine, ask every user who is to have write access to send you an SSH public key, and add that key to the `~/.ssh/authorized_keys` file of that new account.
96+
At that point, everyone will be able to access that machine via the 'git' account.
97+
This doesn't affect the commit data in any way -- the SSH user you connect as doesn't affect the commits you've recorded.
9898

9999
Another way to do it is to have your SSH server authenticate from an LDAP server or some other centralized authentication source that you may already have set up.
100100
As long as each user can get shell access on the machine, any SSH authentication mechanism you can think of should work.

0 commit comments

Comments
 (0)