Skip to content

Instantly share code, notes, and snippets.

@otkrsk
Last active July 26, 2016 02:22
Show Gist options
  • Save otkrsk/50a480af849d618d154ff18b8f5cea60 to your computer and use it in GitHub Desktop.
Save otkrsk/50a480af849d618d154ff18b8f5cea60 to your computer and use it in GitHub Desktop.
Generate SSH keys on your server so that you can pull from your repository without using passwords.
cd ~/.ssh
ssh-keygen -t rsa

enter gitlab_rsa leave password empty

cat ~/.ssh/gitlab_rsa.pub

copy, and paste it in gitlab repo settings > deployment keys,

next, need to add gitlab as a source

nano ~/.ssh/config

Host gitlab.com
 IdentityFile ~/.ssh/gitlab_rsa

git remote add origin [email protected]:<repo owner>/<repo name>.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment