使用git的記憶密碼機制保存用戶名密碼
進入家目錄(cd ~)
執行 git clone [你的git代碼路徑] ,發現需要輸入密碼,ctrl + c 中斷
執行 touch .git-credentials 創建 .git-credentials 文件
執行 vim .git-credentials 編輯該文件
按 i 鍵進入編輯模式,輸入:http(s)://{你的用戶名}:{你的密碼}@你的git服務器地址 【注意選擇 https/http,去掉花括號】
按 ESC 輸入 :wq 保存並退出
執行 git config --global credential.helper store
cat ~/.gitconfig 發現多了一項:
[credential]
helper = store
說明已經配置好了,再次 git clone [你的git代碼路徑] 試試,不需要輸入密碼了