美文网首页
git下载的项目,pod相关文件报错

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

作者: Hi小战士 | 来源:发表于2023-01-12 10:54 被阅读0次

    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

    相关文章

      网友评论

          本文标题:git下载的项目,pod相关文件报错

          本文链接:https://www.haomeiwen.com/subject/fktwcdtx.html