Cannot remove empty repository
Asked by Remco te Hofstee:

I have imported a repository from bitbucket server using the "import repository" from Bitbucket cloud.

After 8 minutes the repository was still not imported, as normal this repository should take only about 1 minute.

I have closed the import page and I can see the repository. It has a size of 0B.

- Opening the repository gives:

We can't let you see this page

To access this page, you may need to log in with another account. You can also return to the previous page or go back to your dashboard  

- Opening the repository in a new page gives repository unavailable.

How can I access the repository so I can delete it?


Answers:
author: Rob van der Lee
body: Could you give some more information on what your tried importing? It seems like that process went wrong, especially after hearing it reports 0B size.

Also, can you reproduce this? You might wanna try another fresh import. Then you can start rule out that this might be a data issue.

comments: author: Remco te Hofstee
body: I am migrating from Bitbucket server (local) to Bitbucket Cloud. I have done this for this repository several times because I am configuring Jenkins as a build server. Therefor I need to make changes to a configuration file and I don't want to have these changes being visible in the commits. The last step is to migrate again and commit the working configuration file.

I have imported the repository from it's original name directly to a new name. This import is failed.

After the failed import I have imported the repository using its original name, and this is working. Also import to another name is working, so a data issue can be ruled out.

Somehow the imported repository is corrupted.


author: Rob van der Lee
body: Okay, that good in any case. Some time has passed since you created this topic. You still cannot delete the repo?

You could try to add some content by pulling it local and commit some random text files. It might be a thing Bitbucket is running into because it is literally empty.

**SO I found on the topic:**   
<https://stackoverflow.com/questions/13669410/clear-git-repository-on-bitbucket>


author: Remco te Hofstee
body: I still cannot delete the repo online, it is still unavailable.

I tried to clone the repo but i got:

remote: This repository is currently not available.  
fatal: unable to access 'url of the repo' The requested URL returned error: 403

When I pull the repo using my old existing folder with a previous clone i get the same message.


author: Rob van der Lee
body: 403 means forbidden. Have you done a sanity check you are actually able to access the repository? Is it located under your own account or under another?

If that's not the case than it does seems like you've done everything you could to be honest. You might want to make support ticket to get this resolved. You should link to this community post, that way they can see you've done a lot already to resolve it.

**Support:**   
<https://support.atlassian.com/contact/#/>


author: Remco te Hofstee
body: The repo is under my account. What do you mean with sanity check?


author: Rob van der Lee
body: To perform a sanity check, it means that you double check that the (obvious) error message is actually what it means. Status code 403 is Forbidden, meaning Bitbucket is trying to tell you that you are not authorized to view/pull/push that particular repository.

I would want to sanity check that we are not missing something minor that easily would be looked over. A good way to check is to access a repo on the same level as the other and try to match it as closely as possible (same workspace/project). It could be a permissions issue for example.


author: Remco te Hofstee
body: The repo is visible under the same project as the repository i have imported after the failed one.

So in this case I have the same workspace and same user. I think the repo is corrupted and has no permissions at all set to it.


author: Rob van der Lee
body: Then it does seem like you would need support to help you clean up that repository. I wouldn't know what options are left to explore sadly.


author: Remco te Hofstee
body: Thank you for your help so far.

I will contact support to see what they can do.


author: Rob van der Lee
body: Anytime. Keep us posted here!


author: Remco te Hofstee
body: I added a ticket and within 15 minutes I had a response:

"We have checked the repository and can see the repository was stuck in the "Importing" state. We have gone ahead and made it available. Could you please try accessing the repository again?"

After this i could access and delete the repository.


author: Remco te Hofstee
body: Thanks.


author: Rob van der Lee
body: Sometimes the solution can be easy :) Happy coding!


Tags: bitbucket-cloud

cloud