2016-11-17 85 views
3

我執行以下命令:混帳推錯誤:不匹配您的用戶帳戶

git pull <partner_remote> <partner_branch> 
git config user.email <my_email> 
git config user.name <my_name> 
git commit --amend --reset-author 
git push <my_remote> HEAD:refs/for/<my_branch> 

但我得到了「混帳推」後,出現以下錯誤:

remote: ERROR: In commit b6b74fff7850c4b61a5535519959b1ab58ca6fa9 
remote: ERROR: committer email address [email protected] 
remote: ERROR: does not match your user account. 
remote: ERROR: 
remote: ERROR: The following addresses are currently registered: 
remote: ERROR: [email protected] 
remote: ERROR: 
remote: ERROR: To register an email address, please visit: 
remote: ERROR: http://xxxxxxxx 

我不知道如何解決它。

+0

你有沒有或最近有人更改你的Git帳戶中的元數據? –

+0

不,我的帳戶只有我可以使用,其他人無法使用我的帳戶。 – LayaCCC

+0

上面的那些Git命令(以'git pull'開始......)在錯誤之前還是之後運行?如果之後,那麼問題很可能是您更改了您的用戶憑據,並且回購主機不喜歡它。 –

回答

1

如果我理解正確,(aaa @ aaa)與在Gerrit中註冊的bbb @ bbb電子郵件不同,對吧?所以...檢查AAA @ AAA是您正確的電子郵件,並將其註冊在格里特:

  1. 轉到格里特
  2. 點擊「你的名字」(右上)
  3. 點擊「設置「
  4. 點擊‘聯繫我們’
  5. 點擊‘註冊新的電子郵件......’
  6. 裝滿AAA @ AAA領域,並點擊‘註冊’

您將收到一封「[Gerrit Code Review]電子郵件驗證」電子郵件,請按照說明將aaa @ aaa電子郵件地址添加到您的用戶帳戶。

+2

問題是操作可能無法訪問aaa @ aaa電子郵件地址。這是從哪裏來的,以及如何改變它? – user2441441

0

這是由於git憑證管理器存儲以前的登錄憑據。

這裏是修復,只需要執行:

git credential-manager clear <gerrit url> 

如:混帳憑據經理明確https://mygerrit.com

如果你推或克隆它會提示輸入用戶名和密碼