簡體   English   中英

Bundler::Fetcher::CertificateFailureError 無法驗證 SSL 證書

[英]Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate

當我運行以下命令時,我正在嘗試在我的 Linux 系統上安裝 Ruby 項目:

bundle install --jobs=$(nproc) --retry=5

我收到了這個錯誤:

在此處輸入圖像描述

這是上述命令的完整 output:

Fetching source index from https://enterprise.contribsys.com/

Retrying fetcher due to error (2/6): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://enterprise.contribsys.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 https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (3/6): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://enterprise.contribsys.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 https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (4/6): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://enterprise.contribsys.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 https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (5/6): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://enterprise.contribsys.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 https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (6/6): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://enterprise.contribsys.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 https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Could not verify the SSL certificate for https://enterprise.contribsys.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 https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect
without using SSL, edit your Gemfile sources and change 'https' to 'http'.

在我的 Gemfile 中,我嘗試從 https 切換到 http 但仍然是同樣的問題。

我一直在尋找答案,我發現這是一個與 openssl 以及 rvm 如何管理它有關的問題,這也是 ca 證書的問題。

所以,我的問題是:有沒有辦法使用特定 openssl 版本的捆綁安裝?

例如,如果我想安裝不同的 Ruby 版本,我使用以下命令:

rvm install 2.7.6 --with-openssl-dir=$HOME/.rvm/usr --autolibs=disable

任何提示如何克服這個錯誤?

我找到的解決方案是切換到rbenv,之后,所有問題都解決了。

暫無
暫無

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

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