cocoapods导入第三方库提示RPC failed curl 18 transfer

错误提示:

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

导致原因:

curl的postBuffer默认值太小,需要在终端重新配置这个值

解决方案:

1、将curl的postBuffer值配置为500M,具体值看项目需求,配置成功不会有提示,配置失败会有提示,终端输入命令:

git config —global http.postBuffer 524288000

2、查看配置,输入命令:

git config —list

终端会列出相关配置

credential.helper=osxkeychain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
user.name=ZBC-CWS
http.postbuffer=524288000
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=https://github.com/ZBC-CWS/cocoapodsTest.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

查看其中的http.postBuffer对应的值是否是设置的值,如果是,设置成功,否则,设置失败

3、重新执行pod相关命令,解决。

原文地址:https://www.cnblogs.com/zhanbaocheng/p/7503185.html