Git doesn't allow me to enter my password for cloning since I got it wrong the first time

为君一笑 提交于 2019-12-23 03:40:32

问题


I ran the command once, and got a pop-up that said I needed to enter my username and password, I then did not enter the right one, and now the window to enter in the username and password doesn't show up

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/'

Is there some way for me to redo this, so that I can enter the username and password once again?


回答1:


As I mention here, with a recent Git, try:

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

That should reset the cached credentials, and the next clone should request them again.

If the command is not available, try again with a simplified 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%


来源:https://stackoverflow.com/questions/55756004/git-doesnt-allow-me-to-enter-my-password-for-cloning-since-i-got-it-wrong-the-f

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!