Why a weird Email linked to a wrong user?

A Python script use ubuntu@localhost.localdomain as username and email for git config, and then push a commit to the remote repo. But a weird thing was happened, this commit was linked to another user(his name in github is “mountainswen”).


I can reproduce the same behavior.


Looks like, the email address “ubuntu@localhost.localdomain” coincidentally is consistent with the account (may be a bot account) of the user “mountainswen”.

To avoid this situation, I recommend you change the email address to another.

1 Like

Thanks. I rewrote the Python script and it’s normal now. But I am confused here, why the account can use a email address which is impossible to verify.


As far as I know, when setting the local git config, the values of “user.name” and “user.email” can be filled with any ones. Even if the user name and email are not existing.
When execute the “git push” command, the commits can be pushed normally as long as the authorization token is valid and has the required access.

Yes it is. But my point is, the user “mountainswen”, he uses “ubuntu@localhost.localdomain” as his email when register a github account, how he can verify this email address? I think “localhost.localdomain” just is a linux HOSTNAME.

I mean, if I use “foo@localhost.localdomain” as a email address to register in github, who will receive the verify message?

Thank you again.

1 Like


This is a question about GitHub account, I recommend that you can go to the GitHub Account Questions board of the GitHub Community to look for an existing topic or start a new one about this account question.

Ok, thank you brightran.


If you add an email to your account, and commit using that email, it will be attributed to your account. It doesn’t need to be verified.

1 Like