Skip to content

Instantly share code, notes, and snippets.

@july-12
Last active March 2, 2021 09:18
Show Gist options
  • Save july-12/ec86a26a5ddda5dee04554589745af85 to your computer and use it in GitHub Desktop.
Save july-12/ec86a26a5ddda5dee04554589745af85 to your computer and use it in GitHub Desktop.
参考 https://mirror.tuna.tsinghua.edu.cn/help/CocoaPods/
对于旧版的 CocoaPods 可以使用如下方法使用 tuna 的镜像:
```
$ pod repo remove master
$ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
$ pod repo update
```
新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是依然可以:
```
$ cd ~/.cocoapods/repos
$ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
```
最后进入自己的工程,在自己工程的podFile第一行加上:
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
可以加速git clone的镜像服务
https://g.ioiox.com/
git config --global url."https://gitclone.com/github.com/".insteadOf https://github.com/
Homebrew 安装,重新设置镜像地址
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment