Update cocoapods related issues

Error:
1, ERROR: SSL verification error at depth 0: certificate has expired (10) ERROR: Certificate /C=CN/ST=ZheJiang/L=HangZhou/O=Alibaba (China) Technology Co., Ltd./CN=*.taobao.org expired at 2018-12-05T03:16:02Z
reason: Taobao source certificate has expired, has been unable to use
solution:
<1> Remove Taobao Source: gem source --remove https://ruby.taobao.org(Note: If you are using Taobao source, or remove invalid, Step 3 to view the current source)
< 2> add a new source: gem sources -a https://gems.ruby-china.org/
<3> to see if the update was successful:gem sources -l


Related issues
1, if Step 2 Tip: Error fetching https://gems.ruby-china.org/: bad response Not Found 404
Reason: Due to the record result in the domain name, use gem sources -a https://gems.ruby-china.com/
2 ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
reasons: gem install cocoapodslead
instead:sudo gem install -n /usr/local/bin cocoapods


Other terminal command
to update cocopods Version: gem install cocoapods
View version:pod --version

Guess you like

Origin www.cnblogs.com/knightguang/p/11549205.html