Skip to content

Commit 8bec621

Browse files
committed
Merge pull request #145 from paveljanik/formatgituser
Format git username uniformly.
2 parents f85c244 + 462a839 commit 8bec621

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

book/04-git-server/sections/setting-up-server.asc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Let's walk through setting up SSH access on the server side.
55
In this example, you'll use the `authorized_keys` method for authenticating your users.
66
We also assume you're running a standard Linux distribution like Ubuntu.
7-
First, you create a 'git' user and a `.ssh` directory for that user.
7+
First, you create a `git` user and a `.ssh` directory for that user.
88

99
[source,console]
1010
----
@@ -52,7 +52,7 @@ Initialized empty Git repository in /opt/git/project.git/
5252

5353
Then, John, Josie, or Jessica can push the first version of their project into that repository by adding it as a remote and pushing up a branch.
5454
Note that someone must shell onto the machine and create a bare repository every time you want to add a project.
55-
Let's use `gitserver` as the hostname of the server on which you've set up your 'git' user and repository.
55+
Let's use `gitserver` as the hostname of the server on which you've set up your `git` user and repository.
5656
If you're running it internally, and you set up DNS for `gitserver` to point to that server, then you can use the commands pretty much as is (assuming that `myproject` is an existing project with files in it):
5757

5858
[source,console]
@@ -79,10 +79,10 @@ $ git push origin master
7979

8080
With this method, you can quickly get a read/write Git server up and running for a handful of developers.
8181

82-
You should note that currently all these users can also log into the server and get a shell as the ``git'' user. If you want to restrict that, you will have to change the shell to something else in the `passwd` file.
82+
You should note that currently all these users can also log into the server and get a shell as the `git` user. If you want to restrict that, you will have to change the shell to something else in the `passwd` file.
8383

84-
You can easily restrict the 'git' user to only doing Git activities with a limited shell tool called `git-shell` that comes with Git.
85-
If you set this as your 'git' user's login shell, then the 'git' user can't have normal shell access to your server.
84+
You can easily restrict the `git` user to only doing Git activities with a limited shell tool called `git-shell` that comes with Git.
85+
If you set this as your `git` user's login shell, then the `git` user can't have normal shell access to your server.
8686
To use this, specify `git-shell` instead of bash or csh for your user's login shell.
8787
To do so, you must first add `git-shell` to `/etc/shells` if it's not already there:
8888

@@ -100,7 +100,7 @@ Now you can edit the shell for a user using `chsh <username>`:
100100
$ sudo chsh git # and enter the path to git-shell, usually: /usr/bin/git-shell
101101
----
102102

103-
Now, the 'git' user can only use the SSH connection to push and pull Git repositories and can't shell onto the machine.
103+
Now, the `git` user can only use the SSH connection to push and pull Git repositories and can't shell onto the machine.
104104
If you try, you'll see a login rejection like this:
105105

106106
[source,console]
@@ -112,6 +112,6 @@ Connection to gitserver closed.
112112
----
113113

114114
Now Git network commands will still work just fine but the users won't be able to get a shell.
115-
As the output states, you can also set up a directory in the ``git'' user's home directory that customizes the `git-shell` command a bit.
115+
As the output states, you can also set up a directory in the `git` user's home directory that customizes the `git-shell` command a bit.
116116
For instance, you can restrict the Git commands that the server will accept or you can customize the message that users see if they try to SSH in like that.
117117
Run `git help shell` for more information on customizing the shell.(((git commands, help)))

0 commit comments

Comments
 (0)