1. 程式人生 > >git push時總提示輸入使用者名稱和密碼

git push時總提示輸入使用者名稱和密碼

我用的是Windows7系統.

  1. C:\Users\yourUserName 下建立檔案 .git-credentials, 並在其中寫入以下內容: https://username:[email protected],
    比如 https://john:[email protected]
    儲存.
  2. GitBash執行 git config --global credential.helper store
  3. 然後可以在當前目錄中的 .gitconfig 檔案中看到如下內容:
[credential]
    helper = store