This page is located in archive.

How to Use GIT with SSH key

When developing applications involving multiple developers, the management of source code can be effectively realized in version system, in our case GITu. It can also conveniently ensure the distribution of source code between e.g. home computer, workstation in classroom and MZAPO development kits from single git repository. For teaching and project needs at FEL, GIT repository hosting and management is provided by GitLab After signing up with CTU, FEL students can use GitLab for their projects. If you do not have (re)set GitLab local password use SSO login button for your authentization.

For convenient work with a GIT repository, it is recommended to register your public SSH key in the Git server (SSH key).

If you don't already use an SSH key, you can create one (in Linux) by using the ssh-keygen command, following instructions in Remote access. By default, the public and private parts of the key are saved to the directory .ssh in your home directory:

cat ~/.ssh/id_rsa.pub

Public part of the key (id_rsa.pub) register in your GitLab profile - by no means include a private part (id_rsa) of your key:

Your profile icon at right top corner → Settings → SSH keys

GitLab Protected Branch

The branch master is protected against retroactive change of a previously written history after the creation of a repository. If you need to remove something from its history and take a different path, then you need to abolish the protection set. Branch protection settings and cancellations are specified in the Settings → Repository → Protected Branches section of GitLab. Be careful with use, you disrupt history for other repository checkout and ''git reset origin/master`` would be necessary for others to get on the track again probably.

courses/b35apo/en/documentation/githowto/start.txt · Last modified: 2021/02/24 10:45 by pisa