# Cannot push to Dataset HTTP 408 curl 22 The requested URL returned error: 408

**URL:** <https://discuss.huggingface.co/t/cannot-push-to-dataset-http-408-curl-22-the-requested-url-returned-error-408/93276>\
**Category:** 🤗Datasets\
**Created:** [June 20, 2024, 11:14pm UTC](https://discuss.huggingface.co/t/cannot-push-to-dataset-http-408-curl-22-the-requested-url-returned-error-408/93276 "2024-06-20T23:14:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scopes](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@scopes](https://discuss.huggingface.co/u/scopes)\
**Post date:** [June 20, 2024, 11:14pm UTC](https://discuss.huggingface.co/t/cannot-push-to-dataset-http-408-curl-22-the-requested-url-returned-error-408/93276/1 "2024-06-20T23:14:11Z")

</div>

Hello, after skimming through a few posts of user who seemed to face the same issue, and despite working with git for more than 15 years, I’m currently struggling to push 3 text files to a dataset I just created.

Having a 9$/month pro plan, I’m currently trying to push .txt files which respectively weight: 298000ko, 1100000ko and 840000ko.

the output of the git push command is the following:

Enumerating objects: 6, done.  
Counting objects: 100% (6/6), done.  
Delta compression using up to 16 threads  
Compressing objects: 100% (3/3), done.  
Writing objects: 100% (5/5), 203.12 MiB | 4.68 MiB/s, done.  
Total 5 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)  
error: RPC failed; HTTP 408 curl 22 The requested URL returned error: 408  
send-pack: unexpected disconnect while reading sideband packet  
fatal: the remote end hung up unexpectedly  
Everything up-to-date

Any input appreciated

EDIT1: I also tried uploading through the huggingface repo UI \> Add files but gave up after a couple hours and nothing in the devtools windows indiocating progresses.

EDIT2: a verbose git push with GIT\_CURL\_VERBOSE=1 GIT\_TRACE\_PACKET=1 GIT\_TRACE=1 GIT\_TRACE\_PERFORMANCE=1 git push origin main show that even tho buffer, sleeplimit/time, network adjustments, threads, dialtimeout, keepalive, concurrenttransfers… don’t change a single thing to this issue

---

<div class="post-metadata">

**Author:** ![scopes](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@scopes](https://discuss.huggingface.co/u/scopes)\
**Post date:** [June 21, 2024, 12:56am UTC](https://discuss.huggingface.co/t/cannot-push-to-dataset-http-408-curl-22-the-requested-url-returned-error-408/93276/2 "2024-06-21T00:56:33Z")

</div>

In case some people are running into this issue, the approach that worked for me was using a a python script to upload the files using the API:

```auto
from huggingface_hub import HfApi, HfFolder

# Save your token
HfFolder.save_token('foobarbaz')

api = HfApi()

# Upload files
api.upload_file(
    path_or_fileobj="path/to/your_large_file.txt",
    path_in_repo="large_file.txt",
    repo_id="username/dataset_name",
    repo_type="dataset"
)

```

Hope it will help

---

<div class="post-metadata">

**Author:** ![metchee](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@metchee](https://discuss.huggingface.co/u/metchee)\
**Post date:** [February 19, 2025, 7:47pm UTC](https://discuss.huggingface.co/t/cannot-push-to-dataset-http-408-curl-22-the-requested-url-returned-error-408/93276/3 "2025-02-19T19:47:28Z")

</div>

Thank you so much!! Really helped out a poor frustrated soul using git and all the other Python script. Your solution worked really well. Thanks for leaving such a constructive comment!
