Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitPosh dosnt have permission to VSTS remote: TF401019

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.

like image 323
Stefan0309 Avatar asked Mar 18 '18 12:03

Stefan0309


1 Answers

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?
like image 151
OutstandingBill Avatar answered Oct 31 '22 14:10

OutstandingBill