【问题标题】:Git bash doesn't allow me to re-enter my passwordGit bash 不允许我重新输入密码
【发布时间】:2020-01-21 22:39:15
【问题描述】:

我在 Github 中有自己的私人仓库。我使用 GitBash 将其克隆到我的本地计算机,但不小心输入了错误的密码。然后我又试了一次,我得到的是

fatal: could not create work tree dir 'sample': Permission denied

我试过这个命令

git config --global --unset credential.helper

如此处所述 Remove credentials from Git 但没有帮助。

我试过这个命令

git credential-manager delete https://github.com

如此处所述Git doesn't allow me to enter my password for cloning since I got it wrong the first time,但它显示“未知命令'删除'。请使用git-credential-manager ? 显示帮助。”

我不知道如何让它忘记我输入的内容,或者再次输入凭据。

【问题讨论】:

  • 是的,我看到了,这是我帖子中的第一个链接。
  • 哦,真丢人。没有点击它:/认识到那里的信息已经过时了。回到您的问题 - 我假设您正在 Windows 上阅读 GitBash,对吗?可能是另一个愚蠢的问题,但如果删除失败,您是否尝试过像git credential-manager remove https://github.com 这样的remove?并且,您检查过 Windows 控制面板中的凭据管理器吗?
  • @Christian,不,我没有尝试。下次再发生的时候让我试试。我只等了5分钟左右就解决了这个问题。

标签: git github git-bash


【解决方案1】:

但它说“未知命令'删除'。

正如我mention here,现在正确的命令是reject

git credential-manager reject https://github.com

【讨论】:

  • 你指的是 Git 2.9.2 => GCM 1.5.0。然后,我的版本必须不同。感谢您的提示。
猜你喜欢
  • 2019-09-09
  • 2023-03-09
  • 2017-08-30
  • 2012-11-04
  • 2019-03-09
  • 1970-01-01
  • 2023-03-18
  • 2021-07-20
  • 2023-03-12
相关资源
最近更新 更多