原文出處:CocoaPods換源
CocoaPods 鏡像使用幫助 CocoaPods 是一個 Cocoa 和 Cocoa Touch 框架的依賴管理器,具體原理和 Homebrew 有點類似,都是從 GitHub 下載索引,然后根據索引下載依賴的源代碼。 對於舊版的 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'
清華源:https://mirrors.tuna.tsinghua.edu.cn/help/CocoaPods/
方法二:CocoaPods安裝倉庫_報錯_大文件轉SSH傳輸方式