8. Jun 2024 |

How to use git with multiple SSH keys

It is all written here in Github docs.

Check or edit config file: cat ~/.ssh/config which looks like this:

# github/terviseabc
Host github.com-terviseabc
  HostName github.com
  IdentityFile ~/.ssh/terviseabc_id_rsa

Generate keys.

ssh-keygen -f terviseabc_id_rsa

This is how I clone the repository from github:

git clone git@github.com-terviseabc:terviseabc/terviseabc.dev.git

How to use multiple SSH keys: https://www.youtube.com/watch?v=N2hMGEeYR7c

How to change your committer name.