删除 Windows 上 Git 的缓存密码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50918607/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remove cached password for Git on Windows
提问by ID 4JOB
I have recently updated my Github password at work (corporate Github account). I had configured Git on one of my VM which is Windows 10. Not whenever I do git pull
or git push
it throws error message:
我最近在工作中更新了我的 Github 密码(企业 Github 帐户)。我在我的一个 VM 上配置了 Git,它是 Windows 10。不是每当我这样做git pull
或git push
它会抛出错误消息:
remote: Invalid username and password
fatal: Authentication failed for 'https://<my_project_repository>'
remote: Invalid username and password
fatal: Authentication failed for 'https://<my_project_repository>'
I tried many of the options available online but none of them is helping which can bring the username/password prompt back. I even tried uninstalling and reinstalling it but it didn't help either.
我尝试了许多在线可用的选项,但没有一个可以使用户名/密码提示恢复。我什至尝试卸载并重新安装它,但它也没有帮助。
I am not using Git GUI. Using it through Git bash only.
我没有使用 Git GUI。仅通过 Git bash 使用它。
Any help?
有什么帮助吗?
回答by ChiragBhalgami
I have encountered the same issue. Reinstalling won't solve it. You will have to update it in your Credential Manager. Go to Control Panel > User Accounts > Credential Manager > Windows Credentials. You will see Git credentials in the list (e.g. git:https://). Click on it, update the password, and execute git pull/push command from your Git bash and it it won't throw any error message.
我遇到了同样的问题。重装也解决不了。您必须在凭据管理器中更新它。转至控制面板 > 用户帐户 > 凭据管理器 > Windows 凭据。您将在列表中看到 Git 凭据(例如 git:https://)。单击它,更新密码,然后从 Git bash 执行 git pull/push 命令,它不会抛出任何错误消息。