删除本地git账号

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

问题

git账号密码输入错误后,再次操作会自动使用上次输入错误的账号密码:

remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://xxx.git/'

解决

方法1

设置清空git保存的账号密码并每次操作时强制输入账号密码,即git不自定保存账号密码

git config --system --unset credential.helper

设置git自动保存输入的账号密码

git config --global credential.helper store

方法2

Windows平台在控制面板/用户帐户/凭据管理器下可以查看到git保存的账号信息,手动删除指定git账号信息即可。

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/sz85850597/article/details/84939368