Tuesday, April 26, 2022

Azure DevOps & SourceTree - Clone a Git repository


Cloning Azure DevOps repositories with SourceTree could be a complicated task.

For those having authentication or "..not valid source path.." issues, the following information might be of your interest.

** Do not create an account in SourceTree for this repository, let it be created automatically **

I usually follow the second approach because I have Git already installed

Approach 1: Using SourceTree Embedded Git


First of all, verify you have the latest Git embedded version
SourceTree > Tools > Git > Git Version section. Click on Update Embedded

Approach 2: Using System Git


Install Git latest version from GIT homepage

SourceTree > Tools > Git > Git Version section. Click on System

Common procedure: Clone a DevOps branch using SourceTree


In your DevOps repository page, click on Clone and Generate Git credentials

In SourceTree create a new repository tab and select Clone












Copy the DevOps HTTPS Repository Url and paste it into Source Path / URL field in SourceTree clone page.
You will be prompted to select the DevOps integrated user. Go ahead and select it

Configure the Destination Path and Repository Name (tab name) and hit the Clone button

And that's it. SourceTree will clone the selected repository and automatically create the associated account in SourceTree.