cocopods更新失败解决

gem source -l

如果显示:
* CURRENT SOURCES *

https://ruby.taobao.org/
移除

sudo gem install cocoapods
ERROR: While executing gem … (OpenSSL::SSL::SSLError)
hostname “upyun.gems.ruby-china.org” does not match the server certificate

gem sources –remove https://ruby.taobao.org/

gem sources -a https://gems.ruby-china.org

sudo gem update –system

sudo gem install -n /usr/local/bin cocoapods –pre
pod –version
1.2.1
更新成功

你可能感兴趣的:(cocopods更新失败解决)