You can place a legal hold on a user or organization to ensure that repositories they own cannot be permanently removed from your GitHub Enterprise instance.

Usually, if someone deletes a repository, it will be available on disk for 90 days and can be restored via the site admin dashboard. After 90 days the repository is purged and deleted forever. If you place a legal hold on a user or organization, repositories they own are available for restore indefinitely.

  1. Sign in to your GitHub Enterprise instance at http(s)://[hostname]/login.

  2. In the upper-right corner of any page, click . Rocketship icon for accessing site admin settings

  3. In the search field, type the name of the user or organization and click Search. Site admin settings search field

  4. In the search results, click the name of the user or organization. Site admin settings search options

  5. In the upper-right corner of the page, click Admin. Admin Tools

  6. In the left sidebar, click Admin. Admin Tools

  7. Click Place legal hold. Place legal hold button