遇到的問題一:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
這個(gè)錯(cuò)誤是因?yàn)轫?xiàng)目太久,tag資源文件太大
解決方式一, 網(wǎng)上大部分解決措施:命令終端輸入
git config --global http.postBuffer 524288000
用上面的命令有的人可以解決,我的還不行,需要如下方式命令,只clone深度為一
$ git clone /github_com/large-repository --depth 1
$ cd large-repository
$ git fetch --unshallow
中劃線處填入你的git倉(cāng)庫的地址。。。(我用的是http方式,不是ssh)
解決方式二,一般clone http方式的容易產(chǎn)生此問題,改成SSH的方式也有效,即https://改為git://
遇到的問題二:
warning: templates not found /usr/local/git/share/git-core/templates
在終端輸入
open /usr/local/
在打開的目錄中可以看到:
如果沒有 git 目錄
打開下面的地址,下載 git-osx 并安裝,
http://git-scm.com/download/mac
如果有 git 目錄
并且相應(yīng)的 share,git-core,templates 目錄都有,,說明是權(quán)限的問題.
在終端輸入:
sudo chmod -R 755 /usr/local/git/share/git-core/templates
注意 sudo 創(chuàng)建目錄需要輸入當(dāng)前 Mac 用戶的密碼
最后重新 clone 項(xiàng)目