在webstrom的使用git时
每次进行将本地代码提交到远程的时候总会要求输入账号和密码: git push or git pull 而且会弹出以下界面:

输入账号和密码,明明是对的,却提示登陆失败: Logon failed, use ctrl+c to cancel basic credential prompt.
会弹出这个登陆框:是因为是执行过: git config --global credential.helper manager 这个指令。
你可以通过: git config --list 来查看:

1、使用 git config --system --unset credential.helper,或者 git config --global --unset credential.helper
解决了登陆框弹出的问题,接下来解决每次都要输入密码的问题:执行 git config --global credential.helper store / git config --system credential.helper store (这个指令执行后,会要求第一次输入密码,然后账号和密码会被缓存到.git-credentials文件中,后续就不用再输入账号密码了)
继续查看: git config --list

发现:manager那个也已经不存在了,变成了store,你查看下你的用户目录下是不是有个.git-credentials文件,同时存了你的账号和密码。
查看发现确实生成了相应的文件,存了账号和密码
$ cat ~/.git-credentials
如果出现下面这种错误:你可以把~/.git-credentials这个文件删除掉,重新输入一次密码就行了。
$ git push origin master remote: Invalid username or password.fatal: Authentication failed for |