我目前正在通过HTTPS使用GitHub,并在Windows 7上安装了最新版本的Git(1.9.0)以及Git凭据帮助程序。
在设置环境时,我告诉git-credentials永久地记住我的用户名和密码。
我最近通过网站更新了我的GitHub密码,现在我不再能够推/拉/取等。
如何在Windows 7的git-credentials helper上更新我的密码?
我目前正在通过HTTPS使用GitHub,并在Windows 7上安装了最新版本的Git(1.9.0)以及Git凭据帮助程序。
在设置环境时,我告诉git-credentials永久地记住我的用户名和密码。
我最近通过网站更新了我的GitHub密码,现在我不再能够推/拉/取等。
如何在Windows 7的git-credentials helper上更新我的密码?
当前回答
Windows的工作解决方案:
控制面板>用户帐户>凭证管理器>通用凭证
其他回答
顺便说一句,我也遇到了同样的问题(我的老板也是,所以问题变得更严重了)。
即时的解决方案是删除或修复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获取时,我被告知我的用户名/密码组合无效。这是正确的,因为git-credential helper已经缓存了我的旧值。
然而,在重新启动我的终端/命令提示符后,我尝试了另一个git取回,这一次凭据助手提示我输入我的GitHub用户名和密码。
我怀疑最初失败的Git获取请求结合重新启动我的终端/命令提示符解决了这个问题。
我希望这个答案能在未来帮助到其他处于类似处境的人!
在安装git-credential-winstore的目录下cd即可。如果你不知道在哪里,在Git Bash中运行这个:
cat ~/.gitconfig
它应该打印如下内容:
[credential]
helper = !'C:\\ProgramFile\\GitCredStore\\git-credential-winstore.exe'
在本例中,存储库是C:\ProgramFile\GitCredStore。一旦你使用Git Bash或Windows命令进入这个文件夹,只需输入:
git-credential-winstore.exe erase
host=github.com
protocol=https
不要忘记在protocol=https后按两次Enter。
首先使用Git命令Git——version找到您正在使用的版本。如果您的版本比1.7.10更新,那么只需使用这个命令:
git config --global credential.helper wincred
然后进行git获取,然后提示密码更新。
现在,它不会在Git中多次提示输入密码。
如果你重置了你的密码,那么你会在git bash命令窗口中得到认证失败错误。(它不显示弹出窗口,你可以输入新密码)。
在git bash cmd窗口中输入以下命令:
$ git config --global credential.helper wincred
有时会弹出输入新密码的窗口 或者当您尝试执行$git克隆..命令时,有时会弹出窗口