git 设置存储用户名与密码

新工作,新环境,旧电脑,旧代码环境。

git是没有记录密码用户名的,于是乎只能自己设置,在命令行设置咋设置,代码如下。。

git config --global user.name "myusername"
git config --global user.email "myusername@myemaildomain.com"
git config --global credential.helper cache


但是最后一行 cache不是windows 下的,于是乎运行总是报错,
git: 'credential-cache' is not a git command. See 'get --help'.
对就它,老报这个问题,咋整,要用win下边的,

有人用:
git config --global credential.helper winstore

用这个解决问题了,我的还是不行。就试了下边这个

git config --global credential.helper wincred


这个就解决了。


最终是因为版本不对,命令才不同。。。。。吆,我去。。。还有这问题,所以建议大家多试试。


原文地址:https://www.cnblogs.com/qianshui/p/5514662.html