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,459,785
Community Members
 
Community Events
176
Community Groups

Multiple hosting accounts with the same username

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

Username: [myemail]@[mycompany].com

Password: [PAT_A]

 

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]

Password: [PAT_B]

But I get the following error:

An account already exists for '[myemail]@[mycompany].com@dev.azure.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)

1 answer

0 votes

Hello,

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.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events