linux下面能够直接建立.git-credential文件,命令以下:linux
建立文件,进入文件,输入内容:git
cd ~ touch .git-credentials vim .git-credentials https://{username}:{password}@github.com
在终端下输入:github
git config --global credential.helper store
打开~/.gitconfig文件,会发现多了一项:vim
[credential] helper = store
注:设置好后第一次执行须要输入,之后就不须要了bash