PROJECTS NOTES HOME

No username in commits

On work laptop I am accessing:

Two different repo "stores". Two different accounts use them. To work repos I am authenticating with ssh key's and to personal repo I have tried to authenticate with stored token in credential store.

I was not sure if I can use two different ssh keys from one machine to authenticate to two different github "stores", that is why I am using the two methods.

It was working just fine. I could commit to work repos and I could commit to personal repos from my work computer(that was the most important for me).

But then I noticed that none of my commits to my work repos contain my actual username and as a result I am not able to preview the commit history by username. It looks like this:

Instead of s2753g the commits are made as "Arvydas Gasparavicius".

git_commits_no_username.png

I then looked into this issue online, saw this - https://stackoverflow.com/questions/9419814/why-github-does-not-recognize-my-username-in-my-commits

Then did in my console from which I am making commits:

git config --global user.email "arvydas.gasparavicius@work.com"

Then checked if the values has been read:

git config user.email

And it was.

Then when I was making commits, I could see my username, which is s2753g, like you can see in the picture, the top commit.

And then I also tried to make a commit to my personal repo. Yes, I no longer make commits as arvydasg, but as Arvydas Gasparavicius, which is fine I guess(as long as I can commit to my personal repos from work computer - I don't care about the username :) :

git_commits_no_username2.png