Map existing commits to username aliases

When someone makes commits locally and pushes them to a repository, the commit data determines which user account to attach to the push. However, Bitbucket Cloud can't map a user's commits in the repository Commits list if 1) the user who makes the commit hasn't configured their DVCS username and validated their email address or 2) the user changed their primary email alias in Bitbucket but not in their DVCS config file. You'll know a commit isn't mapped when you hover over the avatar or username and see: Author not mapped to Bitbucket user.

As a repository administrator, you can map existing non-mapped email aliases to user accounts from the Username aliases page. 

Username aliases

When you add a username alias to a repository, it only applies to that repository; others don't share that alias. If the user commits with the same non-mapped alias to multiple repositories, you'll have to add it to those repositories too.

Because username aliases are case sensitive, add all cases that appear differently. For example, if commits include the email addresses of foo@bar.com and FOO@BAR.COM, you must create two separate aliases.

Add an alias to a repository

To add an email alias to a repository, you'll need to first find the user's details.

  1. From the repository's Commits list, click a commit that the user pushed.

  2. From the commit page, click View raw commit.
    The raw commit string displays.

  3. Search for the From line and copy the user details.

Once you've got the user's details, you can add it to the repository in Bitbucket.

Only a user with admin access to a repository can add username aliases, and the user being added must have a Bitbucket account.

  1. From the repository, go to Repository settings.

  2. Click Username aliases.

  3. From the User column, search for the user account that you want to associate with the user who pushed the commit.

  4. From the Alias column, paste the user details you copied from the raw commit.

  5. Click Add.

When you return to the Commits list, you'll now see the mapped user account next to the commit. 

You may need to clear your browser cache for the mapped user account to display properly.

 

Additional Help