zoukankan      html  css  js  c++  java
  • pod install --repo-update 超时或太慢的解决方案

    这里介绍使用代理的方式加快github的访问速度
    1.找到代理端口,比如我的是1080


    2.执行命令行

    git config --global http.proxy socks5://127.0.0.1:1080
    git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
    

    3.执行pod install 和 pod update速度都会变得很快

    4.取消代理的方式

    git config --global --unset http.proxy
    git config --global --unset http.https://github.com.proxy
    

    或者进入到.gitconfig中去掉最下面两行
    [http]

    	proxy = socks5://127.0.0.1:1080
    [http "https://github.com"]
    	proxy = socks5://127.0.0.1:1080
    

    使用国内代理

    $ cd ~/.cocoapods/repos 
    $ pod repo remove master
    $ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
    

    然后记得去自己项目podfile里把source换了

    source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

    注意:开启代理后记得测试下代理有没有起作用,可以访问google.com看能不能打开(可以打开代理日志,方便看到有没有反应)。

     
  • 相关阅读:
    cookie和session学习笔记
    Listener和Filter学习笔记
    [转载]mysql root密码忘了怎么办
    [转载]oracle连不上的各种现象
    Oauth入门学习
    XML学习笔录
    共享内存
    守护进程
    Linux系统调用与文件I/O(一)
    我的第一篇博客
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/14476567.html
Copyright © 2011-2022 走看看