Home > Mobile >  Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate
Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate

Time:08-09

I'm trying to install a Ruby project on my Linux system, when I run this command:

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

I got this error:

enter image description here

This is the full output of the above command:

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'.

In my Gemfile I tried to switch from https to http but still the same problem.

I have been searching for answers and all I found it is an issue related to openssl and how rvm manage it, also it is a matter of ca-certificates.

So, my question is: is there a way to use bundle install with an specific openssl version?

As an example, if I want to install a different Ruby version I use this command:

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

Any hints how to overcome this error?

CodePudding user response:

the solution I found was to switch to rbenv, after that, all problems solved it.

  • Related