Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have two ADO repositories named private2 and public2. private2 references public2 as a submodule:

enter image description here

I also added a yaml file (vsts-cicd.yml) for build as follows:

resources:
  repositories:
  - repository: test
    type: git
    name: <ProjectName>/public2
    ref: master

stages:

- template: build1.yml@test
  parameters:
    repoToCheckout: test
    checkoutPath: '$(Build.BuildNumber)'

- template: build2.yml@test
  parameters:
    repoToCheckout: test
    checkoutPath: '$(Build.BuildNumber)'
    
- template: yaml/build3.yml

On running the build, I see the first two templates completed successfully. On reaching - template: yaml/build3.yml it fails with the following error:

enter image description here

What am I missing?

UPDATE:

I followed this article (https://www.timschaeps.be/post/dealing-with-error-tf401019-submodules-azure-pipelines/) to fix the issue however I don’t see this option in project settings: ‘Limit job authorization scope to referenced Azure DevOps repositories’. What am I missing?

enter image description here

like image 991
user989988 Avatar asked Dec 12 '25 02:12

user989988


1 Answers

As you mention in your update, the project consuming the Repo needs to have the setting Limit job authorization scope to current project for non-release pipelines disabled in the Project Settings.

NOTE: Please bear in mind that this changes the build identity to collection-scoped. This could cause issues with using Auzure DevOps Artifacts. See Scoped build identities.

Azure DevOps Project Pipeline Settings

like image 192
Josh Wright Avatar answered Dec 13 '25 15:12

Josh Wright



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!