bitbucket多账户git解决方案
生成多个公私密钥对
1 | ssh-keygen -t rsa -f id_rsa_local |
公钥填入对应账户
https://bitbucket.org/account/settings/ssh-keys/
add key
修改host
C:\Windows\System32\drivers\etc\hosts
追加
1 | company bitbucket.org |
域名和私钥映射
C:\Users\<你的用户名>\.ssh
追加
1 | Host bitbucket.org |
使用
个人的账户还用 git clone git@bitbucket.org:xxx/xxx.git
公司账户就用 git clone git@company:xxx/xxx.git
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 ciiki的博客!
评论