Connect Azure DevOps Repo to SourceTree

In this article, we will be going to learn how to connect Azure DevOps Repos with SourceTree.

Sourcetree is a tool that simplifies connecting your Git repositories. Using SourceTree you can visualize and manage your repositories through GUI.

 

Generate git credentials

 

For connecting SourceTree, we need credentials of Azure DevOps repo. Follow the steps to generate credentials:

Step 1) Go to your branch

 

Visit your branc

 

Step 2) Click the clone button

 

image

 

Step 3) Click Generate Git Credentials (we are using https instead of ssh)

image

 

Step 4) Copy your username and password and save them somewhere because you won't get it again.

image

 

 

Add Azure DevOps git account to SourceTree

 

Step 1) Open SourceTree and click on Account.

 

image

 

Step 2) Click Add to attach the new account and then add the following details

 

Host Choose Azure DevOps
url https://[[yourdomain]].visualstudio.com/ Where [[yourdomain]] is your DevOps domain
Auth Type Keep default value
Username Your username
Password Your password
Protocol https
image

 

 

Clone repo to SourceTree

We have multiple ways to clone the repo. The first method is to clone by adding URL manually. In this method, we clone the repo by providing a repo URL.

Step 1) Open SourceTree and click on new and then select "Clone from URL"

 

image

Step 2) Enter the source URL which we get from DevOps

Note: If your cloned URL is in the format of https://<<yourdomain>>@dev.azure.com then use https://<<yourusername>>@dev.azure.com.

 

image
image

 

It will ask you to provide your username and password to authenticate.

Step 3)  After authentication, click clone.

 

 

image

 

The second method to clone the repo is as follows:

Step 1) Open SourceTree and click on Remote

 

image

 

Step 2) Click clone

Your cloned repo is ready to create a branch,  do push, pull and commit.

 

 

Leave a Comment