Cannot download zipped repository
Asked by Adrien Gaillard:

Hello,

I can't download the zipped repository because "it is too big".

![Screenshot 2024-02-26 142142.png](/t5/image/serverpage/image-id/308665iEE4AEB4988CEB197/image-size/large?v=v2&px=999 "Screenshot 2024-02-26 142142.png")

But:  
1) the zipped repository is only about 57MB.  
2) I don't know how to reduce the size of the repository. I've removed a whole (unused) branch and the size hasn't changed at all (2.01 GB).


Answers:
author: Theodora Boudale
body: Hi Adrien,

The "Download repository" option will download a zip with the source code's main branch. I tried to reproduce this issue and when the repo's size is above 2 GB because of files committed to other branches, the download is not possible and the size reported is the repo's size instead of the zip's size. I will create a bug report for this.

I ran a garbage collection for your repo, this removes any dangling commits that are not referenced by any branches and compresses file revisions. The repo's size is 1.8 GB now. Can you please try downloading the repository again and let me know if it works?

Kind regards,  
Theodora

comments: author: Adrien Gaillard
body: Hi Theodora,

Thank you. It works.  
Also, I didn't get any warning before it was blocked, which is annoying.

Regards,  
Adrien


author: Theodora Boudale
body: You are welcome, Adrien. It's good to hear that it works now.

I created a bug report for this in our issue tracker: <https://jira.atlassian.com/browse/BCLOUD-23142>

Please feel free to reach out if you ever need anything else.

Kind regards,  
Theodora


author: Adrien Gaillard
body: Hi Theodora,

I've got the same problem again today.  
It would be great if something could be done so it doesn't happen again.  
At least a warning.

I've done a big clean on the repository, so it should definitely be \< 2GB.  
Could you run a garbage collection please?

Regards,  
Adrien


author: Ben
body: Hi Adrien,

I've executed a gc and can now confirm that you don't have any large repositories so you should be able to perform the download now.

If you notice that same repo increase in size, you'll need to have yourself and your colleagues delete your respective local copy of the repo and clone it again to prevent accidentally pushing the data back to the repository.

The best way to track progress on the bug ticket logged above is to **Watch**that bug ticket.

Cheers!

- Ben (Bitbucket Cloud Support)


author: Adrien Gaillard
body: Hi Ben,

Thanks for that.  

<https://confluence.atlassian.com/bbkb/what-are-the-repository-and-file-size-limits-1167700604.html>

It says:  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/324515i3682AFEF2C3C9756/image-size/large?v=v2&px=999 "image.png")  

I assume it's the ZIP file that shouldn't be \> 2GB not the whole repository.  
Our zip files are always under 2GB.  
Am I wrong?


author: Theodora Boudale
body: Hi Adrien,

You are right and this is why I created the bug report I mentioned in an earlier reply.

Until that bug is fixed, the only way to download a zip file of the repo from our website is by keeping the repo size below 2 GB.

Kind regards,  
Theodora


author: Adrien Gaillard
body: Hello,  
The download is still not working.  
I thought I had to wait, but nothing seems to be happening. The size is still 2.41GB.  
Do I need to wait for it to update?


author: Theodora Boudale
body: Hi Adrien,

I ran another git gc on the repo and its size has been reduced to 156.4 MB. Did you do any clean-up on the repo (e.g. delete branches or rewrite history)?

You should be able to download the repo's zip now.

Kind regards,  
Theodora


author: Adrien Gaillard
body: Thanks Theodora,  
The repository size is now 156.35 MB

<br />

Yes, I did a clean-up on the 16th of May.


author: Theodora Boudale
body: You are welcome, Adrien.

A garbage collection runs on every push to a repo, but with different parameters depending on many different conditions. The one we trigger manually optimizes the repository better (but takes much more time) and that was needed here after the clean-up you did on the repo.

Please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud