Quickstart: Set repository permissions for Git or TFVC

VSTS | TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013

You can grant or restrict access to a repository by setting the permission state to Allow or Deny for a single user or a security group. For a description of each security group and permission level, see Permissions and group reference.

Prerequisites

  • You must have a team project. If you don't have a team project yet, create one in VSTS or set one up in an on-premises TFS.
  • You must be a member of the Project Administrators Group or have your Manage permissions set to Allow for Git repositories or TFVC repository.

Set Git repository permissions

You can set the permissions for all Git repositories for a team project, or for a single repository.

  1. From the web portal user and team project context, open the admin context by clicking the gear Settings icon and click Version Control.

  2. To set the set the permissions for all Git repositories for a team project, click Git Repositories and choose the security group whose permissions you want to manage.

    Otherwise, click a specific repository and choose the security group whose permissions you want to manage.

  3. Click the setting for the permission you want to change.

    Here we grant permissions to the Contributors group to create repositories.

    Security dialog for all GIt repositories, Contributors group

  4. When done, click Save changes.

Set TFVC repository permissions

  1. From the web portal user and team project context, open the admin context by clicking the gear Settings icon and click Version Control.

  2. Click the TFVC repository for the team project and then choose the security group whose permissions you want to manage.

  3. Change the permission setting to Allow or Deny.

    For example, here we change the Manage branch permission to Allow for all members of the Contributors group.

    Security dialog for the TFVC repository, Contributors group

  4. Save your changes.