xcode CocoaPods 设置太慢,如何在终端设置代理
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21822872/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
CocoaPods setup too slow, how to set proxy in terminal
提问by folse
When I use terminal to 'setup' or 'update' cocoapods, I find it needs a lot of time to fetching.
当我使用终端来“设置”或“更新”cocoapods 时,我发现它需要很多时间来获取。
So I'm wondering whether there is a way to set a proxy to my terminal, so that it return result more fast?
所以我想知道是否有办法为我的终端设置代理,以便更快地返回结果?
回答by folse
Choice 1
选择 1
Step 1:
第1步:
From Google choose a proxy
从 Google 选择代理
Step 2:
第2步:
Set up the proxy to your Mac
为您的 Mac 设置代理
Step 3:
第 3 步:
In your terminal set proxy with your port:
在您的终端中使用您的端口设置代理:
export http_proxy='http://your_proxy:8000'
Choice 2
选择2
pod repo remove master
pod repo add master https://gitcafe.com/lloydsheng/Specs.git
pod repo update
Choice 3 Recommend
选择 3 推荐
pod install --verbose --no-repo-update
回答by kgpdeveloper
In my case, I found that it was stuck at "analyzing dependencies" because of an error on my Podfile.
就我而言,我发现它由于 Podfile 上的错误而卡在“分析依赖项”上。
Try this:
尝试这个:
pod install --verbose
回答by kgpdeveloper
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update