git using different ssh key
-
First, generate new keygen
# ssh-keygen
Note: ensure id_rsa filename is a custom name, not default "id_rsa".
Example: ~/.ssh/id_rsa_custom_keyThen, add the custom key in github/git source
Then, clone/pull using command below using custom key
GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_custom_key' git clone [email protected]:chromium/chromium.git
Ref: https://ma.ttias.be/specify-a-specific-ssh-private-key-for-git-pull-git-clone/