Lukas Zettel
Lukas Zettel

Reputation: 21

Git push rejected due to expected committer email

Tried to push a local branch with a bugfix to the origin and got message like:

remote: Push rejected.
remote: refs/head/bugfix/issueX: hash1hash2hash: expected committer email '[email protected]' but found '[email protected]'
remote: refs/head/bugfix/issueX: hash1hash2hash: expected committer name 'A' but found 'Z'

The computer is a "shared" test/dev device and 'A' was the previous user. I changed email and name with

git config --global user.name "Z"
git config --global user.email "[email protected]"

The remote server is running Atlassian Stash. Already tried Expected Committer Name Git Push Issue

Upvotes: 1

Views: 5057

Answers (1)

Lukas Zettel
Lukas Zettel

Reputation: 21

Problem solved. The .git-credentials did not contain the user Z but the user A and some older ones. For some reasons it did not ask for the credentials of Z. I removed the existing file and pushed to origin again then git asked for the credentials.

Upvotes: 1

Related Questions