SSH key Problem #185981
Replies: 2 comments 2 replies
-
|
You’re totally okay, I promise 😊—this is a very normal GitHub beginner situation, and nothing is broken. Even though a deleted SSH key can’t be recovered, that’s completely fine because creating a new one fixes everything, and your Eclipse projects and GitHub repositories are safe. Deleting the key just tells GitHub to stop trusting that device until you add a new key, it doesn’t delete your code or mess up your work. The only file you need is the one that ends in .pub, because that’s the public key GitHub needs; the file without .pub is your private key and should stay on your computer and never be shared. Just open the .pub file in a text editor, copy the entire line of text, paste it into GitHub under Settings → SSH and GPG keys → New SSH key, give it a clear name like the device you’re using, and save it. Once that’s done, Eclipse will connect again and you’ll be able to push and commit with no issues. You didn’t do anything wrong, you’re not behind, and you’re definitely not the only person this has happened to—GitHub feels intimidating at first, but you’re already handling it correctly by asking for help, and you’re going to be just fine 👍 |
Beta Was this translation helpful? Give feedback.
-
|
You cannot recover the old key. It’s gone and that’s okay. Now about the two .pub files you’re seeing. You likely created two different key types, usually something like: id_rsa.pub id_ed25519.pub Both are valid, but you only need one. If you’re not sure which to use, use id_ed25519.pub copy the entire line exactly as it appears now You do not need to re-set up everything from scratch if Eclipse is already pointing to the same private key. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hello I am new to using GitHub I had a teacher help me set up my ssh key for I can connect it to Eclipse, but I am on another device and accidentally deleted it when I was trying to remove a new devices SSH key. I know it says "Once you delete it, you cannot retrieve it." How ever, I wanted to know if there is any possible way to retrieve it, or will my eclipse break or will I be able to push/commit my changes on the device I wanted.
PT2: Also, can anyone give me a guide on how to add it again. I already did ssh keygen command on cmd, and I got 4 files and don't know which one to select if you can also explain how to do that. (.pub / .rsa each have 2 of these files, I believe)
Lastly, does anyone know a good GitHub video to learn how to use it.
Sorry if this is not how you make a post this is my first time I struggled to find how to make a post and I don't know if this is correct discussion type or check out the other discussion, also I'm super stressed, sorry.
Beta Was this translation helpful? Give feedback.
All reactions