Git push fails with malformed e-mail error message
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Pushing changes to the remote repository fails with a "failed to parse signature - malformed e-mail" error, and the commit(s) are not shown on the remote repository
Git push failure
$ git push
remote: commit_id_hash: failed to parse signature - malformed e-mailEnvironment
Production
Cause
When the commit was created, the git configuration contained a malformed e-mail address, for example
Malformed e-mail in git show
$ git show commitid
@example.com> epoch +0000Solution
The faulty commit needs to be rebased. The first step is to identify the faulty commit and provide the previous commit in the git-rebase. For example:
$ git log
commit aaaaaaa (HEAD -> master, origin/master, origin/HEAD)
Author: Test A <test@atlassian.com>
Date: Fri Dec 16 13:55:30 2022 +0100
commit-message-aaaaaaa
commit bbbbbbbb
Author: @example.com> epoch +0000
Date: Fri Dec 16 13:40:33 2022 +0000
commit-message-bbbbbbbb
commit ccccccccc
Author: Test A <test@atlassian.com>
Date: Fri Dec 16 13:35:00 2022 +0000
commit-message-ccccccccc As we want to change the author for bbbbbbbb commit, we need to provide the ccccccccc commit to rebase
$ git rebase -i cccccccccAfter this step, an editor will come up, which will show the last two commits
pick bbbbbbbb commit-message-bbbbbbbb
pick aaaaaaa commit-message-aaaaaaaAs we want to change commit bbbbbbbb, we change the pick from edit and save the editor
edit bbbbbbbb commit-message-bbbbbbbb
pick aaaaaaa commit-message-aaaaaaaOnce we saved the editor, we will need to change the author on commit bbbbbbbb by executing
git commit --amend --author="Test A <test@atlassian.com>"After this, an editor will come up, where we can change the commit message associated with commit bbbbbbbb. It's not necessary to change the commit message.
Once you are satisfied with your changes, run.
git rebase --continueOnce we finish rebasing commit bbbbbbbb, we can verify the author by executing the git log.
$ git log
commit aaaaaaa (HEAD -> master, origin/master, origin/HEAD)
Author: Test A <test@atlassian.com>
Date: Fri Dec 16 13:55:30 2022 +0100
commit-message-aaaaaaa
commit bbbbbbbb
Author: Test A <test@atlassian.com>
Date: Fri Dec 16 13:40:33 2022 +0000
commit-message-bbbbbbbb
commit ccccccccc
Author: Test A <test@atlassian.com>
Date: Fri Dec 16 13:35:00 2022 +0000
commit-message-ccccccccc Was this helpful?