这里介绍使用代理的方式加快github的访问速度
1.找到代理端口,比如我的是1080
pod install太慢 可以使用代理的方式
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.刷新本地环境

sudo killall -HUP mDNSResponder

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

5.取消代理的方式

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

或者进入到.gitconfig中去掉最下面两行
pod install太慢 可以使用代理的方式

[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'

相关文章:

  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案