Linux和 Mac下git pull/push 免输入密码和账号


linux下面可以直接创建.git-credential文件,命令如下:

创建文件,进入文件,输入内容:

cd ~ touch .git-credentials vim .git-credentials https://{username}:{password}@github.com

在终端下输入:

git config --global credential.helper store

打开~/.gitconfig文件,会发现多了一项:

[credential] helper = store

注:设置好后第一次执行需要输入,以后就不需要了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM