Forum Discussion
ADO Repo: how can I hide some files in the repo from some users?
Using an Azure Repos git repo within Azure DevOps (not github) ...
Can I configure permissions such that some users cannot see all files within the repository?
For example, maybe I can configure permissions to allow access to some code folders but not others.
Was hoping maybe I could tie certain folders in the repo to Areas and then configure permissions on Areas.
Looks like I may be able to do this by setting permissions on branches but not folders within a branch.
I haven't seen this in the documentation so far.
- This is not possible in git repositories. Access is always granted at the repository level and you can't hide or protect specific files or folders.
4 Replies
- jessehouwingCopper ContributorThis is not possible in git repositories. Access is always granted at the repository level and you can't hide or protect specific files or folders.
Refer to this, and build a custom role if necessary:
Set TFVC repository permissions - Azure Repos | Microsoft Learn
- Gr8LakesCopper Contributor
I dont see that this solution is available for git-based Azure Repos, only TFS-based repos.
Using a basic license, I dont get any options for adding paths to files for git.
- Gr8LakesCopper Contributor
I've looked at the manner in which JSON can be crafted for custom roles.
I havent found any documentation for the Azure Repos (git) provider which shows how paths can be configured in the JSON. For example, in scope or permissions.