Сocoapods trunk URL couldn't be downloaded

I am getting this error when I try to pod repo update and pod install

CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/deprecated_podspecs.txt, error: Failed to open TCP connection to cdn.cocoapods.org:443 (No route to host - connect(2) for "cdn.cocoapods.org" port 443)

Does somebody know how to fix this problem?

77767 次浏览

Also try to pod cache clean --all and pod setup by @NightWatcher

Step three. Run pod update. Solve my problem.

pod update --verbose
your Podfile:

source 'https://cocoapods-cdn.netlify.app/'
  • pod install or pod update

  • For those, who faced with the following:

    Too Many Requests

    [!] CDN: trunk Repo update failed - 1 error(s):

    You should remove Podfile.lock, Pod folder and reconnect to your VPN (if any) then run

    CDN: trunk URL couldn't be downloaded: https://...podspec.json Response: 429 429: Too Many Requests

    pod install --repo-update

    You should remove Podfile.lock, Pod folder and reconnect to your VPN (if any) then run

    I spend hours by uninstalling and reinstalling pods, Connecting and disconnecting wifi, and trying out different solutions I could find from the internet. And nothing worked. Finally I decided to restart my Macbook and the problem solved. So before trying the solutions given above, I would strongly recommend you to try restarting your system.

    Step one. Remove trunk & master

    pod repo remove trunk
    pod repo remove master
    

    Step two. Add source in podfile.

    source 'https://github.com/CocoaPods/Specs.git'
    source 'https://cdn.cocoapods.org/'
    

    On all of those comments; nothing worked for me

    Step three. Run pod update. Solve my problem.

    pod update --verbose
    
    So i found this and it worked perfectly for me :

    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!

    pod setup

    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/'
    
    pod deintegrate

    Faced the same issue and tried all the answers suggested above. But, the real issue seemed to be with not being able to access the Git repo for Cocoapods: pod cache clean --all sudo gem uninstall cocoapods ‘error: cannot open .git/FETCH_HEAD: Permission denied

    sudo gem install cocoapods pod install or pod update

    Executing sudo chown -R $USER: .

    Remove Podfile.lock and try re-installing the Pods again (pod install). This worked for me.

    pod install --repo-update

    pod cache clean --all

    pod setup

    804f089deba

    Or to relaunch the plan with the following option -lock=false

    terraform plan -lock=false ...
    

    (where the numerical id should be replace by the one mentioned in the error message)

    If terraform force-unlock is giving below error:

    if you are not sure if there is another process running and you are worried that you might make things worse, I would recommend waiting for some time (like 1h), try again, then try again after maybe 30 min. If the error still persists it is likely that there really is no other process and it's safe to unlock as described above

    "Local state cannot be unlocked by another process"

    i have tried all above options but nothing fixed my issue. i just switched my internet connection to other service provider and then try pod install and trunk url issue was no more there. so try to switch internet connection if facing trunk url issue.

    then

    I had the same issue. I followed below steps and it works.

    open the running process and kill the process to remove the lock.

    I suggest to restart the system before following below instructions.

    for Windows: open task manager and search for terraform console process

    Delete Podfile.lock For Linux: grep for terraform process and kill the terraform console process using kill -9

    add source 'https://github.com/CocoaPods/Specs.git' line in Podfile

    ocoapods-clean

    Then run below commands

    pod repo remove trunk
    sudo gem install cocoapods-deintegrate cocoapods-clean
    pod deintegrate
    pod cache clean --all
    sudo gem uninstall cocoapods
    sudo gem install cocoapods
    pod install or pod update
    
    /Users/user_name/.cocoapods/repos/cocoapods fixed the issue

    Even I had the same issue and tried with different command ess_id>