Fork me on GitHub
Git配置、缓存用户名密码和清除缓存

配置用户名和邮箱:

git config --global user.name "username"

git config --global user.email "useremail@126.com"

清除配置中纪录的用户名和密码,下次提交代码时会让重新输入账号密码:

git config --system --unset credential.helper

查看git配置信息

git config --list

执行命令之后,再次pull或push时会缓存输入的用户名和密码:

git config --global credential.helper store

清除git缓存中的用户名的密码

git credential-manager uninstall

window中系统也可能会缓存Git连接的凭证

清除步骤如下:

打开控制面板->用户账户->凭据管理器->普通凭证,第一条应该就是刚才操作的,建议直接编辑,用户名和密码编辑为正确的,再次clone就可以了。
————————————————
版权声明:本文为CSDN博主「我是程序原」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_36527174/article/details/109721825

posted on 2022-10-25 13:39  HackerVirus  阅读(141)  评论(0编辑  收藏  举报