# TF401019: The Git repository with name or identifier x does not exist or you do not have permissions for the operation

**Code:** `TF401019` · **Category:** Azure · **Seen on:** Azure

The repo doesn’t exist in that project, or the identity (user, PAT, pipeline build service) lacks permission to it.

## Meaning

Pipelines checking out repos from other projects need “Limit job authorization scope” settings adjusted and the build service granted Read. PATs need Code (Read) scope.

## Common causes

- Wrong project/repo name in the URL
- Build service account lacks Read on the repo
- Job authorization scope limited to the current project
- PAT missing Code scope or expired

## Quick fix

1. Verify the repo URL
2. Grant the project’s Build Service Read on the repo
3. Turn off “Limit job authorization scope” or add explicit resources

## Detailed fix by platform

### YAML

1. 

```bash
resources:
  repositories:
  - repository: shared
    type: git
    name: OtherProject/shared-templates
```


## How to diagnose

1. **Identity** — User, PAT or Build Service?
2. **Permissions** — Repo security
3. **Settings** — Job authorization scope

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/azure/devops-tf401019-repository-not-found)
