Configuration

Configure an SSH Key

To work effectively with the school’s GitLab server, you must configure an SSH key on every computer you use and enter the public key in your user profile.

When you are logged into GitLab, you should see a warning message similar to the one below.

add ssh key 01

Click on the Add SSH key button.

add ssh key 02

Then click the Add new key button.

In a terminal on your laptop, create an SSH key with the Ed25519 algorithm.

Note
For more information, especially if you are using Windows or Mac, refer to the GitHub documentation.
$ ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/arthur/.ssh/id_ed25519): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/arthur/.ssh/id_ed25519
Your public key has been saved in /home/arthur/.ssh/id_ed25519.pub
[...]

Two files have been generated. id_ed25519 contains the private key, while id_ed25519.pub contains the public key.

In GitLab paste your public key in the Key field.

add ssh key 03

Select an appropriate expiration date. Click on the Add key button to save the key.

Check that you can clone a repo.