Gem RubyGems 淘宝镜像 CDN 有时候域名和证书不匹配啊

ryh · 2015年07月14日 · 最后由 ryh 回复于 2015年07月15日 · 2334 次阅读
 gem install cocoapods --pre -V
HEAD https://ruby.taobao.org/api/v1/dependencies
200 OK
GET https://ruby.taobao.org/api/v1/dependencies?gems=cocoapods
200 OK
GET https://ruby.taobao.org/api/v1/dependencies?gems=activesupport,claide,cocoapods-core,cocoapods-downloader,cocoapods-plugins,cocoapods-stats,cocoapods-trunk,cocoapods-try,colored,escape,molinillo,nap,xcodeproj
200 OK
GET https://ruby.taobao.org/api/v1/dependencies?gems=fuzzy_match,netrc
200 OK
GET https://ruby.taobao.org/api/v1/dependencies?gems=i18n,json,minitest,thread_safe,tzinfo
200 OK
GET https://ruby.taobao.org/quick/Marshal.4.8/cocoapods-core-0.38.0.beta.2.gemspec.rz
302 Moved Temporarily
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    hostname "rubygems-china.oss.aliyuncs.com" does not match the server certificate (https://rubygems-china.oss.aliyuncs.com/quick/Marshal.4.8/cocoapods-core-0.38.0.beta.2.gemspec.rz)

而且用浏览器打开https://rubygems-china.oss.aliyuncs.com/quick/Marshal.4.8/cocoapods-core-0.38.0.beta.2.gemspec.rz 也会提示当前服务器的证书CN是*.oss-cn-hangzhou.aliyuncs.com

成都电信

PING rubygems-china.oss.aliyuncs.com (112.124.219.38): 56 data bytes
64 bytes from 112.124.219.38: icmp_seq=0 ttl=53 time=50.945 ms
^C

cc @huacnlee

共收到 4 条回复
1楼 已删除

#1楼 @yangman_wenzhu 我有时候也是正确的,感觉他们OSS的服务器的问题提供了错的证书(或者mirror 302到其他服务器了,也没显示302后的地址)

不过说实在的, 这个问题确实没有碰到 , 你先参考 http://bubuko.com/infodetail-739997.html 然后你那边不能翻墙么 我用的是 [官方gem源](https://rubygems.org/) 这个源 你的这个 gem 在官方网找找得到的 我在本地执行 gem install cocoapods 得到结果:

**gem install cocoapods**
Fetching: nap-0.8.0.gem (100%)
Successfully installed nap-0.8.0
Fetching: thread_safe-0.3.5.gem (100%)
Successfully installed thread_safe-0.3.5
Fetching: minitest-5.7.0.gem (100%)
Successfully installed minitest-5.7.0
Fetching: tzinfo-1.2.2.gem (100%)
Successfully installed tzinfo-1.2.2
Fetching: i18n-0.7.0.gem (100%)
Successfully installed i18n-0.7.0
Fetching: activesupport-4.2.3.gem (100%)
Successfully installed activesupport-4.2.3
Fetching: escape-0.0.4.gem (100%)
Successfully installed escape-0.0.4
Fetching: colored-1.2.gem (100%)
Successfully installed colored-1.2
Fetching: molinillo-0.2.3.gem (100%)
Successfully installed molinillo-0.2.3
Fetching: netrc-0.7.8.gem (100%)
Successfully installed netrc-0.7.8
Fetching: cocoapods-trunk-0.6.1.gem (100%)
Successfully installed cocoapods-trunk-0.6.1
Fetching: cocoapods-try-0.4.5.gem (100%)
Successfully installed cocoapods-try-0.4.5
Fetching: cocoapods-plugins-0.4.2.gem (100%)
Successfully installed cocoapods-plugins-0.4.2
Fetching: cocoapods-downloader-0.9.1.gem (100%)
Successfully installed cocoapods-downloader-0.9.1
Fetching: xcodeproj-0.24.3.gem (100%)
Successfully installed xcodeproj-0.24.3
Fetching: claide-0.8.2.gem (100%)
Successfully installed claide-0.8.2
Fetching: fuzzy_match-2.0.4.gem (100%)
Successfully installed fuzzy_match-2.0.4
Fetching: cocoapods-core-0.37.2.gem (100%)
Successfully installed cocoapods-core-0.37.2
Fetching: cocoapods-0.37.2.gem (100%)
Successfully installed cocoapods-0.37.2
19 gems installed

如果你觉得是镜像的问题,先翻过去用官方源。 回头再给镜像维护者反馈。

#4楼 @kgen 我现在就是因为翻墙太麻烦在给镜像维护者反馈啊,貌似是huacnlee老大维护的吧

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册