How to Disable a  repository in Azure DevOps?

How to Disable a repository in Azure DevOps?

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.

Disable a  repository in Azure DevOps

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

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

One Comment to “How to Disable a repository in Azure DevOps?”

Comments are closed.