1. 程式人生 > >正解:git push 報:does not match your user account.&&The following addresses are currently registered

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

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了。