zoukankan      html  css  js  c++  java
  • Failed to connect to GitHub to update the CocoaPods/Specs specs repo

    Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

    编译环境

    系统版本:macOS Sierra 10.12.6

    Xcode: v9.2(9C40b)

    当我们使用pod update 或者 pod repo update 时,可能会出现 [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down问题

     Failed to connect to GitHub to update the CocoaPods/Specs specs repo

    一开始我认为是网络问题,后来频繁的出现我发现是链接github出现了问题。
    stackoverflow 我找到了解决办法。

    在这里可以看到出现这个问题的原因,以及解决的办法

    2018年2月之后,其中一个主要问题是“弱密码标准被删除”。

    To solve this, first you need to update openssl, then ruby, then cocoapod.

    开始搬运代码

    $ which openssl
    /usr/bin/openssl
    
    $ openssl version
    OpenSSL 0.9.8zh 14 Jan 2016
    
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
    $ brew update
    
    $ brew install openssl
    
    $ brew upgrade openssl
    
    `` If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
    
    $ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
    $ source ~/.bash_profile
    
    $ which openssl
    /usr/local/opt/openssl/bin/openssl
    
    $ openssl version
    OpenSSL 1.0.2n  7 Dec 2017
    
    $ brew install rbenv ruby-build
    
    $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
    $ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
    $ source ~/.bash_profile
    
    $ rbenv install --list
    
    Available versions:
      1.8.5-p52
      1.8.5-p113
      1.8.5-p114
      1.8.5-p115
      1.8.5-p231
      1.8.6
    :
      2.5.0-rc1
      2.5.0
      2.6.0-dev
    :
    
    $ rbenv install 2.5.0
    
    $ rbenv versions
    * system (set by /Users/username/.rbenv/version)
      2.5.0
    
    $ ruby --version
    ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    
    $ rbenv global 2.5.0
    
    $ rbenv versions
      system
    * 2.5.0 (set by /Users/username/.rbenv/version)
    
    $ ruby --version
    ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
    
    $ gem install cocoapods -n /usr/local/bin
    
    $ which pod
    /usr/local/bin/pod
    
    $ pod --version
    1.4.0
    
    

    成功走到最后,则代表安装成功了,可以放心的 pod updatepod repo update

    Ruby选择的版本必须是大于2.0.0版本,最好是选择最新的例如 2.5.0 或者 2.5.1

    在 2018.4.24你pod可能更新的是1.5.0版本,这个关系不大

    还有一种解决方案 是每次需要更新你的repo时,将老版本的repo删除,重新下载

    $sudo rm -fr ~/.cocoapods/repos/master
    $pod setup
    $pod install
    
    
  • 相关阅读:
    sqlserver数据库的备份与还原——完整备份与还原
    sqlserver中为节约存储空间的收缩数据库机制
    sqlserver数据库的分离与附加
    sqlserver的数据库状态——脱机与联机
    sqlserver打开对象资源管理器管理的帮助文档的快捷键
    sqlserver使用SQL语句创建数据库登录对象、数据库用户以及对为该用户赋予操作权限
    sqlserver window身份验证时切换账户的快捷键
    向现有数据库中添加文件组和数据文件
    使用SQL语句创建数据库2——创建多个数据库文件和多个日志文件
    Java中怎样判断一个字符串是否是数字?
  • 原文地址:https://www.cnblogs.com/maybe-liu/p/8932477.html
Copyright © 2011-2022 走看看