In .ssh folder, generate a new key:

$ ssh-keygen -t rsa -C "your-email-address" -f "id_rsa_OTHERUSER"
# Your identification has been saved in take_rsa.
Your public key has been saved in
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |

Ensure ssh-agent is enabled:

$ eval "$(ssh-agent -s)"
# Agent pid 59566

Add your new key:

$ ssh-add ~/.ssh/id_rsa_OTHERUSER
# Identity added: id_rsa_OTHERUSER (id_rsa_OTHERUSER)

Edit your config file:

vim ~/.ssh/config

With this:

Host github-OTHERUSER
    User git
    IdentityFile ~/.ssh/id_rsa_OTHERUSER

Your remote url should be:


You can update the user name and email in your repository

git config "OTHER_USERNAME"
git config "OTHER@EMAIL.COM"