Use different SSH Key for Github Deployment
A problem I recently experienced was, that I wanted to use a different SSH Key for cloning my repositories on production.
Background: I would like to use a different key (read-only) on my servers. A nice solution on Github is to set specific Deployment keys to checkout repositories for example on the production server. (https://docs.github.com/en/free-pro-team@latest/developers/overview/managing-deploy-keys#deploy-keys)
Steps:
1) Create a new SSH Key Pair on the machine you would later on like to read the repository. The command is as simple as `ssh-keygen`. Don't use the default path, as this would overwrite your existing one. I also did not add a passphrase.
2) Open and edit ~/.ssh/config. In my case, the file did not exist yet. Add the following content to the file:
Host github.com
IdentityFile ~/.ssh/github_rsa
Adjust the path to the one set in step 1.
3) Add the public key on your Github repository (Settings -> Deploy keys)
Done :)