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