Tag Archives: TF401019

Azure DevOps pipeline unable to checkout external repo – remote: TF401019: The Git repository with name or identifier does not exist

Assume the following scenario you trying to run Azure DevOps pipeline from one Azure DevOps repo and it relies on some contents in another Azure DevOps repo which specified in resources section of your YAML pipeline (for example it can be a repo which stores your master templates). You absolutely sure that your resources section is right and that it contains correct values for repository type and name as you were reusing this configuration in some other pipelines in other projects. For example, your pipeline resources section may look as follows:

Sample resources section

Nonetheless your YAML pipeline stored in your new Azure DevOps repository keeps failing with the following error:

remote: TF401019: The Git repository with name or identifier CORRECT_REPOSITORY_NAME does not exist or you do not have permissions for the operation you are attempting.

Here is a sample error message screenshot from pipeline job history:

Failing pipeline checkout stage

So the problem here (as we are sure that resource section repository config is OK) is configuration of a DevOps project which contains failing pipeline. To resolve this you will need to disable the following project settings:

  • Limit job authorization scope to current project for non-release pipelines
  • Limit job authorization scope to referenced Azure DevOps repositories
Azure DevOps project authorization scope settings

Once these setting changed you should be able to re-run pipeline to make sure that it no longer fails due to TF401019 error.