今天在在执行命令 git push 的时候 遇到下面问题:
fatal: Authentication Failed
致命:身份验证失败
What is the cause of this problem and how can I fix it?
这个问题的原因是什么?我该如何解决它?
产生上述原因
可能是最近你修改了 git 账号密码。
方法一
因为我使用的是Mac,所以直接在钥匙串访问里删除对应的密码凭证就可以了,重新执行 git push 或者 git pull vscode 会弹出框让你更新账号密码。
方法二
The following two commands helped me:
以下两个命令对我有帮助:
git config --global --unset credential.helper
git config --global credential.helper store
git config credential.helper store
It will ask you for credentials next time when you try to push.
当您下次尝试推送时,它会要求您提供凭据。
此方法将凭据以明文形式保存在您的 PC 磁盘上。您计算机上的每个人都可以访问它,
git config --global credential.helper 'cache --timeout=<timeout>'
参考链接
stackoverflow.com/questions/1… stackoverflow.com/questions/3… medium.com/@pramendrar…