Can't Push to New Space
I’m getting the following errors when trying to push to my new space for the first time.remote: -------------------------------------------------------------------------
remote: You are not authorized to push to this repo.
remote: Make sure that you are properly logged in.
remote: -------------------------------------------------------------------------
To https://huggingface.co/spaces/Grokgpt/grokgpt
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://huggingface.co/spaces/Grokgpt/grokgpt'I am logged in with a write token. I don’t have any large files, but I did activate lfs. I have huggingface_hub installed and huggingface-cli. I get the following output from cli whoami.(hf-grokgpt) larry@Larrys-MacBook-Pro grokgpt % huggingface-cli whoami
Grokgpt
**orgs:** grokgpt-orgI am folllowing the instructions on the Spaces page. I cloned the repo, created a Dockerfile, and did the following:git add Dockerfile 
git commit -m "Add application file" 
git pushI’ve tried starting over from scratch several times. Still get the same error.
2023-04-02T22:42:21Z
I have an SSH key. I have a GPG key. I’ve got 3 write tokens. I’ve restarted and reset my space a dozen times. Cloned it a dozen times. Here is my .git/config.[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"]
        url = https://huggingface.co/spaces/Grokgpt/grokgpt
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
        remote = origin
        merge = refs/heads/mainShouldn’t be this difficult to push to a repo. I’ve spent way too many hours of my life on it. Maybe I have something misconfigured, but can’t figure out what. Ready to give up on Huggingface spaces.
2023-04-03T17:19:14Z
hi@Grokgpt,sorry you’re having issues, one note it seems like you’re on OSX, once had similar issue and it was due to my keychain access misconfigured.I got Authorization error🤗DatasetsI’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-specificOne hack way to solve it is to add your token and user to your.git/configinside your repo[remote "origin"]
        url = https://USER:TOKEN@huggingface.co/spaces/Grokgpt/grokgpt
        fetch = +refs/heads/*:refs/remotes/origin/*
2023-04-03T17:28:03Z
Hi@Grokgpt, sorry for the inconvenience.Can you dohuggingface-cli login(press Enter to add to git credentials) and thenhuggingface-cli envand copy-paste the output of both commands please?Thank you in advance
2023-04-03T17:30:26Z
(for context, pushing to Huggingface Hub using your SSH key is not yet possible but we are working on that feature)
2023-04-05T19:27:53Z
Thanks for getting back to me. I hadn’t gotten a response in awhile and I stopped checking for a day or two. I’ll give this a try!
2023-04-05T19:40:33Z
Thanks, here’s the output:(hf-grokgpt) larry@Larrys-MacBook-Pro grokgpt % huggingface-cli login

    _|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|
    _|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|
    _|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|
    _|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|
    _|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|
    
    A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.
    Setting a new token will erase the existing one.
    To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .
Token: 
Add token as git credential? (Y/n) y
Token is valid.
Your token has been saved in your configured git credential helpers (osxkeychain).
Your token has been saved to /Users/larry/.cache/huggingface/token
Login successful
(hf-grokgpt) larry@Larrys-MacBook-Pro grokgpt % huggingface-cli env

Copy-and-paste the text below in your GitHub issue.

- huggingface_hub version: 0.13.3
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.11.2
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /Users/larry/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Grokgpt
- Configured git credential helpers: osxkeychain
- FastAI: N/A
- Tensorflow: N/A
- Torch: N/A
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: N/A
- REDACTED_TOKEN: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /Users/larry/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /Users/larry/.cache/huggingface/assets
- HF_TOKEN_PATH: /Users/larry/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
2023-04-05T23:11:32Z
Whoa! That worked. Thanks!
2023-04-05T23:12:57Z
The hack worked. I didn’t try cleaning up the osxkeychain yet.
2023-04-12T19:44:32Z
FYI we now support SSH authentication,huggingface.coHugging Face – The AI community building the future.We’re on a journey to advance and democratize artificial intelligence through open source and open science.example:image1308×546 84.2 KB
2023-05-19T16:03:04Z
I’m having the same issues not being able to write to a new HF space.I’ve created a new token with write access, logged in viahuggingface-cliand still am unable to write.Here is the output ofhuggingface-cli env, I would prefer not to add username:token to the .git/config file.C02D3C6NMD6M:hello-world dchau$ huggingface-cli login

    _|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|
    _|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|
    _|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|
    _|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|
    _|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|
    
    A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.
    Setting a new token will erase the existing one.
    To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .
Token: 
Add token as git credential? (Y/n) Y
Token is valid.
Your token has been saved in your configured git credential helpers (osxkeychain).
Your token has been saved to /Users/dchau/.cache/huggingface/token
Login successful
C02D3C6NMD6M:hello-world dchau$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 452 bytes | 452.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: -------------------------------------------------------------------------
remote: You are not authorized to push to this repo. 
remote: Make sure that you are properly logged in.
remote: -------------------------------------------------------------------------
To https://huggingface.co/spaces/ducchau/hello-world
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://huggingface.co/spaces/ducchau/hello-world'
C02D3C6NMD6M:hello-world dchau$ huggingface-cli env

Copy-and-paste the text below in your GitHub issue.

- huggingface_hub version: 0.14.1
- Platform: macOS-13.2.1-x86_64-i386-64bit
- Python version: 3.11.3
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /Users/dchau/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: ducchau
- Configured git credential helpers: osxkeychain
- FastAI: N/A
- Tensorflow: N/A
- Torch: N/A
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: N/A
- REDACTED_TOKEN: N/A
- gradio: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /Users/dchau/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /Users/dchau/.cache/huggingface/assets
- HF_TOKEN_PATH: /Users/dchau/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
2023-05-20T02:46:13Z
hi@ducchau, thanks for sharing you env. I see you’re on OSX, and as you noticed on this thread there a few folks facing similar issue with OSX.Perhaps you could try the SSH authentication approach?Hugging Face – The AI community building the future.? If you add your keys to your settings you can edit the file from your.git/configor reclone the repogit clone git@hf.co:spaces/ducchau/hello-world[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"]
        url = https://huggingface.co/spaces/ducchau/hello-world
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
        remote = origin
        merge = refs/heads/mainto[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
[remote "origin"]
	url = git@hf.co:spaces/ducchau/hello-world
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main
2023-07-10T12:02:45Z
hi@radamesI have the same error message on Linux when I try to push to a new space. I’m on Linux and I’m using SSH authentification.My SSH authentification should be ok because I getHi antoinescenario, welcome to Hugging Face.as output ofssh -T git@hf.co.- Platform: Linux-5.15.0-1028-aws-x86_64-with-glibc2.35
- Python version: 3.10.6
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/ubuntu/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: antoinescenario
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: 2.12.0
- Torch: 2.0.0
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- REDACTED_TOKEN: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/ubuntu/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/ubuntu/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/ubuntu/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
2023-07-10T18:18:04Z
hi@antoinescenario,perhaps you have infringing files? we default to LFS for binary files, such as images, models, etc.so if you’ve committed such file in the past and posteriorly track then with LFS, you will still get errors. In general you get a log message stating the problem ongit push
2023-07-11T07:22:23Z
hi@radamesthanks for your answer. Yes I actually did that kind of things with binary files. But I managed to push with token authentification.
2023-07-11T21:19:05Z
cool! still weird you could’t use the SSH. I’m happy the token worked for you
2023-07-22T16:49:25Z
This worked for me!Just set up the SSH agent on my local machine, and manually chance the .git/config file from my repo, then everything worked!
2023-10-08T14:44:08Z
hi@radames, I am experiencing a similar problem in OSX.I was able to push models directly into my space until I did some file reorganization and I have messed up some things, after hours of debugging I still can’t find what is happening.After training, when pushing my model, I get the error:Several commits (3) will be pushed upstream.
2023-10-08 16:36:17 huggingface_hub.repository WARNING: Several commits (3) will be pushed upstream.
The progress bars may be unreliable.
2023-10-08 16:36:17 huggingface_hub.repository WARNING: The progress bars may be unreliable.
EOF
error: failed to push some refs to 'https://huggingface.co/inesani/ner-test3'The weird thing is it creates the model on the remote repository and is able to push some files related to the tokenizer but large files astraining_args.binandpytorch_model.binare not…that’s why I think it might be related with lfs.I have tried the hack of having my token into the.git/configbut same thing happens. I have created many new Access Tokens and the issue is the same.I am logged in without trouble:(.venv) inesanibarro@Iness-MacBook-Pro ner-test2 % huggingface-cli login

    _|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|
    _|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|
    _|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|
    _|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|
    _|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|
    
    A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.
    Setting a new token will erase the existing one.
    To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .
Token: 
Add token as git credential? (Y/n) Y
Token is valid (permission: write).
Your token has been saved in your configured git credential helpers (osxkeychain,store).
Your token has been saved to /Users/inesanibarro/.cache/huggingface/token
Login successful
(.venv) inesanibarro@Iness-MacBook-Pro ner-test2 % huggingface-cli env

Copy-and-paste the text below in your GitHub issue.

- huggingface_hub version: 0.15.1
- Platform: macOS-12.5-arm64-i386-64bit
- Python version: 3.10.9
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /Users/inesanibarro/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: inesani
- Configured git credential helpers: osxkeychain, store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.0.1
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.5.0
- REDACTED_TOKEN: N/A
- gradio: 3.33.1
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /Users/inesanibarro/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /Users/inesanibarro/.cache/huggingface/assets
- HF_TOKEN_PATH: /Users/inesanibarro/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: FalseAny help will be much appreciated!
2023-10-10T04:28:15Z
hi@inesani,if you can push some files, then the error is not on the authentication side. perhaps the git history of your model is mixed with files that need to belfs. Do you have more logs besides this? Can you confirm whether it is possible to push some files?inesani:Several commits (3) will be pushed upstream.
2023-10-08 16:36:17 huggingface_hub.repository WARNING: Several commits (3) will be pushed upstream.
The progress bars may be unreliable.
2023-10-08 16:36:17 huggingface_hub.repository WARNING: The progress bars may be unreliable.
EOF
error: failed to push some refs to 'https://huggingface.co/inesani/ner-test3'
2023-10-11T10:12:03Z
its not working for me . can someone help me with this(base) adduser@HP-LPT:~/First/Minima$ git pushEnumerating objects: 4, done.Counting objects: 100% (4/4), done.Delta compression using up to 8 threadsCompressing objects: 100% (3/3), done.Writing objects: 100% (3/3), 439 bytes | 439.00 KiB/s, done.Total 3 (delta 0), reused 0 (delta 0), pack-reused 0remote: -------------------------------------------------------------------------remote: You are not authorized to push to this repo.remote: Make sure that you are properly logged in.remote: -------------------------------------------------------------------------ToMinima - a Hugging Face Space by SanaullahCh! [remote rejected] main → main (pre-receive hook declined)error: failed to push some refs to ‘Minima - a Hugging Face Space by SanaullahCh’
No date available
No reply text available