git 首次push时账户密码错误 fatal: Authentication failed for解决

75 阅读1分钟

首次push时输错了账户密码,导致

fatal: Authentication failed for 'https://your-repository-url'

法4(成功)

在命令行状态下,使用法1-3无法解决,使用TortoiseGit手工提交成功

法1(无效)

fatal: Authentication failed for解决方法 blog.csdn.net/xixihahalel…

git config --system --unset credential.helper(清除 Git 的凭据缓存)

未提示重置账户名密码,再次push一直提示Everything up-to-date

法2(无效)

本地版本与远程版本有差异,但又要强制推送可以使用 --force 参数

git push --force origin master

法3(无效)

百度AI-文心快码:fatal: Authentication failed for导致无法push

系统会提示你输入用户名和密码。

git config --global credential.helper cache

git push https://your-repository-url

提示重置账户名密码,重置后,再次push仍然提示Everything up-to-date(代码是有改动的)