I got Authorization error

I did all steps in the tutorial, but when I execute git push I got the error:

Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done.
batch response: Authorization error.
error: failed to push some refs to 'https://huggingface.co/datasets/zeusfsx/ukrainian-news'

I logged via huggingface-cli login

Getting the exact same error - so peeking for any answers as well.

Did you find a solution?

hi @zeusfsx and @emiltj can you please double check you’re using a token with write role permission?
Another question, which OS are you running?

I triple checked. Must be working as I can push with push_to_hub(), but not using the cli.

I’ve recently encountered similar issues while working on OSX. To resolve the problem, I had to clean up all the huggingface.co password on my keychain access. I also had to reconfigure my git config --global credential.helper osxkeychain then huggingface-cli login. After these steps, it was back to normal. Note these are OSX-specific

Sorry, I forgot to reply to the OS question.

Running MacOS 13.2.1 (22D68), with the M1-chip. Not unlikely that the problem is similar to the one you have. I am not going to bother setting that up, but will just be using the push_to_hub().

Thank you for your answer

1 Like

getting the same error on ubuntu 16.04, huggingface-cli login does nothing

Pushing to hub is such a frustrating experience at this point, I am about to give up.

for all in the thread, we now have support for SSH keys, so many of the authentication problems could be overcome via SSH authentication.

1 Like

You can use your WRITE User Access Tokens as password when git push prompted the password.

1 Like