Bitbucket cloud: Unable to make the existing forked repository public, despite setting the project access to public.
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
Sometimes, even if you set the project privacy to public, you might face challenges in updating the forked repository's(under that project) privacy to public.
You may get the below error:
This repository must not allow public forks because its parent does not allow them.
or you may observe that although the repository is initially set to public, upon refreshing the page, the privacy setting(checkbox is checked) reverts to private(this is a private repository).
Cause
The reason for this issue is the forking option configured for the parent repository(or upstream repository) to 'Allow only private forks' as shown in the below screenshot:
Solution
So to fix the issue we have 2 options.
- You can change the parent/upstream repository's forking permissions from "Allow only private forks" to "Allow forks" in the repository settings. Afterward, update the forked repository privacy to the public. To know more about repository privacy and forking options please refer to this document
- To change the setting follow the below steps:
- Go to parent Repository settings.
- Click on "Advanced" drop-down.
- Under the forking tab change the permissions from "Allow only private forks" to "Allow forks"
- To change the setting follow the below steps:
- You can unlink the forked repositories from their parent/upstream repo. Then you will be able to update the privacy status of the forked repo to the public. To unlink/detach the parent repo and the forked repo, you will need to contact the support team