everytime I try to push to a repo I am asked for my account, username and token. so I searched for solutions and found that if you install the github cli app I could authenticate one time and it will not ask me when I try to push again. so I did that for a while but then I discovered that when I went to my profile's contribution chart, the numbers was awfully off. I went to my commits and found this look:
as you can see some commits has my picture and some doesn't, which clearly meant that I was pushing with a user that wasn't linked to my github user, but had the same name. the commits that has my image are the ones I edited directly in github the website.
so my questions are:
< token.txt
thing, I still have to store it somewhere visible). using a password is much more safe since it's stored in my brain and I can type it without copy pasting. so the whole token thing is not practical.GitHub authentication is not used for GitHub's contributions count.
Your email address, as it appears in each commit, is used; see the GitHub documentation. Note that the user.email
setting used when creating commits has nothing to do with authentication. You set this in Git independently of whether and how you authenticate to GitHub.
Once you make any particular commit, that commit has that email address. It cannot be changed. If you used the wrong email address, you may wish to replace that commit with a different commit that contains the correct email address.