SSH agent setup for multiple Bitbucket account
First of all, set up your SSH key both locally my-id-rsa
and also on the remote bitbucket web UI my-id-rsa.pub
Adding bitbucket.org-suffix
For project aaaaa
you just adding -aaaaa
after the domain name
git clone git@bitbucket.org-aaaaa:minor_digital/my-project.git
Edit config file
Edit your config file reside in your home ~/.ssh/config
folder.
Create new one if there is no any.
Note the the Host MUST match with your host in git command
Host bitbucket.org-aaaaa
Hostname bitbucket.org
User git
IdentityFile ~/.ssh/my-id-rsa
What need to be matched
@bitbucket.org-aaaaa in the git command
- Config file Host bitbucket.org-aaaaa