Git远端修改过账号密码,本地无法推送的解决方法
问题描述:Git远端(如:gitlab、github、gitee等)修改过密码,然后git本地端没有修改凭据push报错,报错内容如下:
$ git push remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See http://192.168.1.2/help/topics/git/troubleshooting_git.md#error-on-git-fetch-http-basic-access-denied fatal: Authentication failed for 'http://192.168.1.2/zhangxx/Project.git/'问题分析:Git远端修改了账户密码,但本地凭据管理器中记录的是之前的旧密码,然后git push时认证不通过!
解决方法:打开Windows控制面板>用户账户>凭据管理器,删除凭据管理器中存储的Git远端账户与密码,然后重新执行git push进行仓库远端推送,在弹出的对话框中重新填写Git远端账户与密码,账户密码填写完成后终端即会提示推送完成
