5
votes

I created a new folder Test. run command: git init then I setUp global configuration - mail and name then I added:

git remote add origin https://bvcdata.visualstudio.com/_git/MyRepo
git push -u origin --all

and immediately get error:

remote: TF401019: The Git repository with name or identifier sdsdsd does not exist or you do not have permissions for the operation you are attempting. fatal: repository 'https://xxxxxx.visualstudio.com/_git/MyRepo/' not found

I am the owner of the project on VSTS, so I have all privilegies. It all was working till now. Thanks for feedback.

4
Please check (or ask the VSTS admin to check) if you have permission to contribute to the git repo.Marina Liu
Has you problem has been solved yet?Marina Liu
@MarinaLiu-MSFT Yes, for some reason git posh dont have a possibility to change logged user through console (powershell for example)Stefan0309
Hi, I'm experiencing the same problem. Can you tell us how to fix this issue in more details please?Csaba

4 Answers

5
votes

TLDR:

  • Delete the %LocalAppData%\GitCredentialManager\tenant.cache file on your machine
  • If that's not enough, run git credential-manager clear <repo url>

This error message came up for me when the repository credentials Git had cached became stale.

Diagnostic stages for me were:

  1. Do I have access to the repository? Check this by browsing to the Code part of your VSTS repository. enter image description here
  2. If I think I've cleared the Git credential cache (which I first did by just deleting the tenant.cache file), am I prompted for credentials when doing a command-line git fetch?
0
votes

I meet the same problem in Ubuntu 18.04.2 LTS and I fixed it by following steps:

  1. empty the old .git-credentials file. my path is ~/.git-credentials.
  2. execute git config --global credential.helper store.
  3. execute git clone <your git url> it will ask your username and password.
  4. success
0
votes

For me, the issue was in using the organization account. I removed the organization qualifier and cloned the repository by my username after generating custom credentials from the provided option on devops.

The remote URL was changed from::

https://OrgAccount@dev.azure.com/Org1/Project/_git/Mobile%20App

To::

https://Jainam@dev.azure.com/Org1/Project/_git/Mobile%20App

--

And it worked for me!

0
votes

I had this trouble and to repair it, i have removed some generic credentials into : Control Panel -> identification manager -> generic credential

in french version : panneau de configuration -> gestionnaire d'identification -> informations d'identification windows

The trouble come from my git mail connexion have been moved to another and windows store it and use last every time it.