Cocoapods: 'fatal: repository 'https://cdn.cocoapods.org/' not found' v- 1.9.0

Created on 6 Mar 2020  路  20Comments  路  Source: CocoaPods/CocoaPods

Using CocoaPods <= 1.9.0

Report

Cant run pod install because it was unable to add source named trunk

What did you do?

pod install

What did you expect to happen?

to install the pods.

What happened instead?

pod install --verbose :
Cloning spec repotrunkfromhttps://cdn.cocoapods.org/ $ C:/Program Files/Git/cmd/git.exe clone https://cdn.cocoapods.org/ -- trunk Cloning into 'trunk'... fatal: repository 'https://cdn.cocoapods.org/' not found [!] Unable to add a source with urlhttps://cdn.cocoapods.org/namedtrunk`.
(C:/Program Files/Git/cmd/git.exe clone https://cdn.cocoapods.org/ -- trunk

Cloning into 'trunk'...
fatal: repository 'https://cdn.cocoapods.org/' not found
)
You can try adding it manually in C:/Users/rodri/.cocoapods/repos or via pod repo add.
`

CocoaPods Environment

Stack

   CocoaPods : 1.9.0
        Ruby : ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
    RubyGems : 3.1.2
        Host : Unable to find an executable (No such file or directory - sw_vers)  ()
       Xcode : -version) ()
         Git : git version 2.25.1.windows.1
Ruby lib dir : C:/Ruby26-x64/lib
Repositories :

Installation Source

Executable Path: C:/Ruby26-x64/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0

Podfile

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'Klaus' do
  # Pods for Klaus
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  target 'KlausTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'Klaus-tvOS' do
  # Pods for Klaus-tvOS

  target 'Klaus-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

Project that demonstrates the issue

Dont have it yet

awaiting input

Most helpful comment

At last I got success install version 1.8
gem uninstall cocoapods
gem install cocoapods -v 1.8

So- this seems like a bug in 1.9.1

All 20 comments

this seems like its trying to clone the trunk repo as a git repo which is a mistake. Can you please output pod repo list and then remove all repos pod repo remove and try again?

this seems liek its trying to clone the trunk repo as a git repo which is a mistake. Can you please output pod repo list and then remove all repos pod repo remove and try again?

0 repos, cant remove the repos if they dont exist yet.

Not sure here, maybe update cocoapods-trunk gem version?

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:

I am having this same problem since updating to Catalina and have tried everything I can think of possible to resolve it after reading every possible comment online about this issue, I am hoping to reopen this.

I get this:

Cloning spec repo `trunk` from `https://cdn.cocoapods.org/`
  $ /usr/local/bin/git clone https://cdn.cocoapods.org/ -- trunk
  Cloning into 'trunk'...
  fatal: repository 'https://cdn.cocoapods.org/' not found
[!] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`.
(/usr/local/bin/git clone https://cdn.cocoapods.org/ -- trunk

Cloning into 'trunk'...
fatal: repository 'https://cdn.cocoapods.org/' not found
)
You can try adding it manually in `/Users/applem/.cocoapods/repos` or via `pod repo add`.

Try rm -rf ~/.cocoapods/repos and try again.

Check your Podfile source declarations too.

I have completely removed and reinstalled cocoapods to version 1.9.1 and even ruby, to 2.7.0.
In that process II removed ~/.cocoapods/repos
I can do a pod install if I set my podfile source to
`source 'https://github.com/CocoaPods/Specs.git'

but if I do this I get the error above:
`source 'https://cdn.cocoapods.org/'

This would be great if all I wanted to do was install pods, but I am trying to push a pod, ie pod trunk push [file].podspec and that is giving me an error also because I don't have the cdn set up.

I found a comment mentioning to try this- so I am running it. It appears to be doing something. fingers crossed

pod repo add-cdn trunk 'https://cdn.cocoapods.org'

ah- here is my problem:

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: SSL connect error

Any ideas on what could be up with that?

seems like a network issue hitting the CDN...not sure. Could always switch to the git based repo which is still available.

@dnkoutso I have a good network connection in general, but I have seen various ssl errors since updating to catalina so I think it is related.
Can you provide any info on how I can use the git repo and do a pod trunk push?

Use pod repo add to add the git based repo and then gem update cocoapods-trunk and potentially use the --synchronous flag https://github.com/CocoaPods/CocoaPods/issues/9497

I've done gem install cocoapods-trunk and pod update cocoapods-trunk

Pod repo add trunk https://cdn.cocoapods.org fails because it is looking for a git repo.

I think I am using the git repo you mentioned already by using ` source https://github.com/CocoaPods/Specs.git' in my pod file. That gives me a repo called cocoapods.

However if I do a pod trunk push, the first thing it does is try to connect the cdn, which fails with the same error above and blocks my push.

trying to add a new trunk repo from the git repo gives me an error:

pod repo add trunk https://github.com/CocoaPods/Specs.git
[!] Repo name `trunk` is reserved for CocoaPods' main spec repo accessed via CDN.

And if I try to copy the cocoapod repo into a directory called "trunk", it still tries to pull the cdn and errors with the ssl error above.

here is pod env

pod env
/Users/applem/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete

### Stack

CocoaPods : 1.9.1
Ruby : ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
RubyGems : 3.1.2
Host : Mac OS X 10.15.4 (19E287)
Xcode : 11.4.1 (11E503a)
Git : git version 2.15.0
Ruby lib dir : /Users/applem/.rvm/rubies/ruby-2.7.0/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

### Installation Source

Executable Path: /Users/applem/.rvm/rubies/ruby-2.7.0/bin/pod

### Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
```

I also cannot push my repo directly

pod repo push cocoapods SeaseAssist.podspec 
[!] To push to the CocoaPods master repo use the `pod trunk push` command.

If you are using a fork of the master repo for private purposes we recommend to migrate to a clean private repo. To disable this check remove the remote pointing to the CocoaPods master repo.
pod trunk push SeaseAssist.podspec 
Cloning spec repo `trunk` from `https://cdn.cocoapods.org/`
[!] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`.
You can try adding it manually in `/Users/applem/.cocoapods/repos` or via `pod repo add`.

At last I got success install version 1.8
gem uninstall cocoapods
gem install cocoapods -v 1.8

So- this seems like a bug in 1.9.1

At last I got success install version 1.8
gem uninstall cocoapods
gem install cocoapods -v 1.8

So- this seems like a bug in 1.9.1

I have the same problem, and rollback to v 1.8馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

k06a picture k06a  路  3Comments

steffendsommer picture steffendsommer  路  3Comments

intelliot picture intelliot  路  3Comments

gerchicov-bp picture gerchicov-bp  路  3Comments

iosdev-republicofapps picture iosdev-republicofapps  路  3Comments