# Can't Push to New Space

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%3E%5C
**Category:** Spaces\
**Created:** [April 2, 2023, 1:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319 "2023-04-02T13:16:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grokgpt](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Grokgpt](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGrokgpt)%5C
**Post date:** [April 2, 2023, 1:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F1 "2023-04-02T13:16:37Z")

</div>

I’m getting the following errors when trying to push to my new space for the first time.

```auto
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.

```auto
(hf-grokgpt) larry@Larrys-MacBook-Pro grokgpt % huggingface-cli whoami
Grokgpt
**orgs:** grokgpt-org

```

I am folllowing the instructions on the Spaces page. I cloned the repo, created a Dockerfile, and did the following:

```auto
git add Dockerfile 
git commit -m "Add application file" 
git push

```

I’ve tried starting over from scratch several times. Still get the same error.

---

<div class="post-metadata">

**Author:** ![Grokgpt](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Grokgpt](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGrokgpt)%5C
**Post date:** [April 2, 2023, 10:42pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F2 "2023-04-02T22:42:21Z")

</div>

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.

```auto
[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/main

```

Shouldn’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.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [April 3, 2023, 5:19pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F3 "2023-04-03T17:19:14Z")

</div>

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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fi-got-authorization-error%2F32881%2F5)%3A
>
> 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

One hack way to solve it is to add your token and user to your `.git/config` inside your repo

```auto
[remote "origin"]
        url = https://USER:TOKEN@huggingface.co/spaces/Grokgpt/grokgpt
        fetch = +refs/heads/*:refs/remotes/origin/*

```

---

<div class="post-metadata">

**Author:** ![Wauplin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/wauplin/32/40815_2.png) [@Wauplin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FWauplin)%5C
**Post date:** [April 3, 2023, 5:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F4 "2023-04-03T17:28:03Z")

</div>

Hi @Grokgpt, sorry for the inconvenience.

Can you do `huggingface-cli login` (press Enter to add to git credentials) and then `huggingface-cli env` and copy-paste the output of both commands please?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![Wauplin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/wauplin/32/40815_2.png) [@Wauplin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FWauplin)%5C
**Post date:** [April 3, 2023, 5:30pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F5 "2023-04-03T17:30:26Z")

</div>

(for context, pushing to Huggingface Hub using your SSH key is not yet possible but we are working on that feature)

---

<div class="post-metadata">

**Author:** ![Grokgpt](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Grokgpt](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGrokgpt)%5C
**Post date:** [April 5, 2023, 7:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F6 "2023-04-05T19:27:53Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Grokgpt](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Grokgpt](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGrokgpt)%5C
**Post date:** [April 5, 2023, 7:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F7 "2023-04-05T19:40:33Z")

</div>

Thanks, here’s the output:

```auto
(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
- hf_transfer: 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

```

---

<div class="post-metadata">

**Author:** ![Grokgpt](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Grokgpt](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGrokgpt)%5C
**Post date:** [April 5, 2023, 11:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F8 "2023-04-05T23:11:32Z")

</div>

Whoa! That worked. Thanks!

---

<div class="post-metadata">

**Author:** ![Grokgpt](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Grokgpt](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGrokgpt)%5C
**Post date:** [April 5, 2023, 11:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F9 "2023-04-05T23:12:57Z")

</div>

The hack worked. I didn’t try cleaning up the osxkeychain yet.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [April 12, 2023, 7:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F10 "2023-04-12T19:44:32Z")

</div>

FYI we now support SSH authentication,

> **[Hugging Face – The AI community building the future.](https://huggingface.co/login?next=%2Fsettings%2Fkeys%2Fadd%3Ftype%3Dssh)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

example:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/9/931e32fce89344667b7741037bd5a20d450f1470.jpeg)

---

<div class="post-metadata">

**Author:** ![ducchau](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@ducchau](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fducchau)%5C
**Post date:** [May 19, 2023, 4:03pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F11 "2023-05-19T16:03:04Z")

</div>

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 via `huggingface-cli` and still am unable to write.

Here is the output of `huggingface-cli env`, I would prefer not to add username:token to the .git/config file.

```auto
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
- hf_transfer: 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

```

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [May 20, 2023, 2:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F12 "2023-05-20T02:46:13Z")

</div>

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.](https://huggingface.co/settings/keys/add?type=ssh) ? If you add your keys to your settings you can edit the file from your `.git/config` or reclone the repo `git clone git@hf.co:spaces/ducchau/hello-world`

```auto
[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/main

```

to

```auto
[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

```

---

<div class="post-metadata">

**Author:** ![antoinescenario](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@antoinescenario](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fantoinescenario)%5C
**Post date:** [July 10, 2023, 12:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F13 "2023-07-10T12:02:45Z")

</div>

hi @radames I 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 get

> `Hi antoinescenario, welcome to Hugging Face.`

as output of `ssh -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
- hf_transfer: 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

```

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [July 10, 2023, 6:18pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F14 "2023-07-10T18:18:04Z")

</div>

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 on `git push`

---

<div class="post-metadata">

**Author:** ![antoinescenario](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@antoinescenario](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fantoinescenario)%5C
**Post date:** [July 11, 2023, 7:22am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F15 "2023-07-11T07:22:23Z")

</div>

hi @radames thanks for your answer. Yes I actually did that kind of things with binary files. But I managed to push with token authentification.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [July 11, 2023, 9:19pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F16 "2023-07-11T21:19:05Z")

</div>

cool! still weird you could’t use the SSH. I’m happy the token worked for you

---

<div class="post-metadata">

**Author:** ![lewispons](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewispons/32/17838_2.png) [@lewispons](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewispons)%5C
**Post date:** [July 22, 2023, 4:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F17 "2023-07-22T16:49:25Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![inesani](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/inesani/32/20024_2.png) [@inesani](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Finesani)%5C
**Post date:** [October 8, 2023, 2:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F18 "2023-10-08T14:44:08Z")

</div>

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:

```auto
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 as `training_args.bin` and `pytorch_model.bin` are not…that’s why I think it might be related with lfs.  
I have tried the hack of having my token into the `.git/config` but same thing happens. I have created many new Access Tokens and the issue is the same.

I am logged in without trouble:

```auto
(.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
- hf_transfer: 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: False

```

Any help will be much appreciated!

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [October 10, 2023, 4:28am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F19 "2023-10-10T04:28:15Z")

</div>

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 be `lfs`. Do you have more logs besides this? Can you confirm whether it is possible to push some files?

> [@inesani](#):
>
> ```auto
> 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'
> 
> ```

---

<div class="post-metadata">

**Author:** ![SanaullahCh](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@SanaullahCh](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSanaullahCh)%5C
**Post date:** [October 11, 2023, 10:12am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319%2F20 "2023-10-11T10:12:03Z")

</div>

its not working for me . can someone help me with this  
(base) adduser@HP-LPT:~/First/Minima$ git push  
Enumerating objects: 4, done.  
Counting objects: 100% (4/4), done.  
Delta compression using up to 8 threads  
Compressing 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 0  
remote: -------------------------------------------------------------------------  
remote: You are not authorized to push to this repo.  
remote: Make sure that you are properly logged in.  
remote: -------------------------------------------------------------------------  
To [Minima - a Hugging Face Space by SanaullahCh](https://huggingface.co/spaces/SanaullahCh/Minima)  
! [remote rejected] main → main (pre-receive hook declined)  
error: failed to push some refs to ‘[Minima - a Hugging Face Space by SanaullahCh](https://huggingface.co/spaces/SanaullahCh/Minima)’

[Next page](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-push-to-new-space%2F35319.md%3Fpage%3D2)
