Pod安装,代理问题

Nab*_* El 11 proxy ios cocoapods

我试图徒劳地运行pod安装:

Analyzing dependencies
Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git`
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
Run Code Online (Sandbox Code Playgroud)

我想我有代理问题,但我不知道如何解决它.这是我尝试pod设置时的结果

Setting up CocoaPods master repo
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --depth=1

Cloning into 'master'...

fatal: unable to access 'https://github.com/CocoaPods/Specs.git/':Received HTTP code 503 from proxy after CONNECT
Run Code Online (Sandbox Code Playgroud)

Jak*_*ano 15

您的系统代理设置可能不适用于bash.在运行之前将其键入bash pod install:

export http_proxy=<YOUR_HTTP_PROXY>
export https_proxy=<YOUR_HTTPS_PROXY>
Run Code Online (Sandbox Code Playgroud)

如果有帮助,您可以在bash启动时加载代理设置,方法是将上述命令添加到.bash_profile主目录中的(创建文件,如果它不存在).


Jas*_*shu 6

我想你忘了在Command-linetool路径位置设置新安装的Xcode.请在Xcode上检查- >首选项 - >位置 - >命令行工具 - >设置您的Xcode.