git clone fatal: The remote end hung up unexpectedly

  • git clone error
    随着项目的更新.git越来越大,最近在一台新的mac上clone项目时一直失败,出现The remote end hung up unexpectedly的异常, 此问题可能由网络原因引起。

下面是git clone error日志:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree clone https://alpface@github.com/alpface/alpface.git /Users/xiaoyuan/Destop/work/GitHub/alpface 
Cloning into '/Users/xiaoyuan/Destop/work/GitHub/alpface'...
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Completed with errors, see above
屏幕快照 2018-09-27 下午2.04.48.png

解决方法
配置git的最低速度和最低速度时间 单位 秒:

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999  
  • pod install error:
xiaoyuan:alpface xiaoyuan$ pod install
Analyzing dependencies
Downloading dependencies
Installing Alamofire (4.7.3)

[!] Error installing Alamofire
[!] /usr/bin/git clone https://github.com/Alamofire/Alamofire.git /var/folders/9n/2_q48v8j049bnt5m4k7c_4rh0000gq/T/d20180927-43344-18k5hqm --template= --single-branch --depth 1 --branch 4.7.3

Cloning into '/var/folders/9n/2_q48v8j049bnt5m4k7c_4rh0000gq/T/d20180927-43344-18k5hqm'...
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

原因:mac安装了多个xcode
解决方法:
打开终端输入以下,然后再重新pod install即可

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容