git config --system --unset credential.helper --更大范围 git config --system --unset credential.helper --当前本地 git config --local --unset credential.helper
执行上面 git 命令,每次都会问帐号及密码,通过下面命令行,不用在每次 pull / push 的时候都输入密码
git config credential.helper store
如果是 Windows 用户,还有一个方式,通常在 C:\Users\Administator 目录下,会有 .gitconfig
配置文件。修改配置:
[user] name = 用户名 email = 你的 git 邮箱帐号 [http] postBuffer = 524288000 [credential] helper = store