Why does the wrong username show in my commit messages?
To map your username to a commit, push, and other activities, Bitbucket Cloud requires that the email address you commit with matches a validated email address on an account. On your local system, where you commit, both Git and Mercurial allow you to configure a global username/email and a repository specific username/email. If you do not specify a repository specific username/email values, both systems use the global default. So, for example, if your Bitbucket account has a validated email address of
firstname.lastname@example.org, you need to make sure your repository configuration is set for that username. Also, make sure you have set your global username/email address configuration to a validated email address.
If the global default is not configured or if you have not validated your email address, the committer appears as unknown for your Bitbucket activities. Also, if you have multiple Bitbucket accounts, you may mistakenly commit your code under an email address that maps to an account name you did not intend. To have the existing commits on a repository map to a different account, you can use Username aliases for the repository in question. Aliases are per-repository. To set up an alias for a repository, you must have admin rights on it.
For information about configuring your usersname or aliases, see Set your username for Bitbucket Cloud actions.
Was this helpful?
Thanks for your feedback!