Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Connect Azure Devops Account Edited

Hi there,

so, im having trouble with the subject with Sourcetree 3.0.1. 

A few months ago, I cloned the project using a username&Token url. 

As it seems the Token has expired and so i've created a new one and tried adding the account to sourcetree. 

I'm typing in the username (tried primary and secondary) & token as described in my account in

The only thing i'm baffled about is the host i should be using, tried:


2. my git url. 


keep getting: 

We couldn't connect to Azure DevOps with your ('MyUserName') credentials. Check your username and try the password again.


What am i missing? 


Screen Shot 2019-02-05 at 12.59.20.png


7 answers

I got this working via the following steps:

  1. Create a PAT in azure DevOps (
  2. Make sure you copy the generated PAT as you won't be able to view it again
  3. On Source Tree, go to add account and select Azure DevOps
  4. for the host, I used https://{organisation} as the new URL format for azure DevOps didn't work
  5. enter the generated PAT as username
  6. use the PAT you just generated for the password as well


If somehow your Sourcetree doesn't seem to be using the right PAT credentials when you try to clone your repo, force Sourcetree to use the credentials by prefixing the URL with them:

  1. Get the URL from the Azure DevOps Repo, ie: https://{organisation}{projectname}/_git/{projectname}
  2. Add the token as username and password in the URL of the repo, ie:

Using these steps, SourceTree will force using the PAT as credentials for the repo and you can clone and work on the repo directly.

PS: Somehow, I couldn't get the username - PAT as a password combination working. I found out this route and it works for me.

I hope it saves you some time!

this worked for me! thanks Edwin.

Like Edwin Klesman likes this
Like Edwin Klesman likes this

Good to read that! I know that connections like this can be a little fragile, but what I understand from MS is that the current setup will last for the upcoming period. 

Thanks for the update @Christian_Wölke 

So.. adding an account didn't work for me, but i managed to solve the problem by changing the repository url to include the new token 

Sourcetree -> repository -> repository settings -> remotes

Hope it helps someone... 

doesn't work for me. the repository settings option is disabled

did you solve this?

I managed to get this sorted by doing the following.

  1. Create a PAT in azure devops (
  2. Make sure you copy the generated PAT as you won't be able to view it again
  3. On Source Tree, go to add account and select Azure DevOps
  4. for host, I used https://{organisation} as the new url format for azure devops didn't work
  5. enter username that you use
  6. use the PAT you just generated for the password

Hope this helps


above works for adding the account, but gets an error when trying to clone a repo from DevOps as the git url is in the old format. 

Like # people like this

@Amila_Udayanga .. did you resolve the cloning issue. If so... how did you fix?

@Craig Haydon I managed to get it working using his/her instructions. Step 4 is the important one then it's just a matter of logging in.

There is still a bug open for that topic, since one year. Please vote for it, to solve it asap.

Authentication fails when using Azure DevOps URL





for me works to add an Account using the URL




Username: Your PAT

Passwort: Your PAT



How to create a PAT (Personal Authentication Token):


Then all works fine!


Kind Regards



Bildschirmfoto 2020-01-12 um 18.40.55.png


Bildschirmfoto 2020-01-12 um 18.36.13.png

It is really working. 


I w as able to log in and clone the repo successfully. Thanks for the instructinos.!

Glad it helped :)

Hi Guys

A few of you are describing an workaround with using the visualstudio URL. But the main problem is, that the new azure URL does not work.

This needs to be fixed please.



It seems to be different depending on unknown factors.

When I open up my projects (even one I created this January (2020), and go to the repo to find the clone URL it says:


So I use that. I didn't bother checking if the new URL format works since the tool shows me that URL. 

If there are people that see the new URL format as "clone url" for their repo and that is not working, you're right: it should be fixed. But it needs to be fixed by Microsoft


What I find troublesome is the lack of documentation stating on how to get access to the repo correct (PAT as username and as password?)... This takes a lot of time for people.

Hi Edwin

Thanks for the answer.

I already mentioned that problem posted a bug also in the Microsoft community.

For me it is not clear where the bug needs to be fixed. Maybe you can also contribute on that bug.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,261 views 4 5
Read article

Community Events

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

Events near you