Windows 上設置避免每次 git push 都需要賬號密碼
在 C:\Users\your name\ 目錄下找到到
.gitconfig這個文件,使用編輯器打開
[user]
name = ****
email = ********.com
文件中增加
[credential]配置
[credential]
helper = store
配置完成保存退出,在項目文件夾打開
git bash,使用git pull再輸入一次賬號密碼。最后一次使用git pull
$ git pull
Already up to date.
ok.
linux 上設置避免每次 git push 都需要賬號密碼
cd /進入根目錄,執行以下命令
git config --global credential.helper store
上述命令目的與
windows環境中直接編輯.gitconfig目的相同。
進入項目目錄,執行
git pull,按windows環境操作完成賬號密碼的錄入即可。
