You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: book/04-git-server/sections/generating-ssh-key.asc
+1-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ config id_dsa.pub
18
18
----
19
19
20
20
You're looking for a pair of files named something like `id_dsa` or `id_rsa` and a matching file with a `.pub` extension.
21
-
The `.pub` file is your public key, and the other file is your private key.
21
+
The `.pub` file is your public key, and the other file is the corresponding private key.
22
22
If you don't have these files (or you don't even have a `.ssh` directory), you can create them by running a program called `ssh-keygen`, which is provided with the SSH package on Linux/Mac systems and comes with Git for Windows:
Copy file name to clipboardexpand all lines: book/04-git-server/sections/git-daemon.asc
+2-2
Original file line number
Diff line number
Diff line change
@@ -52,8 +52,8 @@ Also, check that the Git binary is indeed located at `/usr/bin/git` and change t
52
52
53
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`.
54
54
55
-
Until LTS 14.04, Ubuntu used upstart service unit configuration.
56
-
Therefore, on Ubuntu <=14.04 you can use an Upstart script.
55
+
Up to and including LTS 14.04, Ubuntu used upstart service unit configuration.
56
+
Therefore, on Ubuntu 14.04 or earlier, you can use an Upstart script.
Copy file name to clipboardexpand all lines: book/04-git-server/sections/git-on-a-server.asc
+2-2
Original file line number
Diff line number
Diff line change
@@ -90,9 +90,9 @@ We assume that if you have a server with which to do this, you already have an S
90
90
91
91
There are a few ways you can give access to everyone on your team.
92
92
The first is to set up accounts for everybody, which is straightforward but can be cumbersome.
93
-
You may not want to run `adduser` and set temporary passwords for every user.
93
+
You may not want to run `adduser` (or the possible alternative `useradd`) and have to set temporary passwords for every new user.
94
94
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.
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 'git' account.
96
96
At that point, everyone will be able to access that machine via the 'git' account.
97
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.
Copy file name to clipboardexpand all lines: book/04-git-server/sections/protocols.asc
+3-3
Original file line number
Diff line number
Diff line change
@@ -180,9 +180,9 @@ If you want to allow anonymous read-only access to your projects and also want t
180
180
==== The Git Protocol
181
181
182
182
(((protocols, git)))
183
-
Next is the Git protocol.
183
+
Finally, we have the Git protocol.
184
184
This is a special daemon that comes packaged with Git; it listens on a dedicated port (9418) that provides a service similar to the SSH protocol, but with absolutely no authentication.
185
-
In order for a repository to be served over the Git protocol, you must create a `git-daemon-export-ok` file -- the daemon won't serve a repository without that file in it -- but other than that there is no security.
185
+
In order for a repository to be served over the Git protocol, you must create a `git-daemon-export-ok` file -- the daemon won't serve a repository without that file in it -- but, other than that, there is no security.
186
186
Either the Git repository is available for everyone to clone, or it isn't.
187
187
This means that there is generally no pushing over this protocol.
188
188
You can enable push access but, given the lack of authentication, anyone on the internet who finds your project's URL could push to that project.
@@ -200,6 +200,6 @@ The downside of the Git protocol is the lack of authentication.
200
200
It's generally undesirable for the Git protocol to be the only access to your project.
201
201
Generally, you'll pair it with SSH or HTTPS access for the few developers who have push (write) access and have everyone else use `git://` for read-only access.
202
202
It's also probably the most difficult protocol to set up.
203
-
It must run its own daemon, which requires `xinetd` configuration or the like, which isn't always a walk in the park.
203
+
It must run its own daemon, which requires `xinetd` or `systemd` configuration or the like, which isn't always a walk in the park.
204
204
It also requires firewall access to port 9418, which isn't a standard port that corporate firewalls always allow.
205
205
Behind big corporate firewalls, this obscure port is commonly blocked.
Copy file name to clipboardexpand all lines: ch04-git-on-the-server.asc
+1-1
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Furthermore, you want your collaborators to be able to access the repository eve
9
9
Therefore, the preferred method for collaborating with someone is to set up an intermediate repository that you both have access to, and push to and pull from that.
10
10
11
11
Running a Git server is fairly straightforward.
12
-
First, you choose which protocols you want your server to communicate with.
12
+
First, you choose which protocols you want your server to support.
13
13
The first section of this chapter will cover the available protocols and the pros and cons of each.
14
14
The next sections will explain some typical setups using those protocols and how to get your server running with them.
15
15
Last, we'll go over a few hosted options, if you don't mind hosting your code on someone else's server and don't want to go through the hassle of setting up and maintaining your own server.
0 commit comments