0

I am hitting the one issue while pushing my changes to git in office. It is taking my personal email id which I was used for my personal git account. I tried re-installing git and setting up with office email again but still I am seeing the same issue. Can anyone help me to resolve this issue.

Office email : Raeesul.Asad_c_p@emc.com
Personal email: raeesulasad@gmail.com

Error message while doing push using git gui

Pushing to https://eos2git.cec.lab.emc.com/Test-and-Automation-Enablement/TestCases.git POST git-receive-pack (2377 bytes) remote: check-email: failed with exit status 1 remote: ERROR: Email address raeesulasad@gmail.com does not match a public email address on any GitHub account remote: ERROR: One or more email addresses did not match public a email address on a GitHub account To https://eos2git.cec.lab.emc.com/Test-and-Automation-Enablement/TestCases.git ! [remote rejected] dev/asadcr/vjtree-mpfs -> dev/asadcr/vjtree-mpfs (pre-receive hook declined) error: failed to push some refs to 'https://eos2git.cec.lab.emc.com/Test-and-Automation-Enablement/TestCases.git'

I tried re-installing git and setting up git with office email again.

sanyassh
  • 8,100
  • 13
  • 36
  • 70
  • 1
    *How* did you try to set git up again? Something along the lines of `git config --global user.email "Raeesul.Asad_c_p@emc.com"` ? – Romain Valeri May 16 '19 at 10:23
  • Possible duplicate of [Can I specify multiple users for myself in .gitconfig?](https://stackoverflow.com/questions/4220416/can-i-specify-multiple-users-for-myself-in-gitconfig) – doctorlove May 16 '19 at 10:23
  • @RomainValeri .. I gave my office mail . That is it . $ git config --global user.email Raeesul.Asad_c_p@emc.com $ git config --local user.email Raeesul.Asad_c_p@emc.com – Raeesul Asad May 16 '19 at 11:29
  • 1
    Possible duplicate of [Change email address in Git history](https://stackoverflow.com/questions/13552143/change-email-address-in-git-history) – phd May 16 '19 at 13:17
  • https://stackoverflow.com/search?q=%5Bgit%5D+change+email+address+commits – phd May 16 '19 at 13:17

1 Answers1

1

Try using the command:

$ git config --global user.email "Raeesul.Asad_c_p@emc.com"

In case this didn't do the trick, then please update in the question what you have tried till now.

Otherwise, you can look at how to configure authentication using ssh keys. See this, and add the ssh key that you generate to both your accounts, and add remote to push using the ssh link not the http one, by using the command

git remote add origin <ssh:link to a repo in the office account>

and for the repos in your personal ones run

git remote add origin <ssh:link to a repo in the personal account>

note that you can use any name in place of origin, like you can use office for office remote and personal for personal remote