I am trying to delete a Bitbucket Cloud repository. I navigate through Repository settings -> Repository details -> Manage repository -> Delete repository -> Delete.
When I click on delete I get the below pop-up:
It's the same for last 1 day. When I checked with the Bitbucket Status Page, everything is operational.
Additional Info:
I am facing this issue in the repositories for which I had tried to rename the repository using REST API. For other repositories which I don't rename, I am able to delete it. I believe it's a bug from Bitbucket.
Hi, @Akshay b!
Thank you for reaching out to Atlassian Community!
The “Something went wrong" message usually comes with a 5xx response that shows a Sentry ID code. This code may give us some indication of what is causing this issue. In this case, could you please follow the next steps to find the Sentry ID, so I can further investigate this case?
Open the "Developer tools" in the browser you are using (click on the three dots > More tools > Developer Tools):
Then navigate to the Bitbucket page that gives you this error (try to delete the repo)
In "Developer tools", select the Network tab
Find and select the request that gives a 5xx response
In the Headers panel (after you select the request with 5xx response), check if there is a field named sentry id.
If you can provide us with the value of that field, we can look it up in our system for further info.
Thank you.
Kind regards,
Caroline
Hi @Caroline R ,
Thanks for your response. Here is the sentry id: 1705cca4be6a42b09252b4b0cf461d09
Hope this helps! Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Akshay b,
Thanks for sharing the sentry code with us. I checked that and it corresponds to the below error:
ProjectPrivacyException: A repository in a private project cannot be publicly visible.
So the repository you are trying to delete is set as public, but the project that has this repository is private. This is the cause of this issue.
In this case, you can set this repository as private by following the next steps and then try to delete the repo:
Access the repository > Repository settings;
Under the Repository details section, find the "This is a private repository" option and check this box;
Click Save changes.
Also, if you want to create a repository using the API and make it private, you can use the following request:
curl -X POST -u username:AppPassword -H "Content-Type: application/json" -d '{"scm": "git", "is_private":"true", "project": { "key": "{inform_the_project_key_here}" } }' https://api.bitbucket.org/2.0/repositories/{workspacename}/{repository_name}
In case the "This is a private repository" option is disabled (grayed out), you can use the API to update the repo via a PUT:
curl -X PUT -u username:AppPassword -H "Content-Type: application/json" -d '{"is_private": true}' https://api.bitbucket.org/2.0/repositories/{workspace_name}/{repository_name}
I hope this helps, but please let me know how it goes and if you have any questions.
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Caroline R
"This is a private repository" option was disabled. So, I used the API to make the repository private and then was able to delete the repository successfully.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Akshay b!
Thanks for getting back to us and confirming the API worked. I'm glad to know you were able to delete your repo!
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.