# Authentication Error When Pushing Code to New Space

**URL:** <https://discuss.huggingface.co/t/authentication-error-when-pushing-code-to-new-space/174542>\
**Category:** Beginners\
**Created:** [March 23, 2026, 7:42am UTC](https://discuss.huggingface.co/t/authentication-error-when-pushing-code-to-new-space/174542 "2026-03-23T07:42:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dennisnlt](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@dennisnlt](https://discuss.huggingface.co/u/dennisnlt)\
**Post date:** [March 23, 2026, 7:42am UTC](https://discuss.huggingface.co/t/authentication-error-when-pushing-code-to-new-space/174542/1 "2026-03-23T07:42:07Z")

</div>

Issue: I am unable to push to newely created space.  
OS: Windows 11

I have created a space here git@hf.co:spaces/dennisnlt/mcp-sentiment. I have added the appropriate ssh keys to my account.

I have verified the following step and correctly receive my username:

command “ssh -T git@hf.co”  
Hi dennisnlt, welcome to Hugging Face.

GIT CONFIG:  
[core]  
repositoryformatversion = 0  
filemode = false  
bare = false  
logallrefupdates = true  
symlinks = false  
ignorecase = true  
[remote “origin”]  
url = git@hf.co:spaces/dennisnlt/mcp-sentiment  
fetch = +refs/heads/_:refs/remotes/origin/_  
[branch “main”]  
remote = origin  
merge = refs/heads/main  
vscode-merge-base = origin/main

Error from “git push”:

\*\* WARNING: connection is not using a post-quantum key exchange algorithm.  
\*\* This session may be vulnerable to “store now, decrypt later” attacks.  
\*\* The server may need to be upgraded. See https://openssh.com/pq.html  
remote:  
remote: ========================================================================  
remote:  
remote: ERROR: This action requires authentication.  
Make sure your SSH public key is linked with your profile on huggingface.co.  
See https://huggingface.co/settings/keys .

remote:  
remote: ========================================================================  
remote:  
fatal: Could not read from remote repository.

Please make sure you have the correct access rights  
and the repository exists.

Any help would be greatly appreciated.

**Update**

Apparently git on windows can use its own ssh…

Fix ( Force Git to use the Windows system client ):  
git config --global core.sshCommand “C:/Windows/System32/OpenSSH/ssh.exe”
