【问题标题】:Git doesn't allow me to enter my password for cloning since I got it wrong the first timeGit不允许我输入我的克隆密码,因为我第一次弄错了
【发布时间】:2019-09-09 09:07:08
【问题描述】:

我运行了一次命令,弹出一个窗口说我需要输入我的用户名和密码,然后我没有输入正确的,现在输入用户名和密码的窗口不显示向上

C:\Users\User\Desktop>git clone https://gitlab.com/group/project.git
Cloning into 'project'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/group/project.git/'

有什么方法可以让我重做这个,这样我就可以输入用户名和 再次输入密码?

【问题讨论】:

  • 尝试git clone https://username@gitlab.com/group/project.git 看看是否要求输入密码。如果没有,请尝试git clone https://username:password@gitlab.com/group/project.git
  • 看来您需要重置Windows Git Credential ManagerThis回答可能对你有帮助

标签: git git-clone


【解决方案1】:

作为我mention here,使用最近的 Git,尝试:

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

这应该重置缓存的凭据,并且下一个克隆应该再次请求它们。

如果该命令不可用,请使用简化的 PATH 重试:

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

【讨论】:

    猜你喜欢
    • 2020-01-21
    • 2014-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-08
    相关资源
    最近更新 更多