Git push fails with malformed e-mail error message

Platform Notice: Cloud Only - This article only applies to Atlassian products 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

1 2 $ git push remote: commit_id_hash: failed to parse signature - malformed e-mail

Environment

Production

Cause

When the commit was created, the git configuration contained a malformed e-mail address, for example

Malformed e-mail in git show

1 2 3 $ git show commitid @example.com> epoch +0000

Solution

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:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ 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

1 $ git rebase -i ccccccccc

After this step, an editor will come up, which will show the last two commits

1 2 pick bbbbbbbb commit-message-bbbbbbbb pick aaaaaaa commit-message-aaaaaaa

As we want to change commit bbbbbbbb, we change the pick from edit and save the editor

1 2 edit bbbbbbbb commit-message-bbbbbbbb pick aaaaaaa commit-message-aaaaaaa

Once we saved the editor, we will need to change the author on commit bbbbbbbb by executing

1 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.

1 git rebase --continue

Once we finish rebasing commit bbbbbbbb, we can verify the author by executing the git log.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ 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
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.