|
|
|
|
|
by AndyJames
1420 days ago
|
|
Different addresses for different repos are pretty straightforward. Can someone tell me please how to use multiple SSH keys. I have constant problem with Bitbucket because they require SSH key to be unique across whole platform. I work on many projects. Some companies require me to use Bitbucket account created by them with their email address. I can't add my SSH key to such account because it's already assigned to my private account. My workaround is to use GitKraken which allows assigning SSH keys per repo but I would really like to have this option in command line and don't need full GitKraken license just for pushing changes |
|
git clone -c "core.sshCommand=ssh -i ~/.ssh/bitbucket-work -F /dev/null" git@bitbucket.com:example/example
For existing repo:
git config core.sshCommand "ssh -i ~/.ssh/bitbucket-work -F /dev/null"
Where "bitbucket-work" is the name of the key for that particular repo.