在克隆高翔git上的项目时,遇到了一些问题
git clone https://github.com/jiajunhua/gaoxiang12-slambook
-
克隆git项目是出现错误RPC failed; result=18/56, http code=200kib/s
是因为git的curl的postBuffer默认值太小了
解决办法:git config --global http.postBuffer 524288000 -
如果还是失败 那可能是网速慢,执行下面两条命令
git config --global http.lowSpeedLimit 0 git config --global http.lowSpeedTime 999999
-
紧接着出现了could not resolve host: github.com错误提示
然后ping一下GitHub,看能不能建立连接ping github.com 然后发现接受的数据来自52.74.223.119 然后直接修改/etc/hosts文件,直接在底部添加52.74.223.119 github.com sudo vi /etc/hosts #编辑hosts文件 :wq退出编辑 这个我好像不太会编辑,换个方式 sudo gedit /etc/hosts #同样可以编辑,只不过文件是像win一样显示,vi则是将文件显示在终端上 之后再下载就没问题了