git使用时一般会习惯设置用户名和密码顺便设置永久保存密码,于是在命令行设置咋设置,代码如下:
git config --global user.name "myusername"
git config --global user.email "[email protected]"
windows上下面这一行是不需要输入的,默认是windows给永久保存的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
然后就完美解决了
然后当保存了密码后又想修改密码或删除密码咋整,由于在Windows上git的密码是交给window进行管理的
需要进入“控制面板”--“用户账户” --“凭证管理,管理windows凭据” 点开后就会恍然大悟,有git:xxx的凭据,删除还是修改看自己意愿修改即可
![](https://img-blog.csdn.net/20180525100458465)
![](https://img-blog.csdn.net/20180525100517156)
|