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
- http://github-cloud.s3.amazonaws.com/
- github.com
- github.global.ssl.fastly.net
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
网友评论