| 82 | Set up SSH key for gitlab |
| 83 | - If you clone the repository with HTTPS, then you don't need to do this. However, then you will need to input your username and password every time you want to fetch or push from gitlab. To get around this, you can generate an SSH key pair and upload the public key to gitlab. |
| 84 | - navigate to your .ssh directory by doing "cd ~/.ssh" |
| 85 | - run the command "ssh-keygen". |
| 86 | - It will prompt you to name the file. For example, "gitlab". |
| 87 | - It will then prompt for a passphrase for the key. Leave it empty if you don't want to put in a password every time you use it, or put one for security if you prefer. |
| 88 | - Two files called "gitlab" and "gitlab.pub" will be created in the ~/.ssh directory now. We need to upload the public key to gitlab. |
| 89 | - Navigate to your .ssh directory and use the command "cat gitlab.pub" to print the contents of the file into the terminal. Copy all of the file, including the "sha-rsa" and the username at the end. |
| 90 | - Login to gitlab (the winlab specific gitlab! https://gitlab.orbit-lab.org) and click on your profile picture on the top right. |
| 91 | - Go to SSH keys and add the public key in the text box. You should now be able to access orbit gitlab repositories through ssh. |
| 92 | - NOTE: If you have previously cloned a repository using HTTPS instead of SSH, then you will need to update the remote URL. Follow this guide: https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories |
| 93 | |