GIT每次都要輸入使用者名稱和密碼的解決方案

2022-03-18 22:09:21 字數 644 閱讀 1450

長期儲存密碼:

git config --global credential.helper store

快取使用者資訊 3600s 

zb@zb-computer:/home/wwwroot/default/tqmp/sheep$ git config -ll

獲取所有git config資訊;

在某個git專案中可以單獨配置該項目的使用者名稱和密碼

.git/config

[user]

name = master_zhu

email = [email protected]

git config –global credential.helper 『cache –timeout 36000』      

//  這我輸入了2個 —   也配置好了, global前面的'-' 複製過來的 就乙個-  ,注意是用'  ',而不是``

//timeout  前面不輸入-,也可以,有時候有了反而會報錯;

//單獨的專案,可以把 --global給去掉;

git config –global user.name 「your name」

git config –global user.email [email protected]

git不用每次輸入使用者名稱和密碼

使用git pull或者git push每次都需要輸入使用者名稱和密碼很不人性化,耽誤時間,現在教大家一條命令實現儲存使用者名稱和密碼不用再輸入 git config global credential.helper store git pull git push 這裡需要輸入使用者名稱和密碼,以後...

Git git pull每次都要求輸入使用者名稱和密碼

git pull 每次都要求輸入使用者名稱和密碼 全域性配置 git config global credential.helper store或者區域性配置 git config credential.helper store檢視git配置 git config list如果有多個賬號,可能會出現...

git儲存使用者名稱和密碼,避免每次輸入

1 當前電腦環境 git版本號 git version 2.13.2.windows.1 系統環境 win10 2 配置方法 1 開啟系統盤當前使用者的目錄 c users administrator 如果你配置了個人使用者名稱,就是c users 當前使用者名稱 2 在當前位置,開啟 gitbas...