Arseniy
Arseniy

Reputation: 879

Connect from Sourcetree to Azure DevOps Server 2020

I have a repo in Azure DevOps Server 2020 (on-premise), which contains a lot of files. I'm trying to use Sourcetree to maintain changes in repo.

Sourcetree has an option to setup remote account to connect to ADS. But I cannot connect to ADS, I get strange errors.

I tried using Host URL with only domain, with collection name and even with project name, but no success :(

Settings before clicking "Refresh Personal Access Token".

enter image description here

Then I add my PAT via "Refresh Personal Access Token", I use my ADS username (integrated with Active Directory) and PAT as password:

enter image description here

I get the error after enterring username and PAT:

enter image description here

So my questions:

  1. Is my authenication flow correct?
  2. Should I use only hostname as "Host URL" in Sourcetree or I should add also Organisation (Collection) and Project name?
  3. What should I use in PAT request:

Upvotes: 0

Views: 3892

Answers (2)

bacca87
bacca87

Reputation: 43

I encountered the same issue, and I resolved it by including the credentials directly in the URL, like this:

https://username:[email protected]/repo

Note: If your username or password contains special characters (e.g., @, :, /, etc.), make sure to URL-encode them first. You can use online tools such as URL Encoder or similar to ensure the credentials are properly formatted.

Upvotes: 0

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30362

Sourcetree has an option to setup remote account to connect to ADS. But I cannot connect to ADS, I get strange errors.

The Remote option is only for Azure DevOps Services, the on-premise Azure DevOps Server is not supported with this option. Something like Bitbucket and Bitbucket Server, they have different authentication methods

enter image description here

E.G The Azure DevOps Services https://dev.azure.com/{org} works as expected:

enter image description here

For on-premise Azure DevOps Server, we can use the Clone option, just copy the specific repo URL from your project, then set the local path to clone. After that you can change your source files on your local repo and push them to remote repo.

enter image description here enter image description here

Upvotes: 1

Related Questions