Linux之解决每次git pull/git push都需输入密码设置

操作命令:

//执行这两条命令
cd / git config --global credential.helper store

执行完命令之后会在.gitconfig文件中多加红色字体

[user]
        name = your name
        email = your email
[credential]
        helper = store

使用:

  cd到项目目录,执行git pull,会提示输入账号密码。输完这一次以后git pull或git push就不在需要输入密码了(会在根目录生成一个 .git-credentials 文件)

 

over!!!

参考博客:https://www.cnblogs.com/orzlin/p/5613310.html

posted @ 2019-05-17 16:51  为牧  阅读(3541)  评论(0编辑  收藏  举报