Git免登陸,不需重複輸入帳號和密碼

linux下html

在~/下, touch建立文件 .git-credentials:
touch .git-credentials

# 用vim編輯此文件,
vim .git-credentials

#輸入內容格式
https://username:password@github.com

2. 在終端下執行 linux

git config --global credential.helper store

 

 

能夠看到~/.gitconfig文件,會多了一項:
[credential]
    helper = store

更多:git

windows下: http://www.cnblogs.com/ballwql/p/3462104.htmlgithub

注意:vim

若是換了新的github帳號,必定記得修改~/git-credentials裏面的內容。windows

不然會出現沒有權限的錯誤提示,沒法push。spa

相關文章
相關標籤/搜索