正解:git push 报:does not match your user account.&&The following addresses are currently registered

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/baidu_34750904/article/details/78865344

does not match your user account.邮箱A
The following addresses are currently registered: 邮箱B
Git 报上面的错误,根本原因在于:两个邮箱不一致导致,不一致的原因是我们在vi ~/.gitconfig 设置用户名和邮箱错误了。

  1. vi ~/.gitconfig
  2. vi 命令:i ,修改红框部分这里写图片描述
  3. vi 命令:wq 保存
  4. git commit –amend –author ‘名字 <邮箱>’
  5. 重新push,就OK了。

猜你喜欢

转载自blog.csdn.net/baidu_34750904/article/details/78865344