Updated on 2023-08-07 GMT+08:00

Repository Locking

When a new software version is ready for release, administrators can lock the repository to protect it from being compromised. After the repository is locked, no one (including the administrators) can commit code to any of its branches.

To lock a repository, choose Settings > Security Management > Repository Locking on the repository details page.

Only the repository administrators and owners can view this tab page and configure repository locking.

After the administrator locks the repository, no one can use the repository functions in Table 1.

Table 1 List of functions that cannot be executed

Tab Page

Function

Code

If the repository is locked, the following functions cannot be performed on the Code tab page:

  • Create, edit, delete, rename, and upload a file
  • Create and delete a directory
  • Create and delete a submodule
  • Cherry-Pick and revert a file
  • Add, delete, edit, reply, and resolve a review and comment

Branch & Tag

If the repository is locked, the following functions cannot be performed on the Branch or Tag subtab of the Code tab page:

  • Create, edit, and delete a branch
  • Create and delete a Tag

Merge Requests

If the repository is locked, the following functions cannot be performed on the Merge Requests details page:

  • Create, edit, close, re-open, and merge a merge request
  • Cherry-Pick and revert a merge request
  • Resolve a code conflict
  • Add, delete, edit, reply, and resolve a review comment

Repository & Members

If the repository is locked, the following functions cannot be performed:

  • Fork a repository
  • Add, delete, edit, and approve a member

Settings

If the repository is locked, the following functions cannot be performed on the Settings tab page:

  • Repository settings
  • Submodules
  • Policy settings (All)
  • Service integration (All)

After the repository is locked, changes to project members will be synchronized to the repository, affecting repository members.