question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LFS: Authorization error when uploading many/large files.

See original GitHub issue

The following error occurs when uploading ~1000 files (300GB total):

LFS: Authorization error: https://s3.us-east-1.amazonaws.com/lfs.huggingface.co/datasets/lvwerra/github-code/XXXXXX
Check that you have proper access to the repository

I am using the following line in Python to add/commit/push the commits:

from huggingface_hub import Repository

repo = Repository(
        local_dir="./data/",
        clone_from="lvwerra/github-code",
        repo_type="dataset",
        private=True,
        use_auth_token=True,
        git_user="lvwerra",
        git_email="leandro.vonwerra@gmail.com",
        )

repo.git_add()
repo.git_commit("Test commit")
repo.git_push()

The upload seems to mostly succeed (I can see progress bars for the uploads) and at the end there are a few hundred of these messages. I assume that authorization worked at least initially since I was able to create the repo in the first place and I tested that I can push data to another test repo with the same settings after the failure.

Could this be related to this issue and be a problem on the server side?

Version: huggingface-hub 0.4.0

cc @LysandreJik @julien-c

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
lvwerracommented, Feb 16, 2022

No it did not - it happened overnight and it started around 11pm and I noticed it failed at 9am.

So using git lfs worked and was much faster. In Python pushing uploaded files individually and I could see that each file was uploading at around 1MB/s (sometimes a bit faster or slower) and maybe 10-20 files were uploaded concurrently (did not count) amounting to 10-20MB/s upload total. With git push in the command line it uploaded with 300MB/s!

1reaction
julien-ccommented, Feb 16, 2022

any way you could try with git lfs and not Repository?

Read more comments on GitHub >

github_iconTop Results From Across the Web

git lfs push/upload of big files fails with 401 #2753 - GitHub
after git push resulted in the Authentication error, I ran git lfs push origin master to resume the transfer (which eventually completed). After ......
Read more >
Gitlab LFS Authorization error via SSH (#38119) · Issues
After updating to GitLab 12.5+ on our tool server the git lfs commands on our staging and production server has stopped working out...
Read more >
LFS: Authorization error - Google Groups
Uploading LFS objects: 83% (5/6), 2.7 MB | 567 KB/s, done. error: failed to push some refs to 'ssh://gerrit:29418/repo'.
Read more >
Authorization error when push LFS file to mirroring git repository
When I try to commit one LFS file to git repository B branch dev/dev I has error Authorization error : >GIT_CURL_VERBOSE=1 git push ......
Read more >
You just committed a large file and can't push to GitHub
But oops, GitHub complains that you are trying to commit files larger ... that has many large files that we don't want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found