You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am trying to configure SourceTree to connect to multiple Git repositories that are hosted under different Organizations in Azure DevOps. I access both organizations using the same Azure Active Directory account.
I can successfully add a Hosting Account with a Personal Access Token for the first organization, for example:
Tools > Options > Authentication > Add
Hosting Service: Azure DevOps
Host URL: https://dev.azure.com/[OrganizationA]
Preferred Protocol: HTTPS
Authentication: Personal Access Token
I try to add a second Hosting Account using the same settings as above, but with the following fields different:
Host URL: https://dev.azure.com/[OrganizationB]
But I get the following error:
An account already exists for '[myemail]@[mycompany].email@example.com'
This looks like a limitation in SourceTree that it cannot support multiple accounts with the same username and root URL.
I tried manually editing the file C:\Users\[username]\AppData\Roaming\Atlassian\SourceTree\accounts.json but couldn't get it working - although I could see both accounts in the Authentication settings and set the correct PAT for each one, I don't think the rest of the app knows how to choose the correct account and I got authentication errors.
I am on Windows 10 Pro x64 21H2 using SourceTree 3.4.7 (Enterprise installer)
I had the same issue here. I did a hacky thing to be able to connect to multiple organisations: Azure DevOps still support old organisation URL from visual studio time.
So instead of using https://dev.azure.com/[OrganizationA] and https://dev.azure.com/[OrganizationB], use https://[OrganizationA].visualstudio.com/ and https://[OrganizationB].visualstudio.com/ URL as host. And sourcetree will be happy with this as domain is different.