SSH key Problem #185981
Replies: 4 comments 3 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.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
|
The previous replies covered the main points well. To summarize in one place for anyone finding this thread: The deleted key is gone for good, but that's fine. Your code and repositories are completely untouched. The key only controls authentication access from that device. To re-add your SSH key to GitHub:
For Eclipse specifically: EGit (Eclipse's Git plugin) uses your system SSH keys automatically on most setups. After adding your public key to GitHub, try doing a push from Eclipse again — it should reconnect without any additional configuration. If it asks which key to use, point it to the private key file (the one without For learning resources: The official GitHub Skills site at https://skills.github.com is the best starting point, with interactive courses. GitHub also has a solid docs section at https://docs.github.com/en/get-started for the fundamentals. |
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