Disable a repository in Azure DevOps – It would be an ask when we want to restrict complete access to the code base for any reason. And also, we don’t want to delete the repository. Locking Git Branch, adding policies in the pull request, is more on the process flow validation level, taking care of how we would like to take code ingestion to the repository. However, a wholly locked out repository could be required when completely stop access to anything from the repository. Azure DevOps allows to Disable a repository and enable back when the restriction is over.
Disable a repository in Azure DevOps
You can disable a repository if you are authorized to Delete the repository. When the repository is disabled in Azure DevOps, you can still find the project’s repository, but it will be in entirely disabled mode. What does mean is, you can’t read any content or update; instead, you will see the following message.
How to do it?
To disable a repository, go to Project Settings, for the selected project. Under the Project Settings, select Repositories, and navigate to Settings for the Repository. Under the Settings, you will find the option “Disable Repository” – Turned it on.
Once the repository is disabled, if you try to access the repository, including build, pull request, branch, or files, you will have a message that indicates the repository is disabled.
Turn it off once you want to disabled.
That’s it.
Want to build custom solution using Azure DevOps? Check it out – Exploring Azure DevOps APIs
Take a look at this quick video and see it in action
Pingback: Dew Drop – April 1, 2021 (#3414) – Morning Dew by Alvin Ashcraft