Replies: 3 comments 1 reply
-
What do you mean Git is configured with at the project level with ID, name and email? ssh keys are generally systemwide configurations. Double check which ssh key is being used to authenticate online Check Github profile's ssh keysOn Github.com, navigate to Settings > SSH and GPG keys. Take note of the ssh key names and public key fingerprints. Keep this page open and refer to it Check the computer's Github ssh key
|
Beta Was this translation helpful? Give feedback.
-
It is possible that the email address in your commits is not associated with your GitHub account.
|
Beta Was this translation helpful? Give feedback.
-
Hi @skis, It looks like you've correctly configured your Git settings locally, but when pushing to GitHub, the commits show someone else's name. This issue often arises from one of the following causes: 1. Check Global vs Local ConfigurationEven though you have set your name and email at the system and project level, there may be a conflict between your global and local Git configurations. Git will prioritize the local repository configuration over the global one. To ensure your name and email are correctly set for the repository: Check the global configuration: git config --global user.name
git config --global user.email Check the local repository configuration: git config --get user.name
git config --get user.email Make sure both match your GitHub username/email. If the local config is incorrect, you can update it with: git config user.name "Your Name"
git config user.email "[email protected]" 2. Check GitHub Account EmailEnsure the email you're using in Git is associated with your GitHub account. If your commits are associated with an email not linked to your GitHub account, GitHub will display the email, but the commit will appear as "unknown" or show someone else’s details. To fix this:
3. Check for Signed CommitsIf you're using GPG signing for commits, the signed commits may have the author information from your GPG key. Ensure the GPG key is associated with your GitHub account. You can check if your commits are signed by: git log --show-signature If the commits are signed, make sure your GPG key is correctly configured and associated with your GitHub account. 4. Cached CredentialsSometimes, cached credentials or an old email address used for authentication can lead to this issue. Clear your credentials cache to make sure your GitHub credentials are updated: git credential-cache exit Then, push again and GitHub should ask for your credentials. 5. Check Commit Author vs CommitterGit allows you to have different names and emails for the commit author and the committer. If the committer information is incorrect, it could show someone else’s name. To check and update the commit information, you can amend the commit: git commit --amend --author="Your Name <[email protected]>" This will update the commit's author information. By following these steps, you should be able to fix the issue and ensure that your correct name and email show up on GitHub. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
General
Body
Hey Friends! Perhaps a trivial issue but, strange one to me... Git on my local is configured to have my ID, name and email both at the system and project level. In the commit logs I can see my name and email. However, when I push it upstream i.e. to github I see someone elses name. Appreciate any insights into what I could be missing.
Thank You
Beta Was this translation helpful? Give feedback.
All reactions