我们在push代码的时候有时候可能会碰见每次push都需要输入登录用户的账号和密码,下面我写一下我的解决办法,希望对大家有用
取消弹出登录页面
首先我们在push后,有可能跳出登录页面
我们在git上输入
git config --system --unset credential.helper
或者
$ git config --global --unset credential.helper
如果不行,那么我们执行
$ git config --list
看 credential.helper=manager
是否存在,如果存在,那么可能执行到全局命令中了,如果存在,那么执行
git config --global --unset credential.helper
将其清除掉
取消登录SSH username和 password
在取消了登录账号密码后,还会跳出输入密码的问题
我们执行下面命令
git config --global credential.helper store
这个会在输入完一次密码之后进行缓存,在下次登录的时候就不在需要登录账号密码了