cocoapods

gem sources -l

gem sources --remove https://rubygems.org/ 
gem sources --add https://gems.ruby-china.com/


source 'https://git.coding.net/hging/Specs.git'
// .cocoapods/repos/
git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master

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

go to https://www.ipaddress.com/
to check

then add them to hosts:

sudo vi /etc/hosts

as

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
192.30.253.112  github.com
52.216.109.27   github-cloud.s3.amazonaws.com
199.232.5.194   github.global.ssl.fastly.net
192.30.253.119  gist.github.com
185.199.108.153 assets-cdn.github.com
199.232.28.133  raw.githubusercontent.com
199.232.28.133  gist.githubusercontent.com
199.232.28.133  cloud.githubusercontent.com
199.232.28.133  camo.githubusercontent.com
199.232.28.133  avatars0.githubusercontent.com
199.232.28.133  avatars1.githubusercontent.com
199.232.28.133  avatars2.githubusercontent.com
199.232.28.133  avatars3.githubusercontent.com
199.232.28.133  avatars4.githubusercontent.com
199.232.28.133  avatars5.githubusercontent.com

then

$ sudo killall -HUP mDNSResponder
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容