How to use different keys for different Bitbucket repos in SmartGit?

天涯浪子 提交于 2019-12-08 21:47:32
VonC

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 to bitbucket1:userA/myrepo1, bitbucket2:userA/myrepo2.

That means that:

  • you have selected System SSH in the preferences
  • have added a %HOME%\.ssh\config file with:

config:

host bitbucket1
        user git
        hostname bitbucket.org
        port 22
        identityfile /C/path/to/.ssh/key1
host bitbucket2
        user git
        hostname bitbucket.org
        port 22
        identityfile /C/path/to/.ssh/key2
  • in /C/path/to/.ssh/, you have a key1 (private) and key1.pub (public) ssh files (same for key2/key2.pub)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!