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

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

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:

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