Preparing your computer for communication with the Gitlab Repository of Uni Konstanz - galizia-lab/pyview GitHub Wiki

Step 1: Ensure git is installed and working

Check if git is installed on your system by opening a terminal/Powershell and typing in git --version. If you see something like git version 2.31.1.windows.1, git is installed and you can proceed to the next step. If you get an error, git is not installed on your computer, install it from here

Step 2: Ensure ssh is installed and working

Make sure ssh is installed by opening a terminal/Powershell and typing in ssh --version. Else install it. Windows How-to, On Linux: install the package openssh-client using your package manager. Should be preinstalled on MAC (therefore, on MAC, 'ssh --version' is not helpful).

Step 3: Create and add ssh-key pair

WHY: Our gitlab server only allows authentication with ssh keys. You create one pair of private-public keys and give the public key to the gitlab server. With this done, there will be secure communication with the gitlab server and your computer.

HOW: Create an ssh-key pair and add it to your account on this git server (gitlab.inf.uni-konstanz.de) (How-to). You can check if your computer is able to securely communicate with our gitlab server using 'ssh -v [email protected]'

Step 4 (Only on Windows): Tell git to use the proper SSH

WHY: Git comes with its own installation of SSH, which it will prefer over the one installed by Windows. So we need to tell Git to use the correct installation of SSH.

HOW: In a Powershell type the command

git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe.

In case you get an error, check the location of SSH installed by windows using the command Get-service ssh and use the correct executable in the command above.

Step 5 (Only on Windows): Set SSH agent to start automatically.

WHY: User authentication of our Gitlab server, where the source code of our softwares are hosted, is only possible using SSH keys, which were created in Step 3. We now need an "agent" to run in the background who will remember your SSH key details and provide them to the server whenever asked.

HOW: Open a PowerShell in administrator mode and paste following command

Get-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service

Step 6: Give your SSH key details to the agent

Start the ssh agent by typing ssh-agent. Then type ssh-add <path to your key without any extension> for the SSH key created in Step 3. It is by default in the folder ".ssh" in your home folder. When prompted enter your passphrase.

Step 7: Done!

Your computer is now ready to seamlessly communicate with the Gitlab server at Uni-Konstanz!