DENIED update refs/heads/main: forbidden
I followed the instructions shown immediately upon creating a huggingface space; however, I cannot push any changes I make to the cloned space git repo.If I try I will get the following:Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 16 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 414 bytes | 414.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: ----------------------------------------------------------
remote: Your push was rejected for the following reasons:
remote: DENIED update refs/heads/main: forbidden
remote: ----------------------------------------------------------
To https://huggingface.co/spaces/warrenwang/minimal_hello
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://huggingface.co/spaces/warrenwang/minimal_hello'I have tried searching this error, but I could not find anything helpful. If someone could point me in the right direction thank you.
2022-08-21T18:27:52Z
I am facing the same issue. Were you able to resolve this?
2022-08-21T18:31:49Z
have you triedgit push --force?
2022-08-21T18:48:35Z
I am pushing this model from colab. How do I use this from the trainer.push_to_hub()?
2022-08-21T19:32:09Z
I see, we don’t support the force push yet onpush_to_hub(). If you’re on colab, can you found out the dir of your Trainer? then run this shell command on a cell. I hope after that, you might not have issues withtrainer.push_to_hub()!cd trainer_folder && git push --force
2022-08-21T20:04:07Z
I think for me my issue was using incorrect credentials for my huggingface account, as I was able to push successfully following the original instructions after I reset my account password.
2022-10-24T04:15:24Z
I had the same error messages, turns out it was because I was using a “read” token instead of a “write” one.
2022-10-26T08:50:30Z
Thank you!!!
2023-02-05T04:50:35Z
@radamesI was having this problem with this following errors can’t push my files to hugging face ,I was having following errorScreenshot 2023-02-05 at 10.17.02 AM1446×440 65.1 KB’I was using write token only but I was getting this error…pls anyone help me out@sswam
2023-02-05T04:56:22Z
hi@sushmanth,Can you please try to lfs track the.onnxthen add push then?git lfs track "*.onnx"
git add *.onnx
git commit -a
git pushPlease let me know if that works . You can read more about ithereandhere
2023-02-05T05:06:48Z
@radames,I was using this .yml file ,I don’t knew where iam going wrong once u pls check this outScreenshot 2023-02-05 at 10.35.14 AM1670×934 77.4 KB
2023-02-05T05:15:31Z
@radamesI was using GitHub workflow to deploy into hugging face ,so I don’t knew where I was going wrong…
2023-06-09T06:33:49Z
image1920×1080 308 KBi have done git lfs install, also done git track “.dll" and ".lib”, then also not able to push to my new spaces
2023-06-09T21:08:20Z
Hi@Jignasha, you might need to clean up the git history, since you may have committed these.dlland.libsfiles before you started tracking them with LFS
2023-06-12T11:15:12Z
image1920×1080 349 KBcleared git history, did git lfs install, gilt lfs track *.dll and *.lib, git lfs track *.pyd, not updating to spacesissue is not resolving, taking a lot of time
2023-06-12T18:23:18Z
hi@jignasha, you have offending files.pydthese are compiled python binaries, they don’t need to be on your commit, please add it to your.gitignoreand cleanup the files from your history. I hope that works now
2023-07-07T21:14:40Z
second link was a life save, thank you so much!