This instruction helps create multiple ssh keys for local machine to use multiple git remote repositories.
$ ssh-keygen -t rsa -C "your_email1@youremail.com"
$ ssh-keygen -t rsa -C "your_email2@youremail.com"
Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/user1
Host git.everymatrix.com
HostName git.everymatrix.com
User git
IdentityFile ~/.ssh/id_rsa
Checkout .git/config
:
Update Host in origin to the Host that defined in ~/.ssh/config
[remote "origin"]
url = git@bitbucket.org:activehacker/gfs.git
...
Make sure @bitbucket.org
to match config host