找不到有效的gem'rhc'. SSL_connect服务器证书验证在Windows上失败,无法连接OpenShift服务器 [英] Could not find a valid gem 'rhc'. SSL_connect server certificate verify failed on Windows, Unable to connect OpenShift Server

查看:134
本文介绍了找不到有效的gem'rhc'. SSL_connect服务器证书验证在Windows上失败,无法连接OpenShift服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C:\>gem install rhc

错误:找不到有效的gem'rhc'(> = 0),这是原因: 无法从 https://rubygems.org/下载数据-SSL_connect返回= 1 errno = 0状态= SSLv3已读取服务器证书B:证书验证失败( https://rubygems.org/latest_specs.4.8.gz)

ERROR: Could not find a valid gem 'rhc' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/latest_specs.4.8.gz)

尝试以下命令:

gem sources -r https://rubygems.org
gem sources -a http://rubygems.org

但是在尝试设置rhc时仍然存在相同的错误.

But still same error exists when trying to setup rhc.

rhc setup

按照这些步骤,成功安装了rhc gem,但是在执行时用于连接到openshift的"rhc设置"是错误消息,而不是连接到openshift服务器

By following these steps rhc gem is installed successfully, but when executing "rhc setup" for connecting to openshift here is the error message rather connecting to openshift server

推荐答案

问题是您的Windows计算机无法将rubygems服务器证书识别为受信任的证书,因为Windows在其受信任的证书存储中没有其授权证书.

The problem is that your Windows machine does not recognize the rubygems server certificate as a trusted certificate because Windows don't have its authority certificate present in its trusted certs store.

作为快速解决方案,您需要删除rubygems源URL的HTTPS版本(而不是像您一样的HTTP):

As a quick fix you'd need to remove the HTTPS version of the rubygems source URL (not HTTP as you did):

gem sources -r https://rubygems.org

此快速修复程序应使rubygems使用不涉及证书检查的HTTP版本.

This quick fix should make rubygems use the HTTP version which has no certificate checks involved.

但是这不应该是确定的解决方法.相反,您应该重新添加HTTPS源(使用-a选项),并将适用于rubygems服务器证书的CA证书安装到Windows信任的CA证书存储中.

But this should not be the definitive fix. Instead you should add the HTTPS source back (using the -a option) and install a proper CA certificate for the rubygems server cert into your windows trusted CA certs store.

网上有很多页面处理此过程(google 此处包含从命令,将其永久修复并且不降低安全性的Windows计算机上.

There are quite a few pages that deal with this procedure on the net (google this), e.g. the post here has steps to download and install all CA certificates from the curl command, to your Windows machine, that fixes the problem permanently and without lowering security.

这篇关于找不到有效的gem'rhc'. SSL_connect服务器证书验证在Windows上失败,无法连接OpenShift服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