@@ -305,5 +305,193 @@ It will ask for **Username** and **Password**:
305305 <img src =" https://github.com/user-attachments/assets/e07b63c9-b732-4adc-ac64-9792ee923efb " width =" 47% " />
306306</p >
307307
308+ ---
309+ ---
310+
311+ # * Back to Normal*
312+
313+ ## for Linux
314+
315+ You earlier had ** multiple Git accounts** configured on the same machine (with SSH keys and Git config switching, like in the doc you linked), but now you only want to use your ** single account (` akashdip2001 ` )** on this computer.
316+
317+ That means you can ** clean up old configs and set everything to one account** . Here’s how you can fix it step by step:
318+
319+ ---
320+
321+ ### 1. Reset Git global config to your account
322+
323+ ``` bash
324+ git config --global user.name " akashdip2001"
325+ git config --global user.email " your_email@example.com"
326+ ```
327+
328+ 👉 Replace ` your_email@example.com ` with the email linked to your GitHub account.
329+
330+ ---
331+
332+ ### 2. Clean up SSH keys (if you had multiple before)
333+
334+ * Check what keys you currently have:
335+
336+ ``` bash
337+ ls -al ~ /.ssh
338+ ```
339+
340+ If you see multiple like ` id_rsa ` , ` id_rsa_work ` , ` id_rsa_personal ` , etc., and you only want one account:
341+
342+ * Keep the key you want to use (say ` id_ed25519 ` or ` id_rsa ` )
343+ * Remove old ones:
344+
345+ ``` bash
346+ rm ~ /.ssh/id_rsa_work ~ /.ssh/id_rsa_personal
347+ ```
348+
349+ ---
350+
351+ ### 3. Reset SSH config
352+
353+ Open:
354+
355+ ``` bash
356+ nano ~ /.ssh/config
357+ ```
358+
359+ Clean it up so it only has one GitHub setup, e.g.:
360+
361+ ```
362+ Host github.com
363+ HostName github.com
364+ User git
365+ IdentityFile ~/.ssh/id_ed25519
366+ ```
367+
368+ Save and exit.
369+
370+ ---
371+
372+ ### 4. Test your connection
373+
374+ ``` bash
375+ ssh -T git@github.com
376+ ```
377+
378+ It should say something like:
379+
380+ ```
381+ Hi akashdip2001! You've successfully authenticated, but GitHub does not provide shell access.
382+ ```
383+
384+ ---
385+
386+ ### 5. Verify per-project Git config (optional)
387+
388+ Sometimes repos override global config. Run inside any repo:
389+
390+ ``` bash
391+ git config --get user.name
392+ git config --get user.email
393+ ```
394+
395+ If they’re different, reset them:
396+
397+ ``` bash
398+ git config user.name " akashdip2001"
399+ git config user.email " your_email@example.com"
400+ ```
401+
402+ ---
403+
404+ ✅ After this, your computer will only use ** ` akashdip2001 ` GitHub account everywhere** .
405+
406+ ---
407+
408+ ## for Windows
409+
410+ If You're on ** Windows PowerShell** , so a few Linux-style commands (` ls -al ` , ` rm ` , ` nano ` ) won’t work the same way. Let’s fix this step by step:
411+
412+ ---
413+
414+ ## 🔹 1. List files in ` .ssh `
415+
416+ Instead of ` ls -al ` , use:
417+
418+ ``` powershell
419+ Get-ChildItem -Force $env:USERPROFILE\.ssh
420+ ```
421+
422+ That will show you all files in ` C:\Users\akash\.ssh ` .
423+
424+ ---
425+
426+ ## 🔹 2. Delete old keys
427+
428+ If you see files like ` id_rsa_work ` or ` id_rsa_personal ` , delete them with:
429+
430+ ``` powershell
431+ Remove-Item $env:USERPROFILE\.ssh\id_rsa_work*
432+ Remove-Item $env:USERPROFILE\.ssh\id_rsa_personal*
433+ ```
434+
435+ (Use ` * ` to also remove ` .pub ` versions.)
436+
437+ ---
438+
439+ ## 🔹 3. Create/Edit ` config `
440+
441+ Since ` nano ` doesn’t exist on Windows, use ** Notepad** :
442+
443+ ``` powershell
444+ notepad $env:USERPROFILE\.ssh\config
445+ ```
446+
447+ Add this inside (replace with the actual key you want to keep, e.g. ` id_ed25519 ` or ` id_rsa ` ):
448+
449+ ```
450+ Host github.com
451+ HostName github.com
452+ User git
453+ IdentityFile C:/Users/akash/.ssh/id_ed25519
454+ ```
455+
456+ Save and close.
457+
458+ ---
459+
460+ ## 🔹 4. Start SSH agent & add your key
461+
462+ Run:
463+
464+ ``` powershell
465+ Start-Service ssh-agent
466+ ssh-add $env:USERPROFILE\.ssh\id_ed25519
467+ ```
468+
469+ * (replace ` id_ed25519 ` with your real key file name)*
470+
471+ ---
472+
473+ ## 🔹 5. Test GitHub connection
308474
475+ ``` powershell
476+ ssh -T git@github.com
477+ ```
478+
479+ You should see:
480+
481+ ```
482+ Hi akashdip2001! You've successfully authenticated...
483+ ```
484+
485+ ---
486+
487+ 👉 Right now, your config is correct (` user.name ` + ` user.email ` are set globally), but the error:
488+
489+ ```
490+ Permission denied (publickey).
491+ ```
492+
493+ means GitHub doesn’t recognize the SSH key you’re using.
494+ You either need to ** add the correct key to GitHub** or ** generate a new one** .
495+
496+ ---
309497
0 commit comments