I am getting this error when I try to pod repo update
and pod install
CDN: trunk URL couldn\'t be downloaded: https://cdn.cocoa
Tried many solutions from here and there but what worked in my case is:
gem uninstall cocoapods
gem cleanup
sudo gem install cocoapods -n /usr/local/bin
Hope it works for you!
I got it working by using below commands:
pod repo remove trunk
and then
pod install
I fixed it by this solution Add this to your Podfile:
source 'https://cdn.cocoapods.org/'
Afterwards, run the following command to remove it from your managed repo list (in console):
pod repo remove master
Cheers!
Based on this github comment: whenever cocoapods CDN not working due to DNS issues, try adding directly the url that cdn.cocoapods.org redirects to, as a source in the top level of your Podfile
:
source 'https://cocoapods-cdn.netlify.app/'
It seems that it's a cdn problem because when i use proxy the link https://cdn.cocoapods.org/all_pods_versions_e_2_1.txt is opened and when not it return error.
What i did:
gem uninstall cocoapods
gem cleanup
rvm osx-ssl-certs update all
That didn't help.
Then i went to Chrome and opened https://cdn.cocoapods.org/all_pods_versions_e_2_1.txt it was an error. Then i cleared cache but it didn't help. After switching to proxy and returning back it started to work.
Resume: Turn on and switch off the VPN.
Faced that problem many times, especially in outside WI-FI spots. Turn on VPN and your problem will be solved.