Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-09-25. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Locking a repository

You can prevent changes to a repository's code and other resources, such as issues and pull requests, by locking the repository.

Locking a repository

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
  3. Under "Search users, organizations, teams, repositories, gists, and applications", type the name of the repository in the text field. Then to the right of the field, click Search.
    Screenshot of the "Search" page of the "Site admin" settings. The button to search repositories, labeled "Search," is highlighted with an orange outline.
  4. Under "Search results – Repositories", click the name of the repository.
  5. In the upper-right corner of the page, click Admin.
    Screenshot of the header of the "Site admin" page for a user or repository. The "Admin" tab is highlighted with an orange outline.
  6. In the "Single Repository Lock" section, click Lock.

Unlocking a repository

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
  3. Under "Search users, organizations, teams, repositories, gists, and applications", type the name of the repository in the text field. Then to the right of the field, click Search.
    Screenshot of the "Search" page of the "Site admin" settings. The button to search repositories, labeled "Search," is highlighted with an orange outline.
  4. Under "Search results – Repositories", click the name of the repository.
  5. In the "Single Repository Lock" section, click Unlock.