Visual Studio – Git failed with a fatal error: repository ‘xyz’ not found

Today in Visual Studio I tried to clone a repository and I got :

Git failed with a fatal error: repository ‘xyz’ not found

After a bit of trial and error, I found that the git command line was giving me the same error message

 

Visual Studio - Git failed with a fatal error: repository 'xyz' not found 1

Quite quickly I figured out that Visual Studio is using my company account (as with the above command prompt) rather than the Microsoft account that I’m logged in with. In my case mu company account uses a stakeholder licence within Visual Studio online and stakeholder by default don’t have access to code.

So then I made my stakeholder account a project administrator:

Visual Studio - Git failed with a fatal error: repository 'xyz' not found 2

And as soon as I’ve done this my repository can be cloned:

Visual Studio - Git failed with a fatal error: repository 'xyz' not found 3

Then I tried the same within 3 versions of Visual Studio.

15.2 (26430.16) doesn’t require my windows account to be included in the project permissions.

15.3.3 and 15.4.4 do require my windows account to have project admin rights. So it looks like something was broken after 15.2

3 thoughts on “Visual Studio – Git failed with a fatal error: repository ‘xyz’ not found

  1. commented on March 30, 2018 by Wondwossen Ethio

    Thank you

  2. commented on April 13, 2018 by David Preston

    Pieter – thank you for this article – I came across this issue too (I am using VS2017 v15.6.4). I would add that my company account needed to have at least Basic level access to VSTS in addition to permissions on the Project & Git Repo. I was getting errors because my company account originally had only Stakeholder access.

Leave a Reply to David Preston Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: