我正在尝试建立一个私人 geminabox 服务器来保存我的项目正在开发的一些宝石。我设置了服务器,乘客 nginx 将 geminabox 作为机架应用程序运行。我可以在不使用 SSL 的情况下捆绑指向服务器的安装。
由于裸 HTTP 流量从来都不是理想的,我也想添加 SSL。为了让概念证明工作,我添加了一个 SSL 证书并验证我仍然可以看到我安装的 gem 的 geminabox 前端。
当我回到我的 ruby 项目时,我运行一个 bundle install 并得到:
Could not verify the SSL certificate for https://********.com/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
按照错误消息给我的链接,我决定首先添加 ~/.gemrc 的内容:
:ssl_verify_mode: 0
(不理想,也不是永久解决方案)。现在我得到:
Fetching source index from https://***.com/
Resolving dependencies...
Could not verify the SSL certificate for
https://***.com/quick/Marshal.4.8/sqlite3-1.3.10-x86-mswin32-60.gemspec.rz.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA
certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without
using SSL, edit your Gemfile sources and change 'https' to 'http'.
我的问题是,如何在 bundler 中正确地将 SSL 验证设置为关闭?我应该使用其他设置吗?谢谢你提供的所有帮助...
我的系统:
Ubuntu 14.04
红宝石 2.1.2
捆绑器版本 1.8.4