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
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().
Just spent a good part of my Sunday creating new ssh keys and setting up gpg. I finally pushed this morning and created a new dataset and got verified commit: fantastic.
Now I try to clone the repo created earlier and I get:
Error downloading object: kg-column-test.txt (da355c7): Smudge error: Error downloading kg-column-test.txt (da355c7ac1bc978121fda6c500c7631d55b71d30d19767c6ececd6e58af4a801): batch response: Authentication required: Password authentication in git is no longer supported. You must use a user access token or an SSH key instead. See https://huggingface.co/blog/password-git-deprecation
Errors logged to '/Users/patrickocal_mchome/Documents/stanford/gov-report-kgs/.git/lfs/logs/20231126T205837.279135.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: kg-column-test.txt: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
I am using ssh … I’ve deleted all my hugging face items in keychain (on OSX Sonoma).
i got the same “Authorization error” when trying trainer.push_to_hub(“my-repo”, token=<write_token>). The same works for dataset.push_to_hub(…) earlier in the code. i am using Google Colab and finetuning a Llama2-7b-hf model.
i have a read_token for downloading the meta/llama2-7b model and a write token to be able to push to the hub repo. i run huggingface-cli login() --token=<write_token>, and the output shows login successful with write permission. However, when i run ‘whoami()’ later, the token shown is the read_token with role=read.
Is there a way to overcome this ? It has been quite frustrating, trying to push the finetuned model to the repo in huggingface hub
Hi @radames , push_to_hub with write token works for dataset.push_to_hub(“repo-name”, token=write_token) or from tokenizer.push_to_hub(“repo-name”,use_auth_token=write_token), but does not work for trainer.push_to_hub(“repo-name”, token=write_token), where the trainer is from huggingface transformers library.
All of this is being done on a Google Colab project for pushing a finetuned model to my huggingface repo, when i get the Authorization error.
On examination of the python code of the library, there is no token passed, and the git push command seems to be failing authorization somewhere that i am not able to figure out why.