git pull 配置免密_git pull设置为无需密码
https方式每次都要輸入密碼,按照如下設置即可輸入一次就不用再手輸入密碼的困擾而且又享受https帶來的極速
設置記住密碼(默認15分鐘):
git?config?--global?credential.helper?cache
如果想自己設置時間,可以這樣做:
git?config?credential.helper?'cache?--timeout=3600'
這樣就設置一個小時之后失效
長期存儲密碼(linux下):
#su git
$cd ~
$touch .git-credentials
$vi .git-credentials
輸入如下內容
保存
$git config --global credential.helper store
現在進入
$cd /www/sitename
$git pull
已經不需要密碼了
增加遠程地址的時候帶上密碼也是可以的。(推薦)
補充:使用客戶端也可以存儲密碼的。
如果你正在使用ssh而且想體驗https帶來的高速,那么你可以這樣做: 切換到項目目錄下 :
cd?projectfile/
移除遠程ssh方式的倉庫地址
git?remote?rm?origin
增加https遠程倉庫地址
git?remote?add?origin?http://yourname:password@git.oschina.net/name/project.git
原文:https://blog.csdn.net/e62ces0iem/article/details/73550869
如果是碼云之類的管理平臺,可以通過添加公鑰的方法。然后
git clone -b invest git@gitee.com:Wei303/bbtuu.git
總結
以上是生活随笔為你收集整理的git pull 配置免密_git pull设置为无需密码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 发帖机python_如何用python写
- 下一篇: 为客户万科做的sofun搜房网论坛专用顶