linux下每次git clone不需輸入賬號密碼的方法


在~/下, touch創建文件 .git-credentials, 用vim編輯此文件,輸入內容格式:

ame@zhenyun ~ $touch .git-credentials

ame@zhenyun ~ $vim .git-credentials

在里面按“i”然后輸入:https://{username}:{password}@github.com

比如 https://aoeddklj:1233ds@github.com

2. 在終端下執行

ame@zhenyun ~ $git config --global credential.helper store

3. 可以看到~/.gitconfig文件,會多了一項:

[credential]

helper = store

這個時候輸入命令git clone http://username@url 時不需要輸入密碼,即可完成代碼的git


免責聲明!

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



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