git 如何重置git身份验证?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/51581582/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:20:03  来源:igfitidea点击:

How to reset git authentication?

gitgitlab

提问by MyBug18

I typed wrong ID (my mistake) and I think my computer's IP is permanently banned. I'd like to un-ban my IP so that I can git clone to my desired git repository. when I tried to git clone my git repository, it says remote: HTTP Basic: Access deniedfatal: Authentication failed for "~~my repository"

我输入了错误的 ID(我的错误)并且我认为我的计算机的 IP 被永久禁止。我想取消禁止我的 IP,以便我可以 git clone 到我想要的 git 存储库。当我尝试 git clone 我的 git 存储库时,它说 remote: HTTP Basic: Access deniedfatal: Authentication failed for "~~my repository"

How can I re-access my git repository? Or how can I reset my banned-state? I think typing wrong ID only once and be permanently banned is somewhat harsh.

如何重新访问我的 git 存储库?或者我怎样才能重置我的禁止状态?我认为只输入一次错误的 ID 并被永久禁止有点苛刻。

回答by ikh

It seems that your credential manager stored wrong authentication and reuses it. Reset it.

您的凭据管理器似乎存储了错误的身份验证并重用了它。重置它。

git config --system --unset credential.helper

More information:

更多信息:

Remove credentials from Git

从 Git 中删除凭据

GitLab remote: HTTP Basic: Access denied and fatal Authentication

GitLab 远程:HTTP Basic:拒绝访问和致命身份验证