How to fix Git Push failure due to unregistered email ID, although email ID is correct?
When a fresh Git clone and push is tried with a Git client, the error below is seen:
remote: error: commit b7fa66c: email address firstname.lastname@example.org is not registered in your account,
and you lack 'forge author' permission.
remote: The following addresses are currently registered:
remote: To register an email address, visit:
Note: Email ID and hostname used here are examples
The correct email ID registered with Git/Gerrit account is email@example.com, although it takes the email ID as firstname.lastname@example.org and throws this error while doing a Git push.
Sometimes, the username is appended with hostname and considered as email ID in Git clients. To fix this, the correct email ID should be updated in Git config file of local system where Git client is installed. The command below helps in updating the Git global config file:
git config --global user.name "username"
git config --global user.email <user_email_Id>
In general, there are three git configs available in a local system:
- git config --system
git configurations at the system level which takes the highest precedence over all users and repositories locally.
- git config --global
git configuration at the user level which takes precedence over user-level all repositories locally.
- git config --local
git configuration for a particular repository
Internal reference: #124766
Please sign in to leave a comment.