Issue: Unable to Git Push due to Unregistered Email ID

Question

How to fix Git Push failure due to unregistered email ID, although email ID is correct?

Issue

When a fresh Git clone and push is tried with a Git client, the error below is seen:

remote: error: commit b7fa66c: email address aravind@digital.ai is not registered in your account,
and you lack 'forge author' permission.
remote: The following addresses are currently registered:
remote: aravindaraj@digital.ai
remote: To register an email address, visit:
remote: https://digital.ai/gerrit/#/settings/contact
remote:

Note: Email ID and hostname used here are examples

The correct email ID registered with Git/Gerrit account is aravindaraj@digital.ai, although it takes the email ID as aravind@digital.ai and throws this error while doing a Git push.

Solution

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:

  1. git config --system
    git configurations at the system level which takes the highest precedence over all users and repositories locally.
  2. git config --global
    git configuration at the user level which takes precedence over user-level all repositories locally.
  3. git config --local
    git configuration for a particular repository

 

Internal reference: #124766

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.