1. 在~/下創(chuàng)建并編輯文件:
# cd ~/
# touch .git-credentials
# vim .git-credentials
2. 輸入內(nèi)容格式:
https://{username}:{password}@github.com
3. 執(zhí)行:
# git config --global credential.helper store
最后可以看到~/.gitconfig文件,會(huì)多了一項(xiàng):
[credential]
helper = store