美文网首页
更换pod repo的源

更换pod repo的源

作者: 片片碎 | 来源:发表于2020-04-22 23:11 被阅读0次

    1、查看之前的源

    pod repo
    
    https:
    - Type: file system
    - URL:  
    - Path: /Users/Feng/.cocoapods/repos/https:
    trunk
    - Type: CDN
    - URL:  https://cdn.cocoapods.org/
    - Path: /Users/Feng/.cocoapods/repos/trunk
    
    

    2、删除源

    //默认的是trunk源是CDN "https://cdn.cocoapods.org/"
    //执行删除
    pod repo remove trunk
    

    3、增加新源

    //默认的是trunk源是CDN "https://cdn.cocoapods.org/"
    //执行删除
    pod repo add  master  https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
    pod clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
    pod repo update --verbose
    

    3、报错解决

    错误一
    RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
    错误二
    error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
    
    
    解决方案
    sudo vim /private/etc/hosts
    
    然后把下面这段ip-域名映射信息复制进去:
    151.101.185.194 github.global.ssl.fastly.net
    192.30.253.112 github.com
    151.101.184.133 assets-cdn.github.com
    151.101.184.133 avatars0.githubusercontent.com
    151.101.112.133 avatars1.githubusercontent.com
    
    

    相关文章

      网友评论

          本文标题:更换pod repo的源

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