【发布时间】: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分钟左右就解决了这个问题。