How should I restrict user to not able to edit azure-pipeine.yml file in Azure Devops

594 Views Asked by At

The azure-pipeline.yml is placed in the repo, I don't want other users to be able to edit it while running the pipeline. How can I achieve this from Azure devops. Locking a branch is available, can I use same for a single file azure-pipeline.yml in my case.

1

There are 1 best solutions below

5
GeralexGR On

You should go under Project -> Repositories -> Security and restrict access to the particular user or group. This way user could run the pipeline but cannot view the .YAML file or edit it.

enter image description here

You cannot restrict a single file, permissions should be given on the repository.

enter image description here