我目前正在通过HTTPS使用GitHub,并在Windows 7上安装了最新版本的Git(1.9.0)以及Git凭据帮助程序。

在设置环境时,我告诉git-credentials永久地记住我的用户名和密码。

我最近通过网站更新了我的GitHub密码,现在我不再能够推/拉/取等。

如何在Windows 7的git-credentials helper上更新我的密码?


当前回答

如果你重置了你的密码,那么你会在git bash命令窗口中得到认证失败错误。(它不显示弹出窗口,你可以输入新密码)。

在git bash cmd窗口中输入以下命令:

$ git config --global credential.helper wincred

有时会弹出输入新密码的窗口 或者当您尝试执行$git克隆..命令时,有时会弹出窗口

其他回答

这些答案最终都不能解决我的Git证书问题。如果有人需要的话,这里是有效的方法(我在Windows 8.1上使用Git 1.9)。

要更新您的凭证,请转到控制面板→凭证管理器→通用凭证。找到与Git帐户相关的凭据,并编辑它们以使用更新后的密码。

参考:如何在Windows上更新Git凭据

注意,要使用Git的Windows凭据管理器,你需要像这样配置凭据助手:

git config --global credential.helper wincred

如果你有多个用于不同存储库的GitHub帐户,那么你应该配置凭据以使用完整的存储库路径(而不仅仅是域,这是默认的):

git config --global credential.useHttpPath true

Windows、Linux和MacOS下的命令行解决方案

如果你在GitHub服务器上更新了你的GitHub密码,在git第一次尝试获取/拉/推命令时,它会生成身份验证失败的消息。

再次执行相同的git fetch/pull/push命令,它会提示输入凭据(用户名和密码)。输入GitHub服务器的用户名和更新后的新密码即可登录。

即使我也有这个问题,我执行了上述步骤并完成了!!

如果您一直得到“致命:身份验证失败”https://......Git”,您无法更新密码。

$ git配置——全局凭证。辅助wincred Git克隆-b .. Git 弹出窗口将显示用户名和密码 输入新密码

顺便说一句,我也遇到了同样的问题(我的老板也是,所以问题变得更严重了)。

即时的解决方案是删除或修复Windows凭据管理器中的Git条目。你可能很难在你的本地化Windows版本中找到它,但幸运的是,你可以从旧的Windows + R运行对话框中用控件keymgr.dll或控件/name Microsoft启动它。CredentialManager(或rundll32.exe keymgr.dll, KRShowKeyMgr,如果你更喜欢经典的外观)。或者把它放在你同事的批处理文件中:cmdkey /delete:git:http://your.git.server.company.com。

在微软的Git凭据管理器中,这是一个已知的问题,可能最快在2019年初就会修复(所以不要屏住呼吸)。

Update (2020-09-30): GCM4W seems to be more or less abandoned (last release more than a year ago, only one commit to master since then named, I kid you not, "Recreate the scalable version of the GCM Logo"). But don't despair, with Microsoft now going Core, there is a shiny new project called GCM Core, which seems to handle password changes correctly. It can be installed standalone (should be activated automatically, otherwise activate e.g. with git config --system credential.helper manager-core) but is also included in the current Git for Windows 2.28.0. For more information about it, see this blog post.

如果你重置了你的密码,那么你会在git bash命令窗口中得到认证失败错误。(它不显示弹出窗口,你可以输入新密码)。

在git bash cmd窗口中输入以下命令:

$ git config --global credential.helper wincred

有时会弹出输入新密码的窗口 或者当您尝试执行$git克隆..命令时,有时会弹出窗口