linux下面可以直接創建.git-credential文件,命令如下:
創建文件,進入文件,輸入內容:
cd ~ touch .git-credentials vim .git-credentials https://{username}:{password}@github.com
在終端下輸入:
git config --global credential.helper store
打開~/.gitconfig文件,會發現多了一項:
[credential] helper = store
注:設置好后第一次執行需要輸入,以后就不需要了