Github account not linked despite using ssh key

Issue

I just got a new laptop and set up my github account with a new ssh key. However, whenever I commit to a repo, it says that the user that made the commit is Jimmy Lastname <[email protected]>. Why is it saying this instead of saying my normal github account made the commit? I linked the ssh key from my computer to my github account. Thanks.

Solution

Why is it saying this instead of saying my normal GitHub account made the commit?

Because you have not set your user.name/email:

git config --global user.name <MyGitHubAccount>
git config --global user.email <[email protected]>

Since there was no settings, Git try and guessed your user name/email based on your local computer account.

Answered By – VonC

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published