title: The repository xxx in project xxx could not be retrieved. Verify the name and credentials being used
body: <p>I am trying to extend a template on a Azure DevOps pipeline which exists on a repository hosted on Azure Devops. Code looks like below.</p>
  <pre><code>resources:
    repositories:
      - repository: devops
        type: git
        name: otherProject/repositoryXYZ
        ref: main
  
  parameters:
    - name: environment
      type: string
      values:
      - &quot;UAT&quot;
      - &quot;Production&quot;
      default: &quot;UAT&quot;
  
  trigger:
  - none
  
  pr: none
  
  extends:
     template: folder/template.yml@devops
     parameters:
       environment: ${{ parameters.environment }}
  </code></pre>
  <p>When I deploy this pipeline on the same project on which repository repositoryXYZ exists, I get a successful run.</p>
  <p>For example I have a <strong>project A</strong> which holds 5 pipelines. One of the pipelines is the above and can download the repository and run successfully. This pipeline exists in project A where repositoryXYZ  is located.</p>
  <p>When I deploy the same pipeline from a different project <strong>project B</strong> within the same Azure Devops organization, I get the below error.</p>
  <pre><code>/azure-repo.yml: The repository DevOps in project f1809f72 could not be retrieved. Verify the name and credentials being used.
  </code></pre>
  <p>The id of the project on the logs is for <strong>project B</strong>. (f1809f72).</p>
  <ul>
  <li><p>I tried to alter DevOps repository permissions and to append project
  build collection administrators full access. (repositoryXYZ)</p>
  </li>
  <li><p>Then I tried to place the repository on github and I got the same
  issue (added a PAT and changed the directories for the repository)</p>
  </li>
  <li><p>I also tried to edit project settings and deactivate the limit jobs
  options. (all limit job aithorization settings have been deactivated for both projects)</p>
  </li>
  </ul>
  <p>Do I miss something? How can I use my pipeline to extend the template which will be downloaded from an Azure Devops repository of another project within the same devops organization?</p>
  <p>The pipeline cannot start running at all, so I guess something should be wrong with the permissions.</p>