Reputation: 21
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
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