Lock single repositories for maintainance purposes

For maintainance tasks - like backup - Bitbucket offers a REST-API to lock the complete server to avoid user interaction during maintainance.

Is there a way to lock/unlock single repositories on Bitbucket for maintainance?

Background: I want to do some maintainance tasks on several hosted repositories (like git gc and git repack...). As I don't want to lock the complete server during operations on a single repository, this might be useful (and the repsoitory should be locked during this operation to avoid interruption by users ...)

1 answer

1 vote

You could remove the "write" permission of individuals during the maintenance period to avoid users pushing to the repository. That would be one way to prevent interruptions. Would that suffice, or are you looking for a single setting you could turn off and on? 

Hope this helps!


Not exactly what I'm looking after - but definitivly a workaround!

Your suggestion would work, if all APIs would be available: You're only able to get/set/delete permissions for projects and repositories - but not for branches (at least I haven't found this yet)

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

699 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot