87

After I ran pod install, I got a warning that said:

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via pod repo remove master.

To suppress this warning please add warn_for_unused_master_specs_repo => false to your Podfile.

Why did I get this warning? Previously, I was able to ran pod install without any warnings.

Here's another detail if that's helpful: I wasn't able to use sudo gem install to install/upgrade CocoaPods, so I used this command instead:

sudo gem install -n /usr/local/bin cocoapods
Paulo Mattos
  • 18,845
  • 10
  • 77
  • 85
fdvfarzin
  • 1,107
  • 1
  • 4
  • 14
  • 1
    I am also having this issue. Is it a good to to what the accepted answer says? In my mind it sounds like a bad idea to remove a repo called 'master'... – instanceof May 06 '21 at 08:00

7 Answers7

163

When running the 'pod repo remove master' I was greeted with:

[!] repo master does not exist

I did a ....

pod repo list

cocoapods
- Type: git (master)
- URL:  https://github.com/CocoaPods/Specs.git
- Path: /Users/plasma/.cocoapods/repos/cocoapods

trunk
- Type: CDN
- URL:  https://cdn.cocoapods.org/
- Path: /Users/plasma/.cocoapods/repos/trunk

Noticed the 'master' is actually called 'cocoapods' so then I did a..

pod repo remove cocoapods

One that had completed I was able to do update and install without any errors.

Plasma
  • 2,622
  • 2
  • 20
  • 35
33

Run the command pod repo remove master

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • 57
    This results in the following output: ` [!] repo master does not exist` – edelaney05 Dec 23 '20 at 16:06
  • 6
    It has relation to this change which removes git repo and makes trunk default repository https://github.com/CocoaPods/CocoaPods/pull/8923 I have solved the problem by listing repos 'pod repo list' and then removing master 'pod repo remove' leaving only trunk – Henadzi Rabkin Jan 27 '21 at 14:54
  • 22
    For me `pod repo remove cocoapods` – Leo Jun 19 '21 at 20:18
  • For me this worked too not the - pod repo remove cocoapods – Shay Elbaz May 12 '22 at 13:50
19

You should now use the CocoaPods CDN as the default source:

source 'https://cdn.cocoapods.org/'

and if so, you can safely delete the master repo from your machine, with the suggested command pod repo remove master.

Original Answer

I resolved this warning by adding a source to the top of my Podfile:

source 'https://github.com/CocoaPods/Specs.git'
Ric Santos
  • 15,419
  • 6
  • 50
  • 75
13

If you have the error:

[!] repo master does not exist

It's will work if you try this:

pod repo remove cocoapods

Don't worry it's will not remove your pods :)

Yunus T.
  • 569
  • 7
  • 13
12

I would recommend following Plasma's answer. However, if you don't want to delete the master repo, just mute the warning by adding the warn_for_unused_master_specs_repo setting to your Podfile by changing this:

install! 'cocoapods'

to this:

install! 'cocoapods', :warn_for_unused_master_specs_repo => false

If you already have an option after install! 'cocoapods', append the new setting with a comma:

install! 'cocoapods', :deterministic_uuids => false, :warn_for_unused_master_specs_repo => false
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
4

It has relation to this change which removes git repo and makes trunk default repository I have solved the problem by listing repos pod repo list and then removing master using the command pod repo remove leaving only trunk

Henadzi Rabkin
  • 6,834
  • 3
  • 32
  • 39
2
# pod version > 1.7.2
# Step 1
pod repo list

# pod repo list result:
# cocoapods
# - Type: git (remotes/origin/master)
# - URL:  https://github.com/CocoaPods/Specs.git
# - Path: /Users/apple/.cocoapods/repos/cocoapods

# trunk
# - Type: CDN
# - URL:  https://cdn.cocoapods.org/
# - Path: /Users/apple/.cocoapods/repos/trunk

# Step 2
pod repo remove cocoapods

# result
# Removing spec repo `cocoapods`

It's working for me.

water_ak47
  • 1,174
  • 12
  • 9