Facing issue while deleting the Bitbucket Cloud Repository

Akshay b November 10, 2021

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:

Error.JPG

 

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.

1 answer

1 accepted

1 vote
Answer accepted
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2021

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): 

 devtools.png

  • 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

Akshay b November 12, 2021

Hi @Caroline R ,

Thanks for your response. Here is the sentry id: 1705cca4be6a42b09252b4b0cf461d09

sentry_id.JPG

Hope this helps! Thanks!!

Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2021

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

Akshay b November 12, 2021

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.

Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2021

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 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events