سؤال

أنا أقوم باستنساخ مشروع من git repo، ولكن عندما أقوم بالتنفيذ pod install السطر الأول الذي أراه هو "إعداد CocoaPods Master repo" وبعد ذلك لا أستطيع رؤية أي شيء آخر، وتتوقف وحدة التحكم عند هذا الحد.

لا أعرف ماذا يحدث.هل يعرف أحد ما الذي يحدث هنا؟لماذا يتوقف CocoaPods عند هذا الحد؟

هل كانت مفيدة؟

المحلول

يمكنك تجربة التشغيل في الوضع المطول:

pod install --verbose

سيوضح لك هذا ما يفعله فريق الكاكاو:

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

(كما هو مقترح هنا)

بالنسبة لي، استغرقت الخطوة المذكورة أعلاه وقتًا طويلاً كما هو الحال في الريبو (ديسمبر 2016) الآن 1.1 جيجابايت

نصائح أخرى

pod install أو pod setup يجلب repo كله مع التاريخ عند تشغيله لأول مرة.لا تحتاج إلى الالتزام بالتاريخ.

giveacodicetagpre.

يستغرق حوالي 2 دقيقة على اتصال الشبكة اللائقة (4Mbps).دليل الأجيال حوالي 519 متر كبيرة.

جرب هذا الأمر لتتبع عمله.

giveacodicetagpre.

المشكلة هي أنك لم تحصل على أدوات سطر الأوامر مثبتة، وأعتقد. حاول تشغيل في المحطة:

giveacodicetagpre.

بعد ذلك قم بتنزيل أدوات سطر الأوامر من Apple giveacodicetagpre.

قد تكون هذه المعلومات مفيدة:

الإجابة الرسمية: http:// بلوق.cocoapods.org/master-spec-repo-rate-limiting-post-mortem/

نتيجة لهذه المناقشة https://github.com/cocoapods/cocoapods/4989

لفترة وجيزة: تعزز مستودع Cocoapods بحجم ضخم من الجمل من جيثب وكانت المشكلة.التغييرات متوفرة منذ الإصدار 1.0.0.beta.6.

نصائح من هذا المستند:

giveacodicetagpre.

بلدي الاختراق للتثبيت الأول:

giveacodicetagpre.

اليوم يستغرق حوالي 15 دقيقة

عندما يقوم CocoaPods بذلك، فإنه يقوم بتنزيل مستودع المواصفات بالكامل إليه ~/.cocoapods.قد يستغرق هذا بعض الوقت حسب اتصالك.سأحاول القيام بذلك بشكل صريح أولاً مع pod setup

لا شيء أعلاه عملت بالنسبة لي، لذلك هذا هو العمل:

giveacodicetagpre.

بمجرد الانتهاء من ذلك.

هتافات

ما جربته وأسرع من استنساخ الريبو:

  1. pod setup
  2. Ctrl +C بعد إنشاء الدليل الرئيسي
  3. تحميل.الرمز البريدي من https://github.com/CocoaPods/Specs يتقن
  4. انسخ المحتوى إلى ~/.cocoapods/repos
  5. pod install --no-repo-update في مجلد المشروع الخاص بي

بعد ذلك تمكنت أخيرًا من رؤية القرون التي يتم تثبيتها

حظ سعيد!

يحرر:حجم الملف المضغوط هو 144 ميجابايت (6 يوليو 2017)

giveacodicetagpre.

أقوم بتشغيل الأمر المذكور أعلاه الآن ولكن كما ذكرنا ضربة في Joe، فإنه لا يظهر أي معلومات عن التقدم المحرز.

ولكن إذا قمت بفتح مراقب النشاط على Mac (إدارة المهام على Windows؟)، ضمن علامة التبويب "الشبكة"، سترى عملية تسمى 'Git-Remote-htttps' وتظهرحجم "تلقى بايتز" المتزايد.بعد تنزيل حوالي 300 ميغابايت، توقفت ثم أستطيع أن أرى مزيدا من التقدم في النافذة الطرفية.

استخدمت الأوامر الأربعة التالية

giveacodicetagpre.

استغرق بعض الوقت كما هو متوقع، ولكن على الأقل لم يكن لدي درج على الشاشة تتساءل ما يحدث في الخلفية.

وهذا يحدث مرة واحدة فقط.

  • الريبو الرئيسي لديه +-1 جيجابايت (نوفمبر 2016).

  • ل تتبع التقدم يمكنك استخدام تطبيق مراقبة النشاط وابحث عن git-remote-https.

  • في المرة القادمة (pod setup أو pod repo update) سوف يقوم فقط بتحديث كافة المواصفات الواردة فيه بسرعة ~/.cocoapods/repos.

You will have to remove the repo and re-setup it...

pod repo remove master
pod setup

I'm monitoring the download progress by using

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

the progress is very slow... and failed few times. But somehow after increasing the git buffer limit by using this command line git config --global http.postBuffer 2M The download speed is improving greatly and after downloading in total 347 Mb on ./cocoapods folder, the progress seems to stop and network activity is also stopping. but after waiting few minutes, turn out that cocoapod is verifying and extracting the repo and makes the total size up to 853 Mb.

notes: I'm doing it on 23 Oct 2016.

I Faced same problem but it work for.I executed the Pod Install Command Before 3 Hour ago after that its updated what i want. You just need to Keep tracking the "Activity Monitor" You can see their "git remote https" or "Git" in disk tab. It will download around 330 Mb then it shows 1 GB and After some minutes it will starts installing. No need to Execute extra command.

Note : during downloading your MAC need to in continuously Active mode.If your system goes in sleep mode then CPU stop the process and you will get a error Like Add manually.

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

Cocoa pods - reduce wait times to 10% ( on Mac OS ) :

1- type pod setup in your project folder ( first you have to be in the project folder) from terminal in Mac OS.

2- CTRL+z to stop after it creates master directory ( folder ) [you can see it in your cocoa pods folder location : ~/.cocoapods/repos]

  1. Download .zip from 

    https://github.com/CocoaPods/Specs

     master branch ( its 301 MB) , Extract it . It will take approx 5-10 mins

4.Copy the content to ~/.cocoapods/repos ( now here you only need to copy the contents inside the master folder , so make sure that master folder is created already with pod setup command )

5- once you copy it ( or I should say move , drag and drop as copying will take forever , as its very large ), you can then do pod install --no-repo-update 6- your pods in the pod file now will start installing Here is a screenshot enter image description here

As of cocoapods 1.7.2 you can use the cdn instead of github. It's blazing fast and it won't hang. :) The cdn is default from cocopods 1.8.0 onwards.

To use the CDN source in your Podfile:

If you don't have private specs:

source 'https://cdn.cocoapods.org/'

If you have private specs:

source 'https://github.com/artsy/Specs.git'
- source 'https://github.com/CocoaPods/Specs.git'
+ source 'https://cdn.cocoapods.org/'

Doing this will break your Podfile.lock, so you are likely to need to run pod update to see the changes (be careful, this may update your Pods also).

If you have a CI setup, it is recommended to cache the new repo dir as it is very small and would save even more time. With 1.7.2 it should be located at ~/.cocoapods/repos/cocoapods- (yes, with a -), but we're looking to improve the naming in an upcoming release.

More info:

pod setup works and should only take 10 mins on a solid connection. After that run: pod install --verbose and you should see all the comments you would normally see when running a dependancy manager.

Hope that helps

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top