Linux和 Mac下git pull/push 免輸入密碼和賬號


linux下面可以直接創建.git-credential文件,命令如下:

創建文件,進入文件,輸入內容:

cd ~ touch .git-credentials vim .git-credentials https://{username}:{password}@github.com

在終端下輸入:

git config --global credential.helper store

打開~/.gitconfig文件,會發現多了一項:

[credential] helper = store

注:設置好后第一次執行需要輸入,以后就不需要了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM