Skip to content

Commit 2b30452

Browse files
committed
felix suggestions
and one more sentence linking to the ssh github page
1 parent 3dd82c0 commit 2b30452

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

docs/resources/git_setup.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# Git
22

3-
How to's concerning `git` in general, [`gitlab`][cern_gitlab], [`github`][github] and CI.
3+
How to's concerning `git` in general, [`gitlab`][cern_gitlab], [`GitHub`][github] and CI.
44

55
## Github Commandline Access Quickstart
66

7-
This section explains the basic steps to get started with `github`.
8-
Since a few years, github has disabled access via password only for security reasons,
9-
so you need to cre
10-
This aims to be as short and concise as possible, for more extenive information, [see the github security documentation][github_security].
7+
This section explains the basic steps to get started with GitHub.
8+
Since HTTP access via password only has been disabled by GitHub for security reasons, it is necessary to activate a secure method.
9+
10+
This aims to be as short and concise as possible, for more extensive information, [see the GitHub security documentation][github_security]{target=_blank}.
1111

1212
### Setup SSH Access
1313

14-
An easy way to access github securely is to use SSH.
14+
An easy way to access GitHub securely is to use SSH.
15+
This guides you through the basic steps, but [details can be found in the GitHub documentation][github_ssh].
1516

1617
#### Create SSH Key
1718

18-
For this, you first need to create a SSH key pair on your computer using the email address of your github account.
19+
For this, create an SSH key pair locally using the email address associated with your GitHub account:
1920

2021
```bash
2122
ssh-keygen -t ed25519 -C "[email protected]"
2223
```
2324

24-
When asked for a location, it make sense to give it an easily identifiable name, so you will know what the key is for.
25+
When asked for a location, it makes sense to give it an easily identifiable name, to remember what the key is for.
2526
The file should be placed in `~/.ssh/`, unless you are on `afs`, in which case the `~/private/` directory should be used.
2627

2728
```text
@@ -32,7 +33,7 @@ The file should be placed in `~/.ssh/`, unless you are on `afs`, in which case t
3233
You can optionally provide a passphrase for the key, which will make it more secure.
3334
This way, even if someone else gets a hold of the private key file, they will not be able to access it.
3435
On the downside, you will be asked to enter the passphrase every time you want to use the key.
35-
**It recommended, to use a passphrase** but as it is just an extra layer of security, you can keep it short and simple.
36+
**It is recommended, to use a passphrase** but as it is just an extra layer of security, you can keep it short and simple.
3637

3738
This will create two files: `github_authenticate` and `github_authenticate.pub`.
3839
The `.pub` is your public key that you can share with others,
@@ -41,19 +42,19 @@ while the other file is your private key and **should never be shared with anyon
4142
!!! quote "Keep it secret, keep it safe!"
4243
_Gandalf_, about private SSH keys (probably).
4344

44-
#### Add SSH Key to Github
45+
#### Add the Public SSH Key to GitHub
4546

46-
After creating the key, you need to add it to your github account.
47-
For this you need to log into your github account, click on your avatar and go to `Settings` → `SSH and GPG keys`.
47+
After creating the key, you need to add it to your GitHub account.
48+
Log into your GitHub account, click on your avatar and go to `Settings` → `SSH and GPG keys`.
4849
Then click on [++"New SSH key"++{.green-gui-button}][github_new_ssh_key]{target=_blank} and paste the contents of the `.pub` file into the `Key` field.
4950

50-
Give it a resonable name in the `Title` field and leave the `Key type` as `Authentication key`.
51+
Give it a resonable name in the `Title` field (which it will appear as in the GitHub interface) and leave the `Key type` as `Authentication key`.
5152
Then click on `Add SSH key` and you are done.
5253

5354
#### Configure SSH to use the key
5455

55-
Next, you need to tell your local SSH client to use the key you created to connect to github.
56-
For that, add the following lines to your `~/.ssh/config` file:
56+
Next, you need to tell your local SSH client to use the key you created to connect to GitHub.
57+
For that, add the following lines to your `ssh` configuration file (typically at `~/.ssh/config` on UNIX systems):
5758

5859
```bash
5960
Host github.com
@@ -62,11 +63,11 @@ Host github.com
6263
IdentityFile ~/.ssh/github_authenticate
6364
```
6465

65-
or the path to your key you chose earlier.
66+
or use for the `IdentityFile` field the path you chose earlier for the ssh key file.
6667

6768
!!! warning "Username"
6869
It is important that the `User` is `git` and **not your git-username**!
69-
Github will identify you automatically based on the email address you used to create the SSH key.
70+
GitHub will identify you automatically based on the email address you used to create the SSH key.
7071

7172
#### Test Access
7273

@@ -90,7 +91,7 @@ When you clone a new repository, always use the SSH url
9091
git clone [email protected]:pylhc/omc3.git
9192
```
9293

93-
which you can find from the ++"Clone"++{.green-gui-button} button of the repository page on github.
94+
which you can find from the ++"Clone"++{.green-gui-button} button of the repository page on GitHub.
9495

9596

9697
!!! tip "Changing a Repository URL"
@@ -111,8 +112,8 @@ which you can find from the ++"Clone"++{.green-gui-button} button of the reposit
111112
You can setup https access by creating and using a personal access token or a password manager.
112113

113114
!!! note "Not yet documented"
114-
As I am using SSH access, this is not yet documented.
115-
Refer to the [github documentation][github_https] for more information and maybe write up a quick howto.
115+
As we use SSH access, this section not yet written.
116+
Refer to the [GitHub documentation][github_https] for more information and maybe write up a quick howto.
116117

117118

118119
## Configuring Gitlab CI to Automatically Pull into AFS

0 commit comments

Comments
 (0)