pod update时报错CocoaPods was not able to update the `cocoapods` repo

789 阅读1分钟

更新三方库执行pod update时报错[!] CocoaPods was not able to update the cocoapods repo. If this is an unexpected issue and persists you can inspect it running pod repo update --verbose
因为在网上没有搜到报这个错的解决方案,自己解决了就打算发出来权当记录了。
解决办法:
执行:pod repo list

看到有两个repo
cocoapods

master

执行:pod repo remove cocoapods 把不用的repo删除

删除成功后在执行:pod update 就好了