git如何避免每次pull或者push的时候都要输入用户名和密码?

sudo git config --global credential.helper store
jiqing@Ubuntu:/home/wwwroot/default/5hao/sheep$ sudo git config --global credential.helper store
[sudo] jiqing 的密码: 
jiqing@Ubuntu:/home/wwwroot/default/5hao/sheep$ git pull origin 5hao
Username for 'https://git.coding.net': jiqing9006
Password for 'https://[email protected]': 
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 27 (delta 12), reused 0 (delta 0)
展开对象中: 100% (27/27), 完成.
来自 https://git.coding.net/sucry-integral/sheep
 * branch            5hao       -> FETCH_HEAD
   c506de7..cc7ec5d  5hao       -> origin/5hao
更新 c506de7..cc7ec5d
Fast-forward
 Api/Lib/Action/XcxAction.class.php |  2 ++
 Public/eSZelPmd9a.txt              |  1 +
 Wx/Lib/Action/TestAction.class.php | 13 +++++++++++++
 Wx/Tpl/Test/index.html             | 10 ++++++++++
 4 files changed, 26 insertions(+)
 create mode 100644 Public/eSZelPmd9a.txt
 create mode 100755 Wx/Lib/Action/TestAction.class.php
 create mode 100644 Wx/Tpl/Test/index.html
jiqing@Ubuntu:/home/wwwroot/default/5hao/sheep$ git pull origin 5hao
来自 https://git.coding.net/sucry-integral/sheep
 * branch            5hao       -> FETCH_HEAD
Already up-to-date.
jiqing@Ubuntu:/home/wwwroot/default/5hao/lion$ git add ./*
jiqing@Ubuntu:/home/wwwroot/default/5hao/lion$ git commit -m "测试"
位于分支 5hao
无文件要提交,干净的工作区
jiqing@Ubuntu:/home/wwwroot/default/5hao/lion$ git push origin 5hao
Username for 'http://106.14.59.204': jiqing
Password for 'http://[email protected]': 
Everything up-to-date
jiqing@Ubuntu:/home/wwwroot/default/5hao/lion$ git push origin 5hao
Everything up-to-date

猜你喜欢

转载自www.cnblogs.com/jiqing9006/p/8944345.html