... | @@ -56,7 +56,7 @@ Let's get this info from git's website: |
... | @@ -56,7 +56,7 @@ Let's get this info from git's website: |
|
Then from the Wikipedia page about GitLab:
|
|
Then from the Wikipedia page about GitLab:
|
|
> "[GitLab is a web-based Git-repository manager with wiki and issue-tracking features, using an open-source license, developed by GitLab Inc.](https://en.wikipedia.org/wiki/GitLab)"
|
|
> "[GitLab is a web-based Git-repository manager with wiki and issue-tracking features, using an open-source license, developed by GitLab Inc.](https://en.wikipedia.org/wiki/GitLab)"
|
|
|
|
|
|
For you, as a student, this means you will
|
|
For you, as a student, this means you will [TODO]
|
|
1. Learn how to use version control in order to help prepare you for the working world,
|
|
1. Learn how to use version control in order to help prepare you for the working world,
|
|
2. Be able to safely submit and track your code, with the over-site of the lecturers and demis,
|
|
2. Be able to safely submit and track your code, with the over-site of the lecturers and demis,
|
|
3. Have a safe place for your project code, provided you push your local changes back to the CS GitLab server.
|
|
3. Have a safe place for your project code, provided you push your local changes back to the CS GitLab server.
|
... | @@ -80,13 +80,34 @@ If you have been enrolled in a course that uses GitLab for projects, you should |
... | @@ -80,13 +80,34 @@ If you have been enrolled in a course that uses GitLab for projects, you should |
|
### SSH key Setup
|
|
### SSH key Setup
|
|
Next, we will need to add your SSH key so that you can `clone` a copy of the project repository (or repo for short) to your local PC. We assume you are using a NARGA machine, but these instructions should be applicable for any Linux machine.
|
|
Next, we will need to add your SSH key so that you can `clone` a copy of the project repository (or repo for short) to your local PC. We assume you are using a NARGA machine, but these instructions should be applicable for any Linux machine.
|
|
|
|
|
|
|
|
The purpose of the SSH key is for you to authenticate that you are who you are to the server. So **DO NOT** share the key, or your password that you used to lock the key. Keep your password safe, but don't forget it! You can note it down somewhere safe and keep it with you as you will need it to unlock the SSH key in future.
|
|
|
|
|
|
#### Create a new SSH key
|
|
#### Create a new SSH key
|
|
At the below link you will find a guide as to how to create your key.
|
|
At the below link you will find a guide as to how to create your key.
|
|
1. Click the button *"HOW TO GENERATE AN SSH KEY PAIR"*.
|
|
1. Click the button *"HOW TO GENERATE AN SSH KEY PAIR"*.
|
|
2. Follow the guide from *Generate an SSH Key Pair*.
|
|
2. Follow the guide from *"Generate an SSH Key Pair"*.
|
|
|
|
|
|
[[http://cs.sun.ac.za/rw244/program/#repositories]]
|
|
[[http://cs.sun.ac.za/rw244/program/#repositories]]
|
|
|
|
|
|
|
|
#### Add SSH key to GitLab
|
|
|
|
Now we will copy the key you have just created to your GitLab account.
|
|
|
|
|
|
|
|
1. Open terminal.
|
|
|
|
2. Type: `cat ~/.ssh/id_rsa.pub`.
|
|
|
|
|
|
|
|
For example (usually the key appears on more than one line):
|
|
|
|
```
|
|
|
|
$ cat ~/.ssh/id_rsa.pub
|
|
|
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB/Qw/T0HlOcbh+joCpYjyQQo4X0C0JHDhw08EPxjYs1vC1eiN3Rd6rL7YGhQqhmhduoAwMZszqN8HL/lXVecljbGzh5e6nPt47yrCMO8LRW5tjUc1yF9SVpslqI+ehFX6aFFMByMLCA5Z4LHiukTQ0frmYhzeRnQYuzD8e2nywBCWUeGK+nNmqVbgcZoH6xPHeiLV+g+1mBLOmZzNzHLCzteHXRISzb/3AthRq6YVPFCHRLfubekQCCXlYHYCjA890dQ-s+9SUjBpYXB/VvYKYolW1diXSQ7VvkD38BJlOq6L9pKH0NlAxhAEzUSfrWN0gm8OBkIBb/dksIDxQvUUmvEiD4DW693RUevl/1hZsZ/hQmk3TSdK62C7z7eSlroS59eCcaAVRL009crF3H3gAUjMh/XfBY9nw+8HBpBA6BlOSI29owviZFUexVHcUG6SVkGyaH/Z9R6cYJZnDIRC4MmDNDVUnERR+1dAhgXHIqpYDG0h5cWlDvpzosIAkPK5y+/ExsjCPkRlEX5mMgL7Nm5pmtD/avxCeQRVRRsag//FPY50Nns8a4+J5yZb0uM8eTEAug1CDSNrmSl4ofrchCJxvVo9BQ0yA/kS9I2ffnUhftr/TzhlXQVkGx3/7+aSA6vpXgWByrPiW4fDilPq0Gp8XZJP8DIwiPGt1GXp name@example.local
|
|
|
|
```
|
|
|
|
3. Now, in your terminal, copy everything from (and including) the `ssh-rsa` to the end of what would be the `example.local` from the above. You should have copied the entire content of the file.
|
|
|
|
4. In GitLab, click the top right button by your name (you'll need to be logged in) and choose __Settings__ then __SSH Keys__ from the left menu. It will look like this:
|
|
|
|

|
|
|
|
5. Paste the key you copied into the *Key* section, and add a name for your key, or accept the default.
|
|
|
|
6. Click __"Add Key"__. This option will only show up if the key is correctly copied over.
|
|
|
|
|
|
|
|
Well Done!
|
|
|
|
|
|
### First project clone
|
|
### First project clone
|
|
|
|
|
|
### Understanding the `git` workflow
|
|
### Understanding the `git` workflow
|
... | | ... | |