在~/下负蠕, touch創(chuàng)建文件 .git-credentials, 用vim編輯此文件膀息,輸入內(nèi)容格式:
ame@zhenyun~ $touch .git-credentials
ame@zhenyun~ $vim .git-credentials
在里面按“i”然后輸入:https://{username}:{password}@github.com
比如 https://aoeddklj:1233ds@github.com
2. 在終端下執(zhí)行
ame@zhenyun~ $git config --global credential.helper store
3. 可以看到~/.gitconfig文件哲思,會多了一項(xiàng):
[credential]
helper = store
這個時候輸入命令git clone http://username@url 時不需要輸入密碼,即可完成代碼的git