Pod install is staying on "Setting up CocoaPods Master repo"
Asked Answered
P

21

261

I'm cloning a project from a git repo, but when I execute pod install the first line I see is "Setting up CocoaPods Master repo" and after that I can't see anything more, the console stops there.

I don't know what is happening. Anyone knows what's happening here? Why Does CocoaPods stop there?

Philbo answered 9/1, 2014 at 14:15 Comment(0)
A
282

You could try running in verbose mode:

pod install --verbose

That'll show you what cocoa pods are up to:

Setting up CocoaPods master repo

Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
  $ /usr/bin/git clone 'https://github.com/CocoaPods/Specs.git' master
  Cloning into 'master'...

(as suggested here)

For me the above step took quite a long time as the repo (Dec 2016) is now 1.1 GB

Assiduous answered 18/2, 2014 at 11:54 Comment(0)
W
205

pod install or pod setup fetches whole repo with history when you first time run it. You don't need that commit history.

pod setup
Ctrl +C
cd ~/.cocoapods/repos 
git clone --depth 1 https://github.com/CocoaPods/Specs.git master

It takes around 2 mins on decent network connection (4Mbps). master directory is around 519M big.

Worst answered 6/10, 2016 at 19:45 Comment(12)
Awesome, I used this to fix several weird issues I was having on pod update, like fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Just had to rm -rf ~/.cocoapods before executing the suggested commands.Galleon
This should be the accepted answer. Also one note, with a fresh MBP and Sierra installed, pod repo remove master didn't anything. I skipped to the next step and proceeded and it worked perfectlyDorr
Please mind that 'pod update' will still cause a full fetch. 'pod install' won't. Info: blog.cocoapods.org/Master-Spec-Repo-Rate-Limiting-Post-MortemChaker
Why cocoapods.org not mention this type of install? Stop wasting tons of developers hours!Asmara
Sugested an edit for 'pod repo remove master', as it did not work for me, nor some commenters above.Asarum
If you already have done this and run into a "out-of-date" issue, you should: 'cd ~/.cocoapods/repos/master', and then do: 'git pull'Kob
while i am doing pod init I got "LoadError - cannot load such file -- nanaimo" Error message. could you suggest any solution ?Rameau
After giving the last command it is showing this: fatal: destination path 'master' already exists and is not an empty directory.Paddy
@Paddy remove master directory before clone eg rm -rf ~/.cocoapods/repos/masterWorst
confirmed working July 2017. Remember to use --no-repo-updateJenna
I had to finish with cd PROJ_DIR; pod install --no-repo-updateTwister
1.4GB as of today LOLPanegyrize
U
54

Try this command to track its work.

while true; do
  du -sh ~/.cocoapods/
  sleep 3
done
Unlearn answered 11/8, 2015 at 9:5 Comment(3)
alternatively: watch du -sh ~/.cocoapodsTempt
Thanks for posting that. In the end my .cocoapods master directory ended up at 746mb. Took about 20 minutes, walk the dog, put the kettle on, or just take a nap :-)Decency
Much more useful than just --verbose. Time for a cup of tea!Galluses
G
46

The issue is that you haven't got command line tools installed, I believe. Try run in terminal:

sudo gem update --system

after that download command line tools from Apple just search for 'Command Line Tools' and download the right version for your OS. Once you install it run in terminal:

sudo gem install cocoapods
pod setup
Griffie answered 9/1, 2014 at 14:34 Comment(7)
Hi, I'm trying to install command line tools from Xcode but it doesn't appear there (I have mavericks) I also follow this steps #15372425 and now I could check that I have command line tools installed, but "Setting up Cocoapods Master repo" is still there when I execute "pod install" or "pod setup"Philbo
When you click the link from my post in the left-top corner in the search box type: command line tools and you have the version for maverick OS on the top.Griffie
Thanks for your help but that didn't work. I have command line tools installed and the message still appears and doesn't go forwardPhilbo
@Gabox Have you call sudo gem install cocoa pods and pod setup after you installed command line tools?Griffie
Yes I have called sudo gem install cocoapods. I solve the problem following this tutorial cocoafactory.com/blog/2013/02/01/… Thanks for your helpPhilbo
Your answer help me, you can edit your answer and put the previous link I put and I can accept your answerPhilbo
you can use this way to speed up :pod install --verbose --no-repo-updateAncon
M
21

May be this information will be helpful:

Official answer: http://blog.cocoapods.org/Master-Spec-Repo-Rate-Limiting-Post-Mortem/

As a result of this discussion https://github.com/CocoaPods/CocoaPods/issues/4989

Briefly: CocoaPods repository experiences a huge volume of fetches from GitHub and it was the problem. Changes have been available since version 1.0.0.beta.6.

Tips from this document:

If for whatever reason you cannot upgrade to version 1.0.0 just yet, you can perform the following steps to convert your clone of the Master spec-repo from a shallow to a full clone:

