I get this error when trying to clone a repository from Azure Devops in Visual Studio 2019 :
TF401019: The Git repository with name or identifier X does not exist or you do not have permissions for the operation you are attempting.
Error encountered while cloning the remote repository: Git failed with a fatal error.
I'm using two accounts :
[email protected] is my main account in visual studio, it has access to my repo, but no rights. [email protected] is another account setup in visual studio, it has full access to my repo.
When I try to clone the repo, I get the error above. In Azure Devops, I noticed that a personal access token is created in my first account and not in my second account, so I'm assuming that it's trying to connect with the wrong account. I never get asked for credentials from Visual studio, even when I delete the credentials from the Windows Credentials Manager and clear the cache from IE and Edge.
Is there a way to specify under which account to clone an Azure Devops repository in Visual Studio 2019?
---- Update
When I'm cloning, I'm logged in with account #2 in visual studio and listing repos under dev.azure.com
But I get this error :
Remote: TF401019: The Git repository with name or identifier X does not exist or you do not have permissions for the operation you are attempting.
Error encountered while cloning the remote repository: Git failed with a fatal error.
repository 'https://dev.azure.com/X' not found
And then, in Azure Devops, with account #1, a PAT is created
The PAT gets stored in the Windows Credentials Manager (I delete it for each try)