方法一:設(shè)置git緩存密碼
打開(kāi)credential helper以便Git在一段時(shí)間內(nèi)緩存你的賬號(hào)密碼:
$ git config --global credential.helper cache
默認(rèn)保存15分鐘
更改保存時(shí)長(zhǎng)(秒):
$ git config --global credential.helper 'cache --timeout=3600'
參考:Caching your GitHub password in Git
方法二:走 SSH 協(xié)議,配 key。
Connecting to GitHub with SSH
教程很詳細(xì)支鸡,一步步來(lái)就好了。
注意:clone倉(cāng)庫(kù)的時(shí)候使用ssh地址贱田,不要用https