解決使用cocoapod下載第三方文件下載不下來或者是下載速度很慢出現(xiàn)443時(shí)處理:
前往文件夾靶病,/private/etc 的目錄下训桶,找到hosts文件刪除所有關(guān)于GitHub.com 的文件
一些cocoapods相關(guān)的只是點(diǎn):
sudo gem uninstall cocoa pods
gem list --local | grep cocoapods
打開cocoapods位置
open ~/.cocoapods/repos/trunk
//查看pod源
pod repo list
pod repo remove trunk
克隆
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/trunk
卸載cocoapod
sudo gem uninstall cocoapods
// 安裝最新版cocoapods
sudo gem install cocoapods --pre
// 移除本地master
sudo rm -fr ~/.cocoapods/repos/master
// 移除本地緩存
sudo rm -fr ~/Library/Caches/CocoaPods/
// 重新setup,如果很慢可使用問題1的解決方法(git clone)
pod setup --verbose
// 移除trunk
pod repo remove trunk
官方的repo地址
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/trunk
rm -rf ~/.cocoapods
mkdir -p ~/.cocoapods/repos
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git(重點(diǎn)是你要能下載成功,使用手機(jī)熱點(diǎn),值得推薦)
安裝完之后不能用重新
sudo gem install -n /usr/local/bin cocoapods
然后關(guān)掉終端重新pod search
有沒有使用pod repo list查看源