$ cd ~/.cocoapods/repos/master
$ git fetch --unshallow

My hack to first installation:

1. pod setup
2. Ctrl+C
After that I could find ~/.cocoapods/repos/ empty directory 
3. Download  https://github.com/CocoaPods/Specs/archive/master.zip
4. unpack it to ~/.cocoapods/repos/
5. Move to project folder
6. pod install --no-repo-update

Today it takes near 15 minutes

Minstrel answered 13/5, 2016 at 12:14 Comment(6)
I gotta commend Tina for this. This is the fastest way to solve this problem. I used it, and it's effective! lol. Posted December 1, 2016. :)Stupid
Just to be clear, when you said to unpack the folder, will it look like this : ~/.cocoapods/repos/spec-master/...Tesstessa
no, you should unzip it as ~/.cocoapods/repos/master (just rename) as recommend here github.com/CocoaPods/Specs/releasesMinstrel
am I suppose to copy the extracted files to ~/.cocoapods/repos/ directory OR am I suppose to copy to my xcode project's root directory?Firn
You should unpack files to ~/.cocoapods/repos/master directly. After that: call "pod install --no-repo-update" in project folderMinstrel
Instead of «5. Move to project folder» you could just git init in that place and git remote add origin https://github.com/CocoaPods/Specs.gitDegeneracy
A
16

When CocoaPods is doing that it is downloading the entire specs repo to ~/.cocoapods. This could take a while depending on your connection. I would try doing it explicitly first with pod setup

Alongshore answered 9/1, 2014 at 14:30 Comment(6)
Hi, I execute pod setup and the message "Setting up Cocoapods Master repo" is still there. How long could it take? I have the command line tools installedPhilbo
Shouldn't be that long, but I'd give it a few minutesAlongshore
Hi, it is still showing "setting up Cocoapods Master repo" and never go forwardPhilbo
Quoting masweb: "check ls -lta ~/.cocoapods/repos/master/.git/objects/pack/ its downloading temporary pack there".Kaleidoscope
Got to 50mb before I killed it. api.github.com/repos/cocoapods/cocoapods says the repo is only 42kJacks
Tip for my fellow obsessives, building on Final Contest above: run brew install watch then watch ls -lta ~/.cocoapods/repos/master/.git/objects/pack/ to monitor progress.Woolly
M
13

Nothing above worked for me, so this is what worked:

pod setup
Ctrl +C
pod repo remove master
cd ~/.cocoapods/repos 
git clone https://github.com/CocoaPods/Specs master

Once completed it worked.

Cheers!

M answered 1/9, 2016 at 1:58 Comment(0)
B
9

What I tried and faster than clonning the repo:

  1. pod setup
  2. Ctrl +C after creating the master directory
  3. Download .zip from https://github.com/CocoaPods/Specs master
  4. Copy the content to ~/.cocoapods/repos
  5. pod install --no-repo-update in my project folder

After that I finally could see the pods being installed

Good luck!

EDIT: The zip size is 144 MB (Jul 6 2017)

Brussels answered 5/10, 2016 at 13:48 Comment(0)
C
9

I used the following 4 commands

cd ~/.cocoapods/repos
git clone "https://github.com/CocoaPods/Specs" master --depth 1
cd master
git fetch --unshallow
pod setup

I took time as expected, but at least I didn't have to stair at the screen wondering whats happening in the background.

Cognizance answered 17/12, 2016 at 6:51 Comment(0)
I
8

I have an alternative solution that I currently use. By changing the repository URL in Podfile to:

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

changes:

- source 'https://github.com/CocoaPods/Specs.git'
+ source 'https://cdn.cocoapods.org/'
Infeld answered 15/4, 2020 at 10:21 Comment(1)
what does this solution help with? pleaseSeize
R
6
pod setup --verbose 

I am running the above mentioned command right now but as mentioned by @Joe Blow, it shows absolutely no information on the progress.

But if you open the Activity Monitor on Mac (Task Manager on Windows?), under the 'Network' tab you will see a process named 'git-remote-https' and it shows the size of 'Received Bytes' increasing. After downloading about 300MB it stopped and then I could see further progress in the Terminal window.

Retort answered 18/7, 2016 at 9:53 Comment(3)
nice, thanks for sharing it. but it is weird that --verbose doesn't work for you...Philbo
actually it does print some info in the beginning but then theres a long wait involved when downloading that 300MB+ file... anyway hope it helped!Retort
the size has gone upto 482 MBElinoreeliot
C
5

This happens only once.

  • Master repo has +-1GB (November 2016).

  • To track the progress you can use activity monitor app and look for git-remote-https.

  • Next time it (pod setup or pod repo update) will only fast update all spec-repos in ~/.cocoapods/repos.

