遇到的問題一:
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
這個錯誤是因為項目太久,tag資源文件太大
解決方式一, 網上大部分解決措施:命令終端輸入:
git config --global http.postBuffer 524288000
用上面的命令有的人可以解決,我的還不行,需要如下方式命令,只clone深度為一
$ git clone /your git address/large-repository --depth 1 $ cd large-repository $ git fetch --unshallow
解決方式二,一般clone http方式的容易產生此問題,改成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 目錄
並且相應的 share,git-core,templates 目錄都有,,說明是權限的問題.
在終端輸入:
sudo chmod -R 755 /usr/local/git/share/git-core/templates
注意 sudo 創建目錄需要輸入當前 Mac 用戶的密碼
最后重新 clone 項目
以上問題是我在Mac電腦用xcode自帶git、sourcetree、終端三個方式clone某個項目都不能成功克隆下來。
遇到的問題,其他項目都可以。
相關拓展博客地址:
http://www.jianshu.com/p/0e3421961db4
http://blog.csdn.net/h5q8n2e7/article/details/46919579
https://blog.csdn.net/IT_liuchengli/article/details/77040806