github git-credential:不支持“擦除”操作

MrL*_*kas 13 github-cli

我正在处理的 github 存储库遇到一些问题。我刚刚意识到我比 main 提前了 3 个提交,并且想要推送,但终端提示以下内容:

git push
gh auth git-credential: "erase" operation not supported
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/name/project/'
Run Code Online (Sandbox Code Playgroud)

有没有人遇到过这种情况并且可以提供帮助?

非常感谢

Ste*_*ney 16

您需要重新使用 GitHub 进行身份验证。运行以下命令并按照提示操作。

gh auth login
Run Code Online (Sandbox Code Playgroud)


tet*_*tet 10

接受的答案对我不起作用。

我不得不gh auth refresh这样做。