簡體   English   中英

ssl_verify_mode + bundler + geminabox

[英]ssl_verify_mode + bundler + geminabox

我正在嘗試建立一個私有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'.

我的問題是,如何在捆綁器中正確設置SSL驗證? 我應該使用另一種設置嗎? 謝謝你提供的所有幫助...

我的系統:

Ubuntu 14.04

Ruby 2.1.2

Bundler版本1.8.4

而不是回答如何禁用驗證(我不確定如何或是否可能,我不推薦它)這里是如何指定自定義CA證書文件的路徑,這是一個更安全的解決方案:

bundle config --global ssl_ca_cert /path/to/file.pem

來源http://bundler.io/man/bundle-config.1.html#LIST-OF-AVAILABLE-KEYS

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM