Repository is read-only on Bitbucket Data Center
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Bitbucket users are affected because they are not able to perform certain actions against 1 or more repositories.
Diagnosis
Users are unable to view diff in PR for a specific repo and a dialog that says the repo is "read-only" is displayed.
This issue may also prevent pushing to the repo as well as merging the commit.
Tail logs in every node in the cluster while replicating the issue to catch any errors for this repository.
Cause
Something is causing Bitbucket to determine that the repo is read-only.
Cause 1
Bitbucket Database table "repository
" to see if either "isReadOnly
" and or "isArchived
" attribute is set to "True
".
Cause 2
Bitbucket Filesystem does not have the correct permissions for write access.
Cause 3
File locks in the repository directory.
Cause 4
Type of NFS eg. something unsupported like FSx in conjunction with a node that may have left the cluster in an ungraceful way might leave a repo in this state.
Solution
Solutions
Solution 1
Change the attributes in the Bitbucket Database to "False
"
Solution 2
Correct file permissions
Solution 3
Remove file locks from the repository directory in the Bitbucket filesystem.
Solution 4
Check NFS mount options.
Solution 5
Bring node back into cluster
Was this helpful?