-1

I am on migration process from svn repo to bitbucket repo.

At this moment i have all svn repo as local git repo. i can show commits and users logs of all svn repo history on my local git repo.

On next step try to upload local git repo to remote bitbucket repo with command

git push -u origin master

after some hours, there is a error with users does not match.

  Please ensure that the commit contains the correct Committer EMail

it's mandatory create all commiters users as users on bitbucket repo before push, all users are linked to jira.

This is a huge svn repo there are old commiters, does not work in company now and they are not jira users, how i should handle this? Thanks.

  • I have a feeling [this thread](https://stackoverflow.com/questions/28425670/git-error-expected-committer-email-but-found-karanxyz-com/28425852?noredirect=1#comment45194115_28425852) might be related, although the solution is not really available. Are you able to view the bitbucket logs and chase down the problem there? – Oliver Baumann Nov 17 '17 at 23:29
  • Issue was resolved with a flag enabled **Yet Another Commit Checker** in **settings/hooks** menu of bitbucket repo. – LennyBaxter Mar 07 '18 at 15:24

1 Answers1

0

The commiter users are not linked with bitbucket user or jira. It’s maily caused by the email format is incorrect.

To check the committer email, you can use git log -1 (or git log if there are multiple committers), the commit will show with the format as below:

Author: user <user@bd62987d-da29-cb4d-8dc4-d91045db71ae>
Date:   Tue Sep 26 02:58:34 2017 +0000

Commit message

If you migrated svn to git by git svn clone, the email addresses for the committers usually not import correctly as above.

You can change the committer email for all the commits as below:

git filter-branch --commit-filter '
        if [ "$GIT_AUTHOR_EMAIL" = "current email" ];
        then
                GIT_AUTHOR_EMAIL="new email";
                git commit-tree "$@";
        else
                git commit-tree "$@";
        fi' HEAD

It will take a few minutes to replace the email address in commit history. After that, you can push again.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74