|
|
|
# SSH keys
|
|
|
|
|
|
|
|
These keys will make life easier. Don't worry about the details. Just follow the steps!
|
|
|
|
|
|
|
|
|
|
|
|
## Login to GitLab
|
|
|
|
|
|
|
|
- Make sure you are **logged in** on [https://git.ti.howest.be/](https://git.ti.howest.be/) if you aren't already.
|
|
|
|
- Go to the right of the page (avatar-icon with a down-arrow) and press it followed by **settings**.
|
|
|
|
- At the left choose **SSH Keys**
|
|
|
|
- Keep this window open and proceed to the next step
|
|
|
|
|
|
|
|
## Generate SSH Keys
|
|
|
|
|
|
|
|
- Open ``Git Bash`` if it isn't already open. By pressing the windows button and searching for ``git bash``. A black window should open where you can type stuff.
|
|
|
|
- In the black window type the following command where you replace your firstname and your lastname to your names: ``ssh-keygen -t ed25519 -C "firstname lastname laptop" ``
|
|
|
|
- The command will state that it is _generating a public/private ed25519 key pair_ and it will ask where it should store it. **Just press enter** (without entering anything)
|
|
|
|
- It will then ask for a **passphrase**. Once again just press **enter** (don't enter anything)
|
|
|
|
- **Enter** once again on the question to type the same passphrase again.
|
|
|
|
- Some weird looking symbols should apear as shown in the image below.
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
## Copy (public) Key to GitLab
|
|
|
|
|
|
|
|
- Still in the black window (git bash) type the following command ``cat ~/.ssh/id_ed25519.pub``
|
|
|
|
- This should print some text starting with _ssh-ed25519_ and ending with your _firstname lastname laptop*
|
|
|
|
- Select this text with your mouse and copy it (right-click > copy)
|
|
|
|
- Go back to your browser (from the previous step) to GitLab and paste the key in the field **key**.
|
|
|
|
- Enter a **title**. For example _firstname lastname laptop_
|
|
|
|
- Leave **Expires at** alone (this means it won't expire)
|
|
|
|
- Press **Add key**
|
|
|
|
|
|
|
|
|
|
|
|
## Test if it works
|
|
|
|
|
|
|
|
To test you need to go back to the black window (git bash) and type the following command: ``ssh -T git@git.ti.howest.be`` Answer **yes** to the question "`Are you sure you want to continue connecting (yes/no)?`"
|
|
|
|
|
|
|
|
Try to run the same command again: ``ssh -T git@git.ti.howest.be``. Now it should only say "Welcome to GitLab, @firstname.lastname!"
|
|
|
|
|
|
|
|
|
|
|
|
# More information or troubleshooting
|
|
|
|
|
|
|
|
If there are teachers around, go ahead and ask! :)
|
|
|
|
|
|
|
|
Otherwise this might help: [SSH Explanation and Troubleshooting](https://git.ti.howest.be/ti-public/kickoff/2022-2023/-/wikis/software/ssh-explanation-and-problems)
|
|
|
|
|
|
|
|
# Next up
|
|
|
|
|
|
|
|
[Software Installation Semester 1](software/Semester-1) |
|
|
|
\ No newline at end of file |