Huggingface says ssh-keygen Key is invalid
I have tried to add a public key formatted like so:sk-ssh-ed25519@openssh.com<SSH_PUBLIC_KEY> username@Names-MacBook-Air.localIt immediately results in a 400 error saying the key is invalid
2024-11-18T02:17:15Z
I don’t think there’s anything wrong with the procedure, but it seems that errors may occur depending on the environment.DEV CommunityHow to fix huggingface ssh authentication error with gitSo I recently started to use huggingface.co to store and retrieve models for our AI project at work,...
2024-11-18T03:43:36Z
Thanks for replying. That person seems to have gotten past the stage of adding it tothe account settings. I haven’t been able to add the public key in that settings page. It redirects me to a 400 error page which says “Invalid SSH Key”.
2024-11-18T03:51:44Z
In the case of a 403 error, account-based restrictions are often suspected, but in the case of a 400 error, what could it be?The authentication-related functions of HF often have bugs, so I think that some setting is probably wrong somewhere that we don’t know about…Unable to clone repository via ssh🤗HubI followedGit over SSHto test my SSH authentication 
(base) ➜  ssh -T git@hf.co
Hi ivnle, welcome to Hugging Face.

ivnle is the correct account that I added my public key to, but I’m unable to clone this repository. 
(base) ➜  git clone hf.co:datasets/bigcode/starcoderdata data/starcoderdata-raw
Cloning into 'data/starcoderdata-raw'...
ivanlee@hf.co: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the reposi…
2024-11-18T09:54:23Z
It says the SSH key I inputted is invalid. Given that the same method of generation worked for github/gitlab, I’m suspecting hf has a bug of some sort here in validating public keys.
2024-11-18T09:55:56Z
@not-lainIt might be a nasty bug.
2024-11-18T13:12:10Z
Hi@viyer9Can you run the commandssh -T git@hf.coand let me know what you see ?alternatively can you try the steps mentioned inhuggingface.coGit over SSHWe’re on a journey to advance and democratize artificial intelligence through open source and open science.and let me know how it goes ?make sure that you add your public ssh key to your huggingface account settings as mentioned in the docs, this can be done by going toHugging Face – The AI community building the future.and pasting your public key in the ssh key section.image746×538 27 KB
2024-11-18T21:34:53Z
The part which involves adding the key in my account settings is where I run into the 400 error. When I hit the “Add Key” button it immediately redirects me to a 400 error page saying “SSH Key Invalid” and does not add the key to my account settings.
2024-11-18T23:21:18Z
@viyer9that’s ideed weird, try opening a private window login and do not use any adblockers, vpn or any extra security measures and let me know how this goes
2024-11-19T00:01:44Z
I tried a new chrome install with incognito mode with (no VPN or adblock used). It still redirects to the 400 page saying “Invalid SSH Key”. I also tried with/without a newline at the end of the key comment.
2024-11-19T00:36:40Z
cc@pierricif you want to take a look
2024-11-20T20:36:51Z
Sorry about that@viyer9- after further investigation it turns out we do not support the following formats for SSH keys:sk-ecdsa-sha2-nistp256@openssh.comsk-ssh-ed25519@openssh.comSome of our documentation is stating differently, we’ll update it ASAP.