Pod install is staying on "Setting up CocoaPods Master repo"
Solution 1
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'...
For me the above step took quite a long time as the repo (Dec 2016) is now 1.1 GB
Solution 2
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.
Solution 3
Try this command to track its work.
while true; do
du -sh ~/.cocoapods/
sleep 3
done
Solution 4
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
Solution 5
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
Related videos on Youtube
Gabriel Goncalves
sr iOS developer working for Globant at the Walt Disney Company.
Updated on October 22, 2020Comments
-
Gabriel Goncalves over 3 years
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?
-
Gabriel Goncalves over 10 yearsHi, I'm trying to install command line tools from Xcode but it doesn't appear there (I have mavericks) I also follow this steps stackoverflow.com/questions/15371925/… 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"
-
Gabriel Goncalves over 10 yearsHi, 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 installed
-
Greg over 10 yearsWhen 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.
-
Keith Smiley over 10 yearsShouldn't be that long, but I'd give it a few minutes
-
Gabriel Goncalves over 10 yearsHi, it is still showing "setting up Cocoapods Master repo" and never go forward
-
Gabriel Goncalves over 10 yearsThanks for your help but that didn't work. I have command line tools installed and the message still appears and doesn't go forward
-
Greg over 10 years@Gabox Have you call sudo gem install cocoa pods and pod setup after you installed command line tools?
-
Gabriel Goncalves over 10 yearsYes I have called sudo gem install cocoapods. I solve the problem following this tutorial cocoafactory.com/blog/2013/02/01/… Thanks for your help
-
Gabriel Goncalves over 10 yearsYour answer help me, you can edit your answer and put the previous link I put and I can accept your answer
-
László Papp over 10 yearsQuoting masweb: "check ls -lta ~/.cocoapods/repos/master/.git/objects/pack/ its downloading temporary pack there".
-
user about 10 yearsGot to 50mb before I killed it. api.github.com/repos/cocoapods/cocoapods says the repo is only 42k
-
cduhn almost 10 yearsTip for my fellow obsessives, building on Final Contest above: run
brew install watch
thenwatch ls -lta ~/.cocoapods/repos/master/.git/objects/pack/
to monitor progress. -
ikzjfr0 over 9 yearsyou can use this way to speed up :pod install --verbose --no-repo-update
-
Gabriel Goncalves over 8 yearsthat'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 happening
-
maxhawkins about 8 yearsalternatively:
watch du -sh ~/.cocoapods
-
John Griffiths almost 8 yearsThanks 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 :-)
-
Gabriel Goncalves almost 8 yearsnice, thanks for sharing it. but it is weird that --verbose doesn't work for you...
-
Ahsas almost 8 yearsactually it does print some info in the beginning but then theres a long wait involved when downloading that 300MB+ file... anyway hope it helped!
-
Aman Satija over 7 yearsthe size has gone upto 482 MB
-
afield over 7 yearsMuch more useful than just --verbose. Time for a cup of tea!
-
Gobe over 7 yearsAwesome, I used this to fix several weird issues I was having on
pod update
, likefatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree
. Just had torm -rf ~/.cocoapods
before executing the suggested commands. -
Glenn Posadas over 7 yearsI 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. :)
-
A-Majeed over 7 yearsJust to be clear, when you said to unpack the folder, will it look like this : ~/.cocoapods/repos/spec-master/...
-
Tina Zh over 7 yearsno, you should unzip it as ~/.cocoapods/repos/master (just rename) as recommend here github.com/CocoaPods/Specs/releases
-
Zack Shapiro over 7 yearsThis 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 perfectly -
Vaiden over 7 yearsPlease mind that 'pod update' will still cause a full fetch. 'pod install' won't. Info: blog.cocoapods.org/Master-Spec-Repo-Rate-Limiting-Post-Mortem
-
Alessio Dal Bianco over 7 yearsWhy cocoapods.org not mention this type of install? Stop wasting tons of developers hours!
-
Anirudha Mahale over 7 yearsam I suppose to copy the extracted files to ~/.cocoapods/repos/ directory OR am I suppose to copy to my xcode project's root directory?
-
Tina Zh over 7 yearsYou should unpack files to ~/.cocoapods/repos/master directly. After that: call "pod install --no-repo-update" in project folder
-
Eduard over 7 yearsSugested an edit for 'pod repo remove master', as it did not work for me, nor some commenters above.
-
August over 7 yearsIf you already have done this and run into a "out-of-date" issue, you should: 'cd ~/.cocoapods/repos/master', and then do: 'git pull'
-
Lakshmi Keerthana Siddu over 7 yearswhile i am doing pod init I got "LoadError - cannot load such file -- nanaimo" Error message. could you suggest any solution ?
-
iPeter about 7 yearsAfter giving the last command it is showing this: fatal: destination path 'master' already exists and is not an empty directory.
-
lisowski.r about 7 years@iPeter remove master directory before clone eg
rm -rf ~/.cocoapods/repos/master
-
denblackstache almost 7 yearsInstead of «5. Move to project folder» you could just
git init
in that place andgit remote add origin https://github.com/CocoaPods/Specs.git
-
Jared Chmielecki almost 7 years300 megs is "fixed" ?? They need to look at NPM for some ideas.
-
AamirR almost 7 years@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 this
-
Led almost 7 yearsconfirmed working July 2017. Remember to use --no-repo-update
-
mstrthealias over 6 yearsI had to finish with
cd PROJ_DIR; pod install --no-repo-update
-
Thom over 5 years1.4GB as of today LOL
-
Akshay Vijay Jain over 3 yearswhat does this solution help with? please