Azure Devops clone This is not a valid source path in source tree

I have managed to finally add my devops account in sourcetree using the https://orgname.visualstudio.com path

Now I am having issues cloning the repository

I am using the path that devops gives me

https://[email protected]/orgname/MyProject/_git/MyRepo

but I get an error saying

This is not a valid source

The details reveal authentication issues... Yet it authenticated fine when adding the account.

What is going on? Does the azure account have to be the default account?


Solution 1:

This is not the issue which caused by Azure devops. No matter https://xxx.visualstudio.com, or the URL which like dev.azure.com, they should all available git source.

For me, I just try with multi different git URLs, and found the few of URLs are failed with same error with you. But it prompt This is a git repository after I exit the SourceTree and re-configure the clone with same URL which encountered the error previously.

enter image description here

This seems be the most common Sourcetree problem which encountered by many users, not just the URL of azure devops that you occurred.

Check this thread, and try with its recommend way:

Open source tree, Tools -> Options -> Click on Git Tab -> Update Embedded Git.

Or, consider the method I used: exit the Sourcetree, and re-configure the clone with same URL. (Not recommend since this can not permanently solve this issue)

Solution 2:

It could happen when you entered wrong credentials and you don't get asked again, try this:

  1. Go to : Sourtree->Preferences->Advance (tab)
  2. Under: "Default usernames for URLs which do not include one:" delete your wrong credentials.
  3. Try accessing your repo again with right credentials.

Solution 3:

I managed to fix this by changing from the sourcetree embedded git to my system git Tools>Options>Git>Git Version>Select System. Afterwards when trying again it prompted me to login on my organization domain with 2 factor as if logging in on the devops web app directly.

My system Git is using manager-core for the credential management which is probably not the same system which the embedded version used.