Setting up local repo on new machine + SSH keys


Pavel⇢ has tought me this:

  1. login at github.com
  2. generate an SSH key. Paste ssh-keygen -t ed25519 -C "your_email@example.com" to Terminal, replace email (github tutorial).
  3. Add the new key to ssh config (~/.ssh/config):

Host *`

AddKeysToAgent yes`

IdentityFile ~/.ssh/gardenKey`

  1. enter cat ~/.ssh/gardenKey.pub to print insides of the .pub file (public part of the key)
  2. copy contents to github.com/settings/ssh/new and add
  1. clone repo using SSH at github.com (code dropdown)
  2. type in cd to go to home dir
  3. type in git clone + space + copied SSH address
  4. type in: sergei@Sergeis-MacBook-Pro garden % git config --global user.name "Sergei Kalabin"
  5. type in: sergei@Sergeis-MacBook-Pro garden % git config --global user.email "deltakatachre@gmail.com"