Wrong username in email notification about pull request
Asked by Vladimir Pikovski:

Hi all !

for some reason in our organization , when someone makes commit on open PR it sends the update about the commit with wrong format.

wrong username = other user from our organization

![Untitled.png](https://community.atlassian.com/t5/image/serverpage/image-id/220909i4FE7A81B89A60BE9/image-size/large?v=v2&px=999 "Untitled.png")


Answers:
author: Theodora Boudale
body: Hi Vladimir and welcome to the community!

The part that you marked as 'wrong username' shows the authenticated user that made the push.

The part that you marked as 'correct commiter username' is based on the author of the commit, which is configured locally in Git, and has nothing to do with authentication.

If the user who pushes these commits is the 'correct user', then based on the email, this user is pushing using the credentials of the 'wrong user'.

The two users may be sharing the same computer that has either the HTTPS credentials or the SSH keys of the wrong user.  
If each user uses a different computer, then either the correct user has on their computer HTTPS credentials or SSH keys of the wrong user (which is not advised, credentials and account SSH keys should not be shared with other users), or they are (sometimes?) using the wrong user's computer.

I would suggest asking the correct user

* What type of authentication do they use when they push (HTTPS or SSH)
* If they use a different computer than the wrong user, check if a Git credential manager has saved the HTTPS credentials of the wrong user or if the SSH keys of the wrong user are present on this computer.  
  If that's the case, the correct user will need to remove any HTTPS credentials or SSH keys of the wrong user and use their own instead.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


author: Patrik S
body: Hello [@Vladimir Pikovski](/t5/user/viewprofilepage/user-id/5054796) ,

Welcome to the Atlassian Community!

The usernames shown in the different sections of the Pull Request e-mail notification come from different sources.

The username from the header (" \<username\> updated pull request") is based on the bitbucket account used to authenticate the push to bitbucket. This is the user whose credentials were used to authenticate the push.

On the other hand, the Author of the commit is based on the local git configuration of the machine where the commit was created. Once you create a commit in your local repository, git will sign the commit with the username and e-mail address you have in your git-config. To check what is the username current configured you can use the following command :

```
git config --get user.email

git config --get user.name
```

If the user used for pushing and the user configured in your local gitconfig are different, the Pull Request e-mail notification will indeed show different usernames.

In this case, to fix the issue, you would have to either:

* [Configure your Git username/email](https://support.atlassian.com/bitbucket-cloud/docs/configure-your-dvcs-username-for-commits/#Configure-your-Git-username-email) to use the same username/email used to execute the push to bitbucket.  

  or  

* Authenticate the push using the same username currently configured in your git-config.

Hope that helps! Let me know in case you have any questions.

Thank you, [@Vladimir Pikovski](/t5/user/viewprofilepage/user-id/5054796) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud