github提交代码不用输入账号密码的解决方案

1.在命令行输入命令:

git config --global credential.helper store

这一步会在用户目录下的.gitconfig文件最后添加:

[credential]
    helper = store

2.push 代码push你的代码(git push), 这时会让你输入用户名和密码, 这一步输入的用户名密码会被记住, 下次再push代码时就不用输入用户名密码!这一步会在用户目录下生成文件.git-credential记录用户名密码的信息。

 

 

posted @ 2019-02-01 17:03  小旭的blog  阅读(849)  评论(0)    收藏  举报