GIT uploads - Linux username shows instead of git username

155 Views Asked by At

I am using 2 different GitHub accounts to manage 2 different projects. My device is a Pixelbook using the Linux beta terminal for pushing commits. I have the two accounts set up using SSH keys, and there doesn't seem to be a problem there.

When I initially set up the Linux, I set the username as "My-username", which is coincidentally the same username as my GitHub A-account. I looked at the repos on the Github B-account and saw my Linux/A-account listed as the author. The link to the profile is the correct account (as in the link is for github.com/B-Account).

How can I either

A: change the Linux username to something less identifiable

or

B: (preferred) change the author for new commits.

I have seen a few questions on here saying I can change the author with a script or amend command... but I don't think I really care about the existing commits. I just want to make it show the actual GitHub account name as the author instead of my terminal name.

Edit: The git config --global user.name command shows my full name, and the email is set in the --local for each repo with the appropriate email to the associated account.

1

There are 1 best solutions below

0
On

I was able to find a solution to my problem!

inside of the .git/config file, I removed the credential.helper = store line that I had previously enabled while using HTTPS connections.

Now my commits are posting with the appropriate account!