configuration.md 1007 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## How to configure `git`?

```bash
$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "first.last@uni.lu"
```


## Test the configuration

Test whether your username and email have been registered

```bash
$ git config --list
```

<br>
This should list the configuration with `user.name` and `user.email`.

Laurent Heirendt's avatar
Laurent Heirendt committed
20
21
22
<br>
Exit by typing `q`.

23
24
25
26
27

## What is an SSH key?

An SSH key is a secure access credential.

Laurent Heirendt's avatar
Laurent Heirendt committed
28
<div class="fragment">
29
<br>
Laurent Heirendt's avatar
Laurent Heirendt committed
30
31
**Principle**: <br><br>
Communicate **securely** with Github/Gitlab **without** entering the username/password.
32
33
34
35
36
37
38
39
40
41
42


## How do I get and set my SSH key?

<br>
Check if you already have an SSH key:

```bash
$ ls -al ~/.ssh
```
<br>
Laurent Heirendt's avatar
Laurent Heirendt committed
43
If there are 2 files named `id_rsa`, you have an SSH key.
44
45
46
47
48

<div class="fragment">
<br><br>
If you don’t have yet an SSH key, you have to generate one:
```bash
Laurent Heirendt's avatar
Laurent Heirendt committed
49
$ ssh-keygen -t rsa # -b 4096
50
51
52
```

<br>
Laurent Heirendt's avatar
Laurent Heirendt committed
53
Then, add the SSH key to Github/Gitlab.
54

Laurent Heirendt's avatar
Laurent Heirendt committed
55
56
<div class="fragment">
<img src="img/icon-live-demo.png" height="100px">