I have tried to add a public key formatted like so:
sk-ssh-ed25519@openssh.com <SSH_PUBLIC_KEY> username@Names-MacBook-Air.local
It immediately results in a 400 error saying the 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.local
It immediately results in a 400 error saying the key is invalid
I don’t think there’s anything wrong with the procedure, but it seems that errors may occur depending on the environment.
Thanks for replying. That person seems to have gotten past the stage of adding it to the 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”.
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…
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.
@not-lain It might be a nasty bug.
Hi @viyer9
Can you run the command ssh -T git@hf.co
and let me know what you see ?
alternatively can you try the steps mentioned in
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 to Hugging Face – The AI community building the future. and pasting your public key in the ssh key section.
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.
@viyer9
that’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
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.
cc @pierric if you want to take a look
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.com
sk-ssh-ed25519@openssh.com
Some of our documentation is stating differently, we’ll update it ASAP.