与 cocoapods 的连接错误。代理连接中止

Connection error with cocoapods. Proxy CONNECT aborted

我在安装 cococapods 时遇到问题。我在终端中完成了以下步骤:

~sudo gem 更新 --system

~sudo gem 安装 cocoapods

及之后

~pod 设置

我有这个错误信息

MacBook-Pro-Aleksandr:~ aleksandrkarpov$ pod setup
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/': Proxy CONNECT aborted

我以前用 cocoapods 工作过,没问题。在这种情况下,我不知道该怎么办。谁能帮帮我?

我找到了解决方案 here

我只在终端写过:

git config --global http.proxy
git config --global --unset http.proxy

它解决了我的问题。