Add ssh key (Git)

Open a terminal

ssh-keygen

Press enter if you don’t want to change filename

Write a passphrase (optional)

cat ~/.ssh/id_rsa.pub

Copy output

Go to github.com account > settings
Select ssh keys on left side, select add ssh key
Write name of key and paste key from terminal

Select ssh when you want to copy the “clone adress”.
Enter previously passphrase and select “remember”.

To change an existing https key do:

git remote set-url origin SSH_ADDRESS

Leave a Reply