SSH/GIT authentication cheatsheet for dummies
Since I’m often an airhead here is my cheatsheet:
# Folder with ssh keys on unix, sudo could be necessary
cd ~/.ssh
# Add a key for key authentication (Github, Gitlab, ecc)
ssh-keygen -t rsa -C "[email protected]"
# insert a different name if you already have id_rsa
# Add key to the agent
eval `ssh-agent -s`
ssh-add id_rsa
# Then open the id_rsa.pub and copy the key on Github, Gitlab
git init
git remote add origin [email protected]
git pull origin master
# or simply git clone [email protected]
Yeah I know I seem stupid to keep a note here for these lines but I’m done forgetting this simple stuff >.<