git push 总是要输入账号密码解决办法

1、先cd到根目录,执行git config –global credential.helper store命令

root@iZwz90a11x50xdx5dle0wgZ:~# git config --global credential.helper store

2、执行之后打开 .gitconfig 文件可以看到

[user]
        name = XXXXXXX
        email = [email protected]
[credential]
        helper = store

3、重新push 提交 输入用户名密码。
4、下次就可以直接提交了

猜你喜欢

转载自blog.csdn.net/qq_16142851/article/details/78677126