pod setup command isn’t frozen—it’s silently cloning the ~2 GB CocoaPods Specs repository. Open Activity Monitor’s Network tab to see git-remote-http downloading data, or manually clone the repo first with git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master then run pod setup.Why this happens
When you run pod setup for the first time, CocoaPods clones the entire Specs repository from GitHub into ~/.cocoapods/repos/master. That repository contains the metadata for every public pod and is several gigabytes in size. The default pod setup output only prints a single line—”Cloning spec repo master…”—and then stays silent until the clone finishes. On a slow or high-latency connection this can take 30 minutes to several hours, making it look like the command has hung.
The Ruby warning about an insecure world-writable directory in PATH is unrelated noise; it does not block the clone.
How to fix it
1. Verify it’s still working (most likely fix)
- Open Activity Monitor (Applications → Utilities).
- Switch to the Network tab.
- Look for a process named
git-remote-http. - If its Bytes Received counter is increasing, the clone is progressing—just wait.
No further action is needed; the command will exit normally once the download completes.
2. Manual clone with progress feedback
If you prefer a visible progress bar or need to resume an interrupted download:
# Remove any partial repo left by a previous attempt
pod repo remove master
# Clone with Git’s built-in progress output
git clone --progress https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
# Tell CocoaPods the repo is already present
pod setup
git clone --progress shows transfer rates and a percentage counter, so you can confirm activity without leaving the terminal.
3. Use a shallow clone (faster, but limited)
If you only need recent pod versions and want to save bandwidth:
pod repo remove master
git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod setup
Note: A shallow clone omits historical pod versions. Some older
pod installcommands may fail if they reference a version not present in the truncated history.
How to prevent it
- Run the first
pod setupon a fast, wired connection—the initial clone is the single largest download CocoaPods performs. - Keep the
~/.cocoapods/repos/masterdirectory when upgrading macOS or Xcode; you only need to re-clone if the directory is deleted or corrupted. - Consider migrating to Swift Package Manager for new projects; it avoids the monolithic Specs repo entirely.
FAQ
Does the Ruby “world writable dir” warning break pod setup?
No. It’s a harmless PATH permission warning from the system Ruby. It does not stop the git clone.
Can I cancel and resume the clone later?
Yes. Press Control-C to cancel, then run the manual clone command from Fix #2. Git will resume from where it left off.
Why does pod repo update also take a long time?
pod repo update fetches incremental changes to the Specs repo. The first run after a fresh clone is fast; subsequent runs depend on how many new pods/versions have been published since your last update.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.
