Git - 如何更改凭据 [远程:HTTP 基本:访问被拒绝致命:身份验证失败]
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50526496/
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
Git - How to change credential [remote: HTTP Basic: Access denied fatal: Authentication failed for]
提问by DataCube
When installing my Git repository (GitKraken with GitLab), I entered the wrong password. So Git returns this error:
在安装我的 Git 存储库(带有 GitLab 的 GitKraken)时,我输入了错误的密码。所以 Git 返回这个错误:
"remote: HTTP Basic: Access denied
fatal: Authentication failed for'https://gitlab.com/mygitproject/'"
It's not offering the option to retype my password. So I'm stuck....
它不提供重新输入密码的选项。所以我被卡住了......
回答by Tambu Tangban
I recently had the same problem on Windows. My credentials was recently been updated in Active Directory. Git bash stores credentials in the Windows Vault using Generic Credentials in the 'Control Panel > User Accounts > Credential Manager'. After updating my password to match the current value I was able to 'git push'.
我最近在 Windows 上遇到了同样的问题。我的凭据最近在 Active Directory 中更新。Git bash 使用“控制面板 > 用户帐户 > 凭据管理器”中的通用凭据将凭据存储在 Windows Vault 中。更新我的密码以匹配当前值后,我能够“git push”。
回答by Marko Letic
回答by Vikash Pandey
In my case my password was expired and it was not allowing me to enter my new password-
就我而言,我的密码已过期,不允许我输入新密码-
Below is the command I need to run to fix this issue:-
以下是我需要运行以解决此问题的命令:-
git config --global credential.helper wincred
After running above command it asks me again my updated usernameand password.
运行上述命令后,它再次询问我更新的用户名和密码。
Here is the source for more details.