In your terminal enter these commands without quotes
Enter your Github user name
git config --global user.name "Your Github User Name Here"
Enter the email you used to signup for GitHub
git config --global user.email "your@email.com"
Change the name of the master branch to main (Very Important)
git config --global init.defaultBranch main
Enter in terminal to see the config
git config --list
The terminal should look something like this
git config --list
user.name=Your Github User Name Here
user.email=your@email.com
init.defaultbranch=main
Remain in the terminal and enter these commands
ssh-keygen -t ed25519 -C yourgithub@email.com
Hit Enter until the process is done
In the terminal open the file id_ed25519.pub inside the .ssh directory within your Home directory with the following command.
cat id_ed25519.pub
and copy paste the code to your github account by adding the ssh key the link here.
https://github.com/settings/keys
Click New ssh key button Fill out the required fields and click the add ssh key button
Once the ssh key is added, when you try to push/create a repository a popup with ask to add your system to github fully type yes.
Enjoy being connected to github via ssh