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: docs/resources/git_setup.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,28 @@
1
1
# Git
2
2
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.
4
4
5
5
## Github Commandline Access Quickstart
6
6
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}.
11
11
12
12
### Setup SSH Access
13
13
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].
15
16
16
17
#### Create SSH Key
17
18
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:
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.
25
26
The file should be placed in `~/.ssh/`, unless you are on `afs`, in which case the `~/private/` directory should be used.
26
27
27
28
```text
@@ -32,7 +33,7 @@ The file should be placed in `~/.ssh/`, unless you are on `afs`, in which case t
32
33
You can optionally provide a passphrase for the key, which will make it more secure.
33
34
This way, even if someone else gets a hold of the private key file, they will not be able to access it.
34
35
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.
36
37
37
38
This will create two files: `github_authenticate` and `github_authenticate.pub`.
38
39
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
41
42
!!! quote "Keep it secret, keep it safe!"
42
43
_Gandalf_, about private SSH keys (probably).
43
44
44
-
#### Add SSH Key to Github
45
+
#### Add the Public SSH Key to GitHub
45
46
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`.
48
49
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.
49
50
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`.
51
52
Then click on `Add SSH key` and you are done.
52
53
53
54
#### Configure SSH to use the key
54
55
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):
57
58
58
59
```bash
59
60
Host github.com
@@ -62,11 +63,11 @@ Host github.com
62
63
IdentityFile ~/.ssh/github_authenticate
63
64
```
64
65
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.
66
67
67
68
!!! warning "Username"
68
69
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.
70
71
71
72
#### Test Access
72
73
@@ -90,7 +91,7 @@ When you clone a new repository, always use the SSH url
0 commit comments