When using SmartGit as SSH-client, it caches the first selected key. And when further you trying to pull/push to another repo, SmartGit says "Access denied"
.
SmartGit saves to preferences what key should it use to connect to the Bitbucket. But all repos has address: ssh://git@bitbucket.org
in SmartGit preferences.
As mentioned here and in this thread, you should be able to reference multiple private ssh keys in a
%HOME%\.ssh\config file
, changing the url tobitbucket1:userA/myrepo1
,bitbucket2:userA/myrepo2
.That means that:
%HOME%\.ssh\config file
with:config:
/C/path/to/.ssh/
, you have akey1
(private) andkey1.pub
(public) ssh files (same forkey2
/key2.pub
)