# Git setup and configuration ## Git setup To clone this repository both [git](https://git-scm.com/downloads) and [git LFS (Large File Storage)](https://git-lfs.github.com/) must be installed on the target (host) machine: ```console sudo apt install git git-lfs ``` To complete the configuration: ```console git config --global user.name "" git config --global user.email "" ``` ## Repository configuration To clone the repository via ssh: 1. Generate an SSH key pair using the following command. When prompted for passphrase press enter to leave the field blank. ```console ssh-keygen -t rsa -b 4096 -C "" ``` 2. Add the ssh key to the ssh agent: ```console eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa ``` 3. Copy the ssh key to clipboard: ```console sudo apt-get install xclip cat ~/.ssh/id_rsa.pub | xclip -selection clipboard ``` 4. Add the ssh key to GitLab account: 1. Access GitLab profile 2. Navigate to "Preferences" -> "SSH Keys" then press "Add new key" 3. Paste the text copied at the previous step in the "Key" field and remove the Expiration Date, then press "Add key" 5. Now the project can be cloned using the following command, specifying **"yes"** when promped for the ssh key: ```console git clone git@gitlab.com:HMDrive/hmd_project.git ```