The title mostly says it all. I have a couple of wrinkles, though...
I have a work account and I have a personal account. I primarily develop node.js projects and I like to divide my projects up into multiple repositories so I can share code. Some projects are included in other projects as packages via
yarn add git+ssh://email@example.com:my_team/my_useful_package.git#1.0.0
I've seen several solutions for using multiple accounts, such as
1. modifying the ssh configuration to specify different hostnames and pulling from those modified hostnames, eg. https://blog.developer.atlassian.com/different-ssh-keys-multiple-bitbucket-accounts/
2. setting up new SSH keys and pulling using a username, as in https://confluence.atlassian.com/bitbucket/set-up-additional-ssh-keys-271943168.html
3. specifying which ssh key to use in the .git repository config via
git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example"
The problem with the first two is that they require changes to my ssh config on two machines (work and home) and changes to my package.json. The problem with the last one is that when I install my node packages, that SSH command is not used.
The ideal solution would be to allow the use of the same SSH key on two different accounts. The solution I am using is to manually tweak my SSH config when switching from work to personal projects (which works OK because there's no overlap between work and play time).
Has anyone come up with a better solution?
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events