在windows上缓存git 密码

缓存git密码 一搜索 大部分都是在linux上的 .

  git config --global credential.helper cache

但在windows上pull或者push会报如下错误:

git credential - 'cache store:: -c:line 1`:syntax error :  unexpected end of file

后来发现上述命令只能在linux上用,

 

From a blog I found:

"This [git-credential-cache] doesn’t work for Windows systems as git-credential-cache communicates through a Unix socket."

 

所以应该使用windows上特有的

git config --global credential.helper winstore

Or you can edit your .gitconfig file manually:

[credential]
    helper = winstore



copy from :http://stackoverflow.com/questions/11693074/git-credential-cache-is-not-a-git-command


#总结
想将密码保存一个小时

# 在windows上
git config --global credential.helper wincred
git config --global credential.helper 'wincred --timeout=3600'

# linux
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'





posted on 2016-12-13 21:28  MorePower  阅读(1201)  评论(0编辑  收藏  举报

导航