git下载的项目,pod相关文件报错

1. 问题

最近在同事电脑上执行 pod install 会出现不响应的情况。

Cloning spec repo`cocoapods`from`https://github.com/CocoaPods/Specs.git`# 过了很久很久没反应[!]Unable to add a sourcewithurl`https://github.com/CocoaPods/Specs.git`named`cocoapods`.You cantryadding it manuallyin`/Users/xxx/.cocoapods/repos`or via`pod repo add`.

2. 解决方案

cd ~/.cocoapods/repos/

检查一下 master 文件夹是否存在,如果存在 master 文件夹,执行 pod repo remove master。不存在则跳过这一条命令。

pod repo remove master

接下来继续执行以下命令

pod setup

gitclone--depth1https://github.com/CocoaPods/Specs.git master

此时应该已经解决了。

3. 其他报错情况

如果执行第二步后仍有以下报错。(PS:我没实际遇到过,解决问题时找到别的帖子,顺手记录了下来)

error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedlyfatal: early EOFfatal: index-pack failed

执行以下命令

git config--globalhttp.postBuffer5242880004. 追踪远程分支

git remote set-branches origin '*'


转载:https://www.jianshu.com/p/db68dcf8e87f

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

相关阅读更多精彩内容

友情链接更多精彩内容