135
MacBook-Pro:~ skbc$ pod setup --verbose
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

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'...

Have gone through resources provided by Cocoapods website, SO and few video tutorials. Nothing happening even after waiting for a couple of hours, however still trying to figure out what may be the problem is?

I would very much appreciate your comments and suggestions.

13
  • When I got this it was due to proxy authentication failure. Try connecting via another network if possible. Commented Feb 10, 2014 at 16:14
  • @CGRasterMouse:thanks for the suggestion,i am not getting your point please tell me little bit more..i am struggling for last 3 day!!
    – sanjay
    Commented Feb 10, 2014 at 16:18
  • Cocoapods initialization took about an hour for me. In spite of --verbose, cloning step went silently. So I checked the size of ~/.cocoapods directory to ensure it was still cloning. The size has increased to ~100Mb in the end.
    – vokilam
    Commented Feb 13, 2014 at 10:53
  • 3
    @sanjay: what happens if you just do a git clone https://github.com/CocoaPods/Specs.git? Does that work or does it also fail? Commented Feb 13, 2014 at 11:13
  • @NicholasSmith: didn't tried..!!i just focused on the direction/steps provided by Cocoapods on there website.
    – sanjay
    Commented Feb 13, 2014 at 12:27

13 Answers 13

423

It is not stuck. I thought the same until I went to the "Activity Monitor" of the system and checked the "Network" tab.

Then you will see that something is being downloaded. A process called git-remote-http is in charge of this.

Screenshot 1

Just wait! It happened the same for me :)

11
  • 3
    and for me quitting this process was the quickest way to start the pod process once it was stuck on "Updating local specs repositories" on pod install Commented Sep 18, 2015 at 4:38
  • 1
    cool man, it works perfect, but seems when we already pull some data form git then there is still stack for installing operation. how we can track if it works or not Commented Mar 9, 2016 at 13:35
  • 2
    This answer + pod setup --verbose helped to calm my impatience with it
    – lerp90
    Commented Jun 30, 2016 at 17:16
  • 11
    Thanks, after seeing Activity Monitor, I've decided giving up on Cocoapods forever.
    – kubilay
    Commented Nov 22, 2016 at 13:12
  • 2
    Why I am downloading 2Gb? Commented Nov 15, 2019 at 19:02
59

To get a progression, you can clone master yourself:

pod repo remove master
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod setup
4
  • 9
    I use command below to boost up the cloning time: git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
    – An Nguyen
    Commented Dec 27, 2015 at 11:23
  • 2
    @AnNguyen CocoaPods 1.0.0 will not be officially supporting shallow clones anymore. It will even attempt to --unshallow: github.com/CocoaPods/CocoaPods/issues/5016
    – Cœur
    Commented Mar 10, 2016 at 0:40
  • One whole date past and I found this solution. I my case I have to retype 'git clone' three times to download it correctly.
    – Vyacheslav
    Commented May 22, 2016 at 6:50
  • 4
    Thanks for the solution! At least it shows that something happening. ;) Commented Dec 25, 2019 at 13:30
49

This might be due to the http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ issue... You will have to remove the repo and re-setup it...

pod repo remove master
pod setup

worked for me

Answered in below question as well, Error on pod install

3
  • 1
    Do I need to do this or I should wait as suggested in the answer by @Manuel M. ? Commented Sep 23, 2014 at 13:51
  • 11
    Ha ha, even removing spec repo 'master' takes forever here... :/
    – user89862
    Commented Sep 26, 2014 at 7:04
  • In both cases pod install or, pod setup it updates local repository. We don't have choice wait as suggested by @Maunel M, it works after sometime.
    – iphonic
    Commented Sep 22, 2015 at 8:52
13

I think you need to follow the steps to get rid of the situation and also add --verbose to check whats is happening in front of each command eg:

$ pod setup --verbose
  • pod repo remove master
  • pod setup
  • pod install
10

This is not Stuck or not doing anything its downloading/cloning repository (total size is around 360MB, I am not sure)

1) Open Activity Monitor

2) Select Network Tab

3) Check bellow Google chrome -> git-remote-https

enter image description here

1
  • Downvoted as you gave the same answer that was selected as the correct answer 2 years before your posting.
    – Stu P.
    Commented Aug 19, 2022 at 23:13
5

For insecure people like me who needs an assurance that cocoapods, in fact, is doing the work, try this. The slowest bottleneck is when cocoapods try to clone the entire repo (~300 MB) into ~/.cocoapods

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

For me in China

I have to use SSH and --depth=1 to boost up!

pod repo remove master
git clone --depth=1 [email protected]:CocoaPods/Specs.git  ~/.cocoapods/repos/master 
pod setup
4
  • 1
    CocoaPods 1.0.0 will not be officially supporting shallow clones anymore. It will even attempt to --unshallow: github.com/CocoaPods/CocoaPods/issues/5016
    – Cœur
    Commented Mar 10, 2016 at 0:40
  • Github and CocoaPods are discouraging --unshallow: github.com/CocoaPods/CocoaPods/issues/…
    – Cœur
    Commented Mar 10, 2016 at 0:49
  • 1
    Permission denied (publickey). fatal: Could not read from remote repository.
    – J.J.
    Commented May 8, 2016 at 1:38
  • @JordanJohnson try my answer if you haven't setup SSH keys for github.
    – Cœur
    Commented May 13, 2016 at 15:35
5

The time required for Pod setup depends on your Internet connection speed. You can check Activity Monitor application regarding this.

Screenshot 1

It is recommended to use pod setup --verbose command instead of pod setup.

This verbose helps you to see detailed stats while pod is being setup.

Screenshot 2

5

I had the same problem with pod install and pod update.

The problem is that after executing any of these two commands. A process called git-remote-http in monitor activity shows that something is being downloaded. This has been an existing issue with pods and an issue has opened on github. I've tried a lot of the recommended solutions. I was finally able to install the firebase cocoapod on my project.

Go to

~/.cocoapods/repos

if there is a master file here, you will need to delete it.

You can do something like

sudo rm -R -i yourmasterdirectory 

do pwd ... you should still be in ~/.cocoapods/repos

if the above did not work try

pod repo remove master

Once you have done this run

git clone https://github.com/CocoaPods/Specs.git master

the next thing you need to do is to is run git fetch --depth=2147483647 - this will convert your local repository of Podspecs to be a full clone as noted here:

pod install and pod update should work fast as expected.

2

To execute it, you must pay attention in your Internet connection... if it fails for a sec, the command won't continue, but terminal won't tell you what's happening. If the command fails, continue trying... worked for me! I've used that command!

$ git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master

2

--VMWare Workstation--virtualizedMac--NetworkSetting--Problem

After like 100 tries I got it to work! I have tried nearly everything described here but nothing solved the problem. It randomly stopped by cloning into master between 0% and 97%. In Activity Monitor I saw the network traffic has stopped.

Finally I have changed the network setting from NAT to BRIDGE. This was the solution!

1
  • Thank you, you saved me on this issue. MacOS VMWare, had same problem switched to bridge after doing control panel -> repair VMWare then repatching my VMWare for MacOS fixed bridge mode. After fixing bridge mode, and rerunning the setup it went smoothly. Commented Aug 23, 2018 at 21:36
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

0

Might not be directly related to your issue, but for me I already had the repo cloned but an old library that I attempted to use was pointed at a different spec repo and I didn't actually need to clone this spec repo. To bypass cloning another spec repo I just went into the library's Podfile and removed source line. It instantly installed the pods, didn't have to clone another spec repo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.