Push was rejected: forbidden
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 10 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 431 bytes | 431.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: ----------------------------------------------------------
remote: Your push was rejected for the following reasons:
remote: DENIED update refs/heads/main: forbidden
remote: ----------------------------------------------------------
==============
 ! [remote rejected] main -> main (pre-receive hook declined)I’ve tried the method inthis thread, or generating GPG Keys and put it into huggingface, or using:huggingface-cli loginStill do NOT work.
2022-09-14T09:42:40Z
Hello! Hmm, that’s strange! Did you rungit lfs installbefore adding and committing your files?
2022-09-14T09:59:20Z
Yes, The results are:$ git lfs install
Updated git hooks.
Git LFS initialized.
2022-09-14T10:03:24Z
Sweet! And before adding and committing you rangit lfs track <EXTENSION>for any larger files?You can try runninggit lfs ls-filesto see if all the files that you’re trying to track have actually been added with Git LFS. Generally anything large-ish (checkpoint files, images, etc.) should be tracked. If they’re not, then you can undo the commit, track the files, commit and push again.
2022-10-24T04:16:12Z
I had the same errors. Eventually I figured out that it was because I was using a “read” token instead of a “write” one.
2022-10-24T04:49:39Z
It works, thanks a lot!
2022-11-01T17:32:33Z
Anyone else still seeing this error? I’m just starting with a basic repo with only tiny files. I saw@sswam’s post and that totally made sense. I was in fact using a READ token. But I have since created a WRITE token and have confirmed (multiple times) that that token is the one I’m using as myhuggingface-cli logincredentials, but I’m still seeing this error.
2022-11-02T19:30:55Z
Also facing this issue, I setup my GPG key and am using a WRITE token after runninghuggingface-cli loginbut still getting:remote: Your push was rejected for the following reasons:
remote: DENIED update refs/heads/main: forbidden