1. 程式人生 > >Git pull、push 免賬號密碼輸入

Git pull、push 免賬號密碼輸入

先進入你的系統使用者目錄,例如 C:\users\Administrator

  • 建立檔案,命名為 _netrc,並編輯
machine {git account name}.github.com
login your-usernmae
password your-password
  • 開啟 git,執行一次pull 或者 push 輸入賬號、密碼;這時候會在 _netrc 的同級目錄生成一個
    .git-credentials 檔案
  • 在 git 上進入 _netrc 所在目錄,執行 git config - -global credential.helper store 這時候回在 .gitconfig
    多出一項
[credential]
helper = store

參考部落格1
參考部落格2