Score:0

Key is invalid. You must supply a key in OpenSSH public key format

sv flag

when i tried generating SSH key by following the steps given in the github documentation page after the first command it has asked to run

$ ssh-keygen -t ed25519 -C "[email protected]"

this gives me the key and asks to enter pass phrase when i copy the key and paste into github > settings > SSH keys > new ssh key it shows me this error

Key is invalid. You must supply a key in OpenSSH public key format

so how do i fix this ?

Edit : i was watching this tutorial on how to upload projects on git i followed the exact tutorial unitl 20:28 where the tutor goes to the git hub page and copy pastes the command in the terminal after all previous commands it works for him but dosent work for me . im new to linux ubuntu so i dont know the difficult terms this is the most i can i explain

Solved: i was pasting the wrong thing in the github > settings > SSH keys > new ssh key the correct thing i have to paste was the code written in the file mentioned in the output something like

~/.ssh/id_ed25519.pub

this file will be in /home/.ssh there might be multiple files check the exact file which is mentioned in the output of the terminal open that file and paste the content in the file in github > settings > SSH keys > new ssh key and this time it should not show any error

Bodo avatar
pt flag
Please [edit] your question and add more details what you tried to paste to GitHub. From which file did you take the key? You need to use the *public* key (`id_ALGORITHM.pub`), not the private one (`id_ALGORITHM`).
ar flag
Which OS and version are you using?
VirajS avatar
sv flag
@user68186 Ubuntu 22.04.2 LTS
VirajS avatar
sv flag
@Bodo does it ping you after i edited? edit check
Bodo avatar
pt flag
Sorry, I don't want to watch video tutorials. After running the command `ssh-keygen -t ed25519 -C "[email protected]"` you should get two files `~/.ssh/id_ed25519` and `~/.ssh/id_ed25519.pub` or similar. Please tell *in your question* from where you copied the key you pasted into GitHub's key management page?
VirajS avatar
sv flag
@Bodo after running that command it gives me this output Generating public/private ed25519 key pair. Enter file in which to save the key (/home/viraj/.ssh/id_ed25519): Your identification has been saved in /home/viraj/.ssh/id_ed25519 Your public key has been saved in /home/viraj/.ssh/id_ed25519.pub The key fingerprint is: SHA256:ODWavS3BMbsWfgXmkARGNuQ6/G8dBUOonoBYJ7a5nFI mail
Bodo avatar
pt flag
Please [edit] your question to add requested information. Don't use comments for this purpose. You still did not answer the question what data you pasted into https://github.com/settings/keys. You should paste the contents of your public key file `/home/viraj/.ssh/id_ed25519.pub`.
VirajS avatar
sv flag
@Bodo oh thanks i was pasting something from the output of the terminal now i pasted the correct thing and it worked
Bodo avatar
pt flag
**Please add the information about what you did to the question**
Score:0
sv flag

i was pasting the wrong thing in the github > settings > SSH keys > new ssh key the correct thing i have to paste was the code written in the file mentioned in the output something like

~/.ssh/id_ed25519.pub

this file will be in /home/.ssh there might be multiple files check the exact file which is mentioned in the output of the terminal open that file and paste the content in the file in github > settings > SSH keys > new ssh key and this time it should not show any error

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.