Generate Public and Private Key:
ssh-keygen -t rsa -b 2048
Copy contents of .pub to provider.
Configure private key path
vi ~/.ssh/config
Host {host of git}
PreferredAuthentications publickey
IdentityFile /path/to/privatekey
Reference:
https://docs.gitlab.com/user/ssh/
git ssh