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.

  1. From the repository, go to 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.

Last modified on May 17, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.