git push时出现如果错误。
git config --global user.name "Your Name"
git config --global user.email you@example.com
上述在push之前已经执行过。
用如下命令清除本地账户即可(注意 clear 后面需要加上gerrit 的网址):
git credential-manager clear gerrit.X.com.cn
再git push时,会提示重新输入用户名、密码。
ok
本文介绍了在使用Git推送代码时遇到的Gerrit账户认证错误的解决方法。首先确认已设置正确的`git config --global user.name`和`user.email`。然后通过`git credential-manager clear gerrit.X.com.cn`清除本地账户信息,重新push时输入用户名和密码,问题即可得到解决。
git push时出现如果错误。
git config --global user.name "Your Name"
git config --global user.email you@example.com
上述在push之前已经执行过。
用如下命令清除本地账户即可(注意 clear 后面需要加上gerrit 的网址):
git credential-manager clear gerrit.X.com.cn
再git push时,会提示重新输入用户名、密码。
ok
7573
2万+
1248

被折叠的 条评论
为什么被折叠?