无法设置pod(错误:RPC失败; curl 56 SSLRead()返回错误-9806)

时间:2016-09-11 08:57:19

标签: git macos cocoapods

Last login: Sun Sep 11 13:24:10 on ttys002
Deepanshus-MacBook-Air:~ deepanshusrivastava$ pod setup --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'...
  error: RPC failed; curl 56 SSLRead() return error -9806
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master

Cloning into 'master'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

每次我尝试安装pod时都会发生这种情况。 非常困难。

2 个答案:

答案 0 :(得分:0)

我对Cocoapods $ pod install有同样的错误

SecureTransport后端使用curl会发生这种情况。您可能会发现此错误here

的一些解释

我已经尝试了许多其他解决方法,但有一次,我使用了Tunnel Bear VPN来解决这个问题。我按照这个link来回答。但现在,我发现这是best way

$ brew remove git
$ brew remove curl


$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git

答案 1 :(得分:0)

看起来您的Xcode版本的路径已损坏。 您可以修复:使用:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

如果您安装了多个版本的Xcode,则需要将/Applications/Xcode.app/Contents/Developer替换为Xcode.app的实际位置,例如/Applications/Xcode 7.3.1.app/Contents/Developer