1. 創(chuàng)建文件存儲GIT用戶名和密碼
在home目錄中,添加.git-credentials:
cd ~
vim .git-credentials
https://{username}:{password}@github.com
2. 添加Git Config 內(nèi)容
輸入如下命令:
git config --global credential.helper store
執(zhí)行完后查看.gitconfig文件,會多了一項:
[credential]
helper = store
git push時就不用再輸入用戶名和密碼