Jon Gallant

How to Setup a Visual Studio Online (VSO) Git Repo in SourceTree

1 min read

Here’s what you have to do to get a VSO git repo setup in SourceTree

Go to VSO Personal Access Tokens: https://{vso-account-name}.visualstudio.com/_details/security/tokens

Replace {vso-account-name} with your VSO account name

Click “Add”

Screenshot

Enter a Description and set your preferences for Expiration, Accounts and Scopes.

Screenshot

Click “Create Token”

Screenshot

Click “Copy Token” and store that somewhere that you can access later because you won’t see it again through VSO.

Screenshot

Install SourceTree: https://www.sourcetreeapp.com/

Click “Clone / New”

Screenshot

Enter “Source Path / URL” in this format:

https://{username:access-token}@{vso-account-name}.visualstudio.com/DefaultCollection/{project-name}/_git/{repo-name}

Screenshot

The best way to get this URL is to go to your VSO project in your browser and then add your username and access-token.

Note your username does not contain an “@” sign. Just use the username of the email address that you sign-in to VSO with.

With your cursor focus in the “Source Path / URL” input…hit TAB.

You should then see this:

Screenshot

If you don’t see that then something isn’t setup right. Your URL could be wrong or git might not be installed properly.

Hope this helps.

Jon

Share:
Share on X