# Build error: Error while cloning repository 🥲

**URL:** <https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/146725>\
**Category:** Spaces\
**Created:** [March 21, 2025, 3:23am UTC](https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/146725 "2025-03-21T03:23:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HengJay](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hengjay/32/43750_2.png) [@HengJay](https://discuss.huggingface.co/u/HengJay)\
**Post date:** [March 21, 2025, 3:23am UTC](https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/146725/1 "2025-03-21T03:23:36Z")

</div>

I encouter the Build Error: Error while cloning repository, restart the Space so many time but it still not working. 🥲  
seems like same case [Build error: Error while cloning repository - Spaces - Hugging Face Forums](https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/113801)

 ![HF Space - Build Error](https://us1.discourse-cdn.com/hellohellohello/original/3X/c/b/cbf2d50561fe9af931e2b9fe9daa456486b34312.png)  
My HF Space - [SNOMED CT Assistant - a Hugging Face Space by HengJay](https://huggingface.co/spaces/HengJay/snomed-ct-assistant)  
Any good advince for fixing this problem? Very Thanks ~ 🥰

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 21, 2025, 6:19am UTC](https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/146725/2 "2025-03-21T06:19:17Z")

</div>

> **[snomed\_ct\_id\_term\_1410k/c8390385-a5b9-4ff6-89cd-f8bf8a760fbb/data\_level0.bin...](https://huggingface.co/spaces/HengJay/snomed-ct-assistant/blob/main/snomed_ct_id_term_1410k/c8390385-a5b9-4ff6-89cd-f8bf8a760fbb/data_level0.bin)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

I think this is because the above file is too large. The reason is that a few months ago, the Spaces repository was changed so that only files up to a total size of 1GB can be placed in it. Spaces that have already been started are not affected for the time being, but if you duplicate or modify Spaces, this problem will occur.

If you upload large files to the model repo and download them as needed as shown below, you should be fine.

```py
from huggingface_hub import hf_hub_download
#dl_url = "https://huggingface.co/KimTang/SNOMEDCT_BioBERT/blob/main/model.safetensors"
hf_hub_download(repo_id="KimTang/SNOMEDCT_BioBERT", filename="model.safetensors", local_dir="snomed_ct_id_term_1410k")

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 21, 2025, 6:20am UTC](https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/146725/3 "2025-03-21T06:20:44Z")

</div>

For more detailed options, see this.

> **[Downloading files](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> **[Storage limits](https://huggingface.co/docs/hub/storage-limits)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 24, 2025, 3:59am UTC](https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/146725/4 "2025-03-24T03:59:44Z")

</div>

I made a tool.

> **[Space Splitter - a Hugging Face Space by John6666](https://huggingface.co/spaces/John6666/space-splitter)**
>
> Discover amazing ML apps made by the community

---

<div class="post-metadata">

**Author:** ![adaface-neurips](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@adaface-neurips](https://discuss.huggingface.co/u/adaface-neurips)\
**Post date:** [March 26, 2025, 6:52am UTC](https://discuss.huggingface.co/t/build-error-error-while-cloning-repository/146725/5 "2025-03-26T06:52:46Z")

</div>

Wow this is really convenient! I was going to upload the 50 GBs of models…  
So the Source repo ID is the space ID, the Destination repo name is a new space ID, and Storage repo name is the hf repo ID, aren’t they? thanks.

EDIT: I’ve successfully migrated one of my spaces 👍 Some smaller files are filtered, and I added them back with a shell script. A path based filter would be great to have 😃
