我完全遵循了these instructions,包括关于密码缓存的部分。看起来指令是错的,因为每次我git push origin master的时候都会得到这样的错误:
git: 'credential-cache' is not a git command. See 'get --help'...。在这一点上我被迫输入我的用户名和密码。这样做之后,我再次看到相同的错误消息,后面是来自git push的输出。
下面是我的.gitconfig文件的内容:
[user]
name = myusername
email = myusername@myemaildomain.com
[credential]
helper = cache需要说明的是,在我安装了Git并运行了Git Bash之后,下面是我输入的内容:
git config --global user.name "myusername"
git config --global user.email "myusername@myemaildomain.com"
git config --global credential.helper cache请帮帮忙。这太让人沮丧了!
发布于 2012-08-10 02:06:20
来自a blog I found
这种git-credential-cache不适用于Windows系统,因为git-credential-cache通过Unix套接字进行通信。
适用于的Git
由于msysgit已经被Git for Windows取代,现在使用Git for Windows是最简单的选择。某些版本的Git for Windows installer (如2.7.4)在安装期间有一个复选框,用于启用Git凭据管理器。截图如下:

还在使用msysgit吗?对于msysgit版本1.8.1及更高版本的
wincred帮助器是在msysgit1.8.1中添加的。使用方法如下:
git config --global credential.helper wincred用于1.8.1之前的msysgit版本的
首先,下载git-credential-winstore并将其安装在git bin目录中。
接下来,确保包含git.cmd的目录在Path环境变量中。默认目录为C:\Program Files (x86)\Git\cmd (在64位系统上)或C:\Program Files\Git\cmd (在32位系统上)。测试这一点的一种简单方法是启动命令提示符,然后输入git。如果你没有得到git命令的列表,那么它的设置就不正确。
最后,启动命令提示符并键入:
git config --global credential.helper winstore或者,您可以手动编辑.gitconfig文件:
[credential]
helper = winstore完成此操作后,您可以通过Windows凭据管理器管理您的git凭据,您可以通过Windows控制面板启动该管理器。
发布于 2014-03-08 19:12:36
看起来git现在在Windows上自带了开箱即用的wincred:
git config --global credential.helper wincred参考:https://github.com/msysgit/git/commit/e2770979fec968a25ac21e34f9082bc17a71a780
发布于 2015-12-31 11:18:22
首先运行git config --global credential.helper wincred
然后转到:CONTROL PANEL\CREDENTIAL MANAGER\WINDOWS CREDENTIAL\GENERIC CREDENTIAL
然后单击add a credential in Internet or network address: add git:https://{username}.github.com (在用户名中添加凭据添加用户名}用户名
名称{ User: }
密码{ Password: }
https://stackoverflow.com/questions/11693074
复制相似问题