Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,411
Community Members
 
Community Events
184
Community Groups

Multiple GitHub & BitBucket accounts - multiple SSH keys howto? (MacOSX 10.13)

So problem:

I have multiple accounts (several work/clients, personal) on both BitBucket and GitHub.

I have sorted that mess out using hostnames like client1-github, client2-github, work-github and personal-github in my ~/.ssh/config file, each then points to the correct SSH key (No, you can't use the same SSH key for multiple accounts, and I can't use the same work account on some clients as they want the @client.com accounts). I also am a bit stuck in NOT using the HTTPS methods as that involves passwords on the commandline for the repos which I need to avoid

The problem now is that SourceTree doens't pick that up, or write SSH keys so now it displays warnings and can't "connect" to previously connected gitHub/BitBucket accounts.


Is there a way to tell SourceTree
1) Which Key to use/point to for an specific GitHub/BitBucket account?
2) to spefify the SSH/git hostname to be used for GitHub/GitLab/BitBuccket for the SSH connections to be made via ~/.ssh/config?


Seems that SourceTree is very specifically made only for a user(s) that have a single GitHub/Bitbucket account ;(

1 answer

0 votes
Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 07, 2019

One way is to generate ssh keys from sourcetree itself to have it write the config with the right keys.

Do I then have to generate these keys on EACH computer I have the multiple accounts and have the plethora of SSH keys then in BitBucket/GitHub/etc?

It still seems to fail when adding the 2nd/3rd/4th SSH key for the next account as it doesn't seem to have a distinction in the ~/.ssh/config as it uses the same git@bitbucket/git@github , just the extra keys, thus it again fails ;(

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events