原因

开启了全局的密码保存,使用了全局的账号密码信息,导致Git仓库的用户信息不正确

解决方式

1
2
3
4
5
6
7
8
9
10
11
# --system	系统变量
# --global 全局变量
# --local 本地变量
# 删除系统变量(记住密码)
git config --system --unset credential.helper
# 删除全局设置(用户名&邮箱&记住密码)
git config --global --unset user.name
git config --global --unset user.email
git config --global --unset credential.helper
# 在项目下配置本地变量(记住密码)
git config --local credential.helper store