pod 第三方库超时 443

2022-12-22  本文已影响0人  Gumball_a45f
方法一:把pod源更换成国内镜像源
// 移除现有的镜像
pod repo remove master
// 添加新镜像源
pod repo add master https://gitcafe.com/akuandev/Specs.git
pod repo update
pod setup

国内源有

https://gitcafe.com/akuandev/Specs.git
http://git.oschina.net/akuandev/Specs.git
https://git.coding.net/hging/Specs.git 
https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
方法二:增加git缓存大小
git config --global http.postBuffer 
方法三:映射github.com的IP地址

https://github.com.ipaddress.com/
查找出Github.com最新的IP地址为:140.82.114.4

打开终端,运行:
sudo vim /private/etc/hosts

编辑进去:

173.194.201.91  dl-ssl.google.com
64.233.177.101  groups.google.com
199.232.69.194  github.global.ssl.fastly.net
172.217.0.10    ajax.googleapis.com

保存退出,重新打开终端,再次输入 “ping github.com”, 即可ping 通。之后下载就不会出现卡住问题

上一篇 下一篇

猜你喜欢

热点阅读