GitPosh dosnt have permission to VSTS remote: TF401019

11,291

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?
Share:
11,291
Stefan0309
Author by

Stefan0309

Updated on June 05, 2022

Comments

  • Stefan0309
    Stefan0309 almost 2 years

    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.