Check Current Git Configuration:

  • Begin by reviewing your current Git settings. Open your command prompt and run:
git config --list

Change youre username and email:

  • Make it the same as on github.com:
git config --global user.email "[email protected]"
git config --global user.name "your-username"

OLD SSH key:

  • Check under you’re windows user name to see if there are any keys already generated
    • Under C:\Users\<Windows user name>\.ssh:
    • open .pub key and copy the content

New SSH key:

  • Open forlder
    • Under C:\Users\<Windows user name>\.ssh
    • Run this ssh-keygen command
    • Open .pub key with text editor and copy the content
ssh-keygen -t ed25519 -C "[email protected]"

Add key to github:

  • Open your web browser and navigate to  github.com
  • Click on your profile icon in the upper-right corner of the page.
  • Select Your profile from the dropdown menu. – 1’st option
  • In the left sidebar, find and click on SSH and GPG keys.
  • On the right side, click on the New SSH key button.
    • Title: Enter a descriptive title for your key (e.g., your PC name).
    • Key Type: Set the key type is set to Authentication Key.
    • Key: Paste the contents of your .pub file that you copied earlier into this field.
    • Click on the Add SSH key button to save your new key
  • DONE.