Chevalier answered 27/11, 2016 at 17:52 Comment(0)
F
4

You will have to remove the repo and re-setup it...

pod repo remove master
pod setup
Flashover answered 6/10, 2015 at 7:25 Comment(1)
that's not actually an error, just a lack of information... you just only need to add --verbose when you run the command to check what is happeningPhilbo
S
4

I'm monitoring the download progress by using

while true; 
do   
du -sh ~/.cocoapods/;   
sleep 3; 
done

the progress is very slow... and failed few times. But somehow after increasing the git buffer limit by using this command line git config --global http.postBuffer 2M The download speed is improving greatly and after downloading in total 347 Mb on ./cocoapods folder, the progress seems to stop and network activity is also stopping. but after waiting few minutes, turn out that cocoapod is verifying and extracting the repo and makes the total size up to 853 Mb.

notes: I'm doing it on 23 Oct 2016.

Somersault answered 23/10, 2016 at 3:33 Comment(0)
B
4

As of cocoapods 1.7.2 you can use the cdn instead of github. It's blazing fast and it won't hang. :) The cdn is default from cocopods 1.8.0 onwards.

To use the CDN source in your Podfile:

If you don't have private specs:

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

If you have private specs:

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

Doing this will break your Podfile.lock, so you are likely to need to run pod update to see the changes (be careful, this may update your Pods also).

If you have a CI setup, it is recommended to cache the new repo dir as it is very small and would save even more time. With 1.7.2 it should be located at ~/.cocoapods/repos/cocoapods- (yes, with a -), but we're looking to improve the naming in an upcoming release.

More info:

Bogosian answered 1/10, 2019 at 0:23 Comment(0)
E
1

I Faced same problem but it work for.I executed the Pod Install Command Before 3 Hour ago after that its updated what i want. You just need to Keep tracking the "Activity Monitor" You can see their "git remote https" or "Git" in disk tab. It will download around 330 Mb then it shows 1 GB and After some minutes it will starts installing. No need to Execute extra command.

Note : during downloading your MAC need to in continuously Active mode.If your system goes in sleep mode then CPU stop the process and you will get a error Like Add manually.

Elson answered 24/9, 2016 at 13:39 Comment(0)
L
1

None of the solutions above worked for me, I had to uninstall coacoapods, then installed a specific version before everything worked for me

sudo gem uninstall cocoapods

then

sudo gem install cocoapods -v 1.7.5

now even verbose shows progress

$ pod setup --verbose

Setting up CocoaPods master repo

Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
  $ /usr/bin/git clone https://github.com/CocoaPods/Specs.git --progress -- master
  Cloning into 'master'...
  remote: Enumerating objects: 295, done.        
  remote: Counting objects: 100% (295/295), done.        
  remote: Compressing objects: 100% (283/283), done.        
  Receiving objects:  20% (744493/3722462), 132.93 MiB | 567.00 KiB/s   
Litchi answered 26/12, 2019 at 2:0 Comment(0)
O
0

Just setup the master repo, was excited to see that we have a download progress, see screenshot ;)

CocoaPods release 1.2.0 (Jan 28) fixes this issue, thanks to all contributors and Danielle Tomlinson for this release.


enter image description here

Outlay answered 28/3, 2017 at 13:45 Comment(2)
300 megs is "fixed" ?? They need to look at NPM for some ideas.Euchology
@JaredChmielecki as the OP, I had the same issue with old CocoaPods version (during install massage always stays "Setting up CocoaPods Master repo") now we have a download progress so that we understand some download is in progress behind the scenes ;) I know the repo is getting huge, hope we get a fix about thisOutlay
H
0

Cocoa pods - reduce wait times to 10% ( on Mac OS ) :

1- type pod setup in your project folder ( first you have to be in the project folder) from terminal in Mac OS.

2- CTRL+z to stop after it creates master directory ( folder ) [you can see it in your cocoa pods folder location : ~/.cocoapods/repos]

  1. Download .zip from 

    https://github.com/CocoaPods/Specs

     master branch ( its 301 MB) , Extract it . It will take approx 5-10 mins

4.Copy the content to ~/.cocoapods/repos ( now here you only need to copy the contents inside the master folder , so make sure that master folder is created already with pod setup command )

5- once you copy it ( or I should say move , drag and drop as copying will take forever , as its very large ), you can then do pod install --no-repo-update 6- your pods in the pod file now will start installing Here is a screenshot enter image description here

Heel answered 11/6, 2019 at 16:49 Comment(0)
G
-1

pod setup works and should only take 10 mins on a solid connection. After that run: pod install --verbose and you should see all the comments you would normally see when running a dependancy manager.

Hope that helps

Greathearted answered 17/10, 2016 at 11:5 Comment(0)
T
-1

I had the same issue. I had solve it using the below command.

git clone `https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master`
Tutankhamen answered 11/1, 2023 at 16:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.