Cocoapods setup stuck on pod setup command on terminal

不羁岁月 提交于 2019-11-27 09:15:18

问题


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 web site, SO and few video tutorials. Nothing happening even after waiting for couple of hours, however still trying to figure-out what may be the problem is? I would very much appreciate your comments and suggestions. Thank you!!!


回答1:


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.

Just wait! It happened the same for me :)

Good luck!




回答2:


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:


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:


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



回答5:


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




回答6:


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



回答7:


For me in China

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

pod repo remove master
git clone --depth=1 git@github.com:CocoaPods/Specs.git  ~/.cocoapods/repos/master 
pod setup



回答8:


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

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.




回答9:


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.




回答10:


--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!




回答11:


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




回答12:


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.




来源:https://stackoverflow.com/questions/21680573/cocoapods-setup-stuck-on-pod-setup-command-on-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!