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

本文介绍了解决curl postBuffer值过小导致的错误,包括详细的错误提示、导致原因及解决方案。通过调整curl的postBuffer值,可以有效避免远程连接异常断开等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

错误提示:
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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值