8

I try to update my podfile using the command pod update but it takes forever. I did also all the steps according to this question cocoapods - 'pod install' takes forever but nothing changed. Using the command pod update --verbose i see that it stops here: Updating spec repo master $ /usr/bin/git pull --ff-only Any suggestion?

Community
  • 1
  • 1
euthimis87
  • 1,134
  • 1
  • 11
  • 18
  • Possible duplicate of [cocoapods - 'pod install' takes forever](http://stackoverflow.com/questions/23755974/cocoapods-pod-install-takes-forever) – Cœur Dec 21 '16 at 03:59

3 Answers3

13

CocoaPods has to download a repository of all podspecs to do its work. It seems like it's that pull operation that's taking a long time. I'm not aware of any way to accelerate that process.

However subsequent pod operations will be much faster until new commits are available in the master spec repo. So if you have several update or install operations, doing them together can save you some time.

Fabian
  • 6,973
  • 2
  • 26
  • 27
  • 2
    Thanks for the hint..It appears that indeed takes a long time..It took hours for podfile to be updated.But finally got updated. – euthimis87 Aug 04 '14 at 11:05
  • 1
    Thanks for actually mentioning "hours" @euthimis87 While I am 2 hours into my install, I was starting to wonder what "takes forever" actually means. 40 minutes? a week? – Jannie Theunissen Feb 04 '20 at 12:15
2

There is a rate limiting on git servers and that seems to slow down the process. Like Fabian said there is no valid solution at the moment but splitting the update to individual pods. There is an explanation at the CocoaPods blog Master spec-repo rate limiting post‑mortem, it seems we need to wait for 1.0.0.beta.7 before they fix the issue. Meanwhile, this Git Issue on the topic recommends to run convert your Podspecs to be a full copy instead of a shallow clone, by running:

cd ~/.cocoapods/repos/master && git fetch --depth=2147483647
Idan
  • 5,405
  • 7
  • 35
  • 52
0

you can run

pod install --verbose 

to see what's going on behind the scenes.. at least you'll know where it's stuck at (it could be a git clone operation that's taking too long because of your slow network etc)

check this for more clarified answer https://stackoverflow.com/a/25658514/1894306

EnasAZ
  • 82
  • 6