|
|
# Install git
|
|
# Install git
|
|
|
|
|
|
|
|
If you work on windows, git should be installed.
|
|
If you work on windows, git is not provided by Microsoft with the OS. You must install it before the next steps.
|
|
|
|
|
|
|
|
## Download
|
|
## Download
|
|
|
|
|
|
| ... | @@ -8,18 +8,71 @@ Download the latest version of git from the website: https://git-scm.com/ |
... | @@ -8,18 +8,71 @@ Download the latest version of git from the website: https://git-scm.com/ |
|
|
|
|
|
|
|
## Install
|
|
## Install
|
|
|
|
|
|
|
|
Double-click on the installer, then follow the instructions. Choose the default options except for the default editor which is configured for "vim".
|
|
Double-click on the installer, then follow the instructions. Choose the default options except for the default editor which is configured for "vim" (an old type of editor which is rather difficult to use).
|
|
|
|
|
|
|
|

|
|

|
|
|
|
|
|
|
|
Choose one editor that you know well instead of vim (unless you want to learn vim).
|
|
Choose one editor that you know well instead of vim.
|
|
|
|
|
|
|
|
## Configure git
|
|
|
|
|
|
|
|
From this moment, you can use "git" by right-clicking on a folder in the windows explorer and by running "git bash here". Git is also available in any command-line window (Run "cmd"), then type "git" in the terminal.
|
|
|
|
|
|
|
|
Open "git bash" and type these commands.
|
|
|
|
```
|
|
|
|
git config --global user.name "Your Name"
|
|
|
|
git config --global user.email "your_email@student.uliege.be"
|
|
|
|
```
|
|
|
|
Git must know your name and e-mail address. All your personnal work will be identified on GitLab with these 2 strings.
|
|
|
|
|
|
|
|
## Configure SSH keys
|
|
## Configure SSH keys
|
|
|
|
|
|
|
|
From this moment, you can use "git" by right-clicking on a folder in the windows explorer and by running "git bash here". Git is also available in any command line window (Run "cmd")
|
|
The GitLab of ULiège does not allow you to use your student ID / password for git commands. It uses a "SSH keys".
|
|
|
|
|
|
|
|
Go to the "Settings" of your account (upper right corner of the GitLab website)
|
|
|
|

|
|
|
|
|
|
|
|
Then choose "SSH keys" on the menu on the left.
|
|
|
|
|
|
|
|
Follow the [procedure](https://gitlab.uliege.be/help/ssh/README#generating-a-new-ssh-key-pair) to create a SSH-key pair.
|
|
|
|
Use the RSA type, which is more compatible with older machines (suc as NIC4)
|
|
|
|
```
|
|
|
|
$ ssh-keygen -o -t rsa -b 4096 -C "demo"
|
|
|
|
Generating public/private rsa key pair.
|
|
|
|
Enter file in which to save the key (/c/Users/boman/.ssh/id_rsa):
|
|
|
|
Enter passphrase (empty for no passphrase):
|
|
|
|
Enter same passphrase again:
|
|
|
|
Your identification has been saved in /c/Users/boman/.ssh/id_rsa.
|
|
|
|
Your public key has been saved in /c/Users/boman/.ssh/id_rsa.pub.
|
|
|
|
The key fingerprint is:
|
|
|
|
SHA256:8ijxJLH1SETJZVkbRbBUXXdlmXE17C3mspK/KrSC/Jc demo
|
|
|
|
```
|
|
|
|
You can use no passphrase if you do not share your private key (if it stays on your laptop).
|
|
|
|
|
|
|
|
The previous command created 2 files located in `/c/Users/your_name/.ssh/`. A public key `id_rsa.pub` and a private key `id_rsa`. The private key is similar to a password. Anyone who owns this file is able to behave as you on GitLab. It should never be shared if it is not protected by a password!
|
|
|
|
|
|
|
|
Open the public key (file `/c/Users/your_name/.ssh/id_rsa.pub`) in an editor...
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
...and copy/paste its contents to the box in the SSH keys of the gitlab website.
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
Then click on the "Add" button.
|
|
|
|
|
|
|
|
See also:
|
|
You can test that you are able to connect to GitLab with the following command (check that you target `gitlab.uliege.be` instead of `gitlab.com` in the instructions!):
|
|
|
* https://tortoisegit.org/
|
|
```
|
|
|
|
$ssh -T git@gitlab.uliege.be
|
|
|
|
The authenticity of host 'gitlab.uliege.be (139.165.47.38)' can't be established.
|
|
|
|
ECDSA key fingerprint is SHA256:4DyJeec4s+THW2EOZw5xjGgk6ZUcgmWjCcX33hVep7g.
|
|
|
|
Are you sure you want to continue connecting (yes/no)? yes
|
|
|
|
```
|
|
|
|
answer "yes" (you will be asked only once).
|
|
|
|
```
|
|
|
|
Warning: Permanently added 'gitlab.uliege.be,139.165.47.38' (ECDSA) to the list of known hosts.
|
|
|
|
Welcome to GitLab, @R.Boman!
|
|
|
|
```
|
|
|
|
If you do not get the welcome message, something went wrong in the previous steps.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\ No newline at end of file |