简体   繁体   English

在 ruby​​ on rails 应用程序中运行 bundle install 时无法验证 SSL 证书错误

[英]Could not verify the SSL certificate error when running bundle install in ruby on rails app

I have a ruby on rails app that is throwing an error when I try to run bundle install.我有一个 ruby​​ on rails 应用程序,当我尝试运行 bundle install 时它抛出错误。 The error is the following:错误如下:

bundle stdout: Could not verify the SSL certificate for https://rails-assets.org/ 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捆绑标准输出:无法验证https://rails-assets.org/的 SSL 证书 您有可能遇到中间人攻击,但很可能您的系统没有所需的 CA 证书验证用

Our SSL certificate was updated just a few days ago and we haven't changed anything in the app.我们的 SSL 证书仅在几天前更新,我们没有更改应用程序中的任何内容。 It started to throw this error out of the blue.它开始突然抛出这个错误。

Is there any chance we need to update the root certificates in the system?我们有没有可能需要更新系统中的根证书? I mean like running sudo update-ca-certificates or something like that?我的意思是像运行 sudo update-ca-certificates 或类似的东西? is it safe to do that?这样做安全吗?

The app is in digitalOcean and we use capistrano gem to deploy the app该应用程序在 digitalOcean 中,我们使用 capistrano gem 部署该应用程序

I checked the certificate of https://rails-assets.org/ , it's signed by LetsEncrypt and one of the Root CA from LetsEncrypt is expired and that would be the cause of your issue.我检查了https://rails-assets.org/的证书,它由 LetsEncrypt 签名,并且 LetsEncrypt 的根 CA 之一已过期,这将是您问题的原因。

To understand the issue:要理解这个问题:

https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/ https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/ https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/ https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

The possible solution: https://blog.devgenius.io/rhel-centos-7-fix-for-lets-encrypt-change-8af2de587fe4可能的解决方案: https : //blog.devgenius.io/rhel-centos-7-fix-for-lets-encrypt-change-8af2de587fe4

Basically, if that's the cause, you need to remove the DST Root CA and make sure ISRG Root CA is in your certificate store.基本上,如果这是原因,您需要删除 DST 根 CA 并确保 ISRG 根 CA 在您的证书存储中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为Ruby on Rails应用运行'bundle install'命令时出错 - Error running 'bundle install' command for Ruby on rails app 运行bundle install时出现Ruby错误 - Ruby error when running bundle install bundle install:Gem :: RemoteFetcher :: FetchError:SSL:...证书验证失败 - bundle install: Gem::RemoteFetcher::FetchError: SSL:…certificate verify failed 软件包安装失败,并显示SSL证书验证错误 - bundle install fails with SSL certificate verification error Ruby on Rails:运行“捆绑安装”时如何解决此错误? - Ruby on Rails: How do I solve this error when running “Bundle Install”? 在Rails中的ruby中捆绑安装错误 - Error in bundle install in ruby on rails 在为Rails 3.2 app进行捆绑安装时,使用ruby 1.9.3进行分段错误 - Segmentation fault error with ruby 1.9.3 when doing bundle install for Rails 3.2 app Ruby rails 回形针 Seahorse::Client::NetworkingError(SSL_connect 返回=1 errno=0 状态=错误:证书验证失败) - Ruby rails paperclip Seahorse::Client::NetworkingError (SSL_connect returned=1 errno=0 state=error: certificate verify failed) 红宝石安装宝石-SSL连接返回的证书验证失败 - ruby install gems - SSL connect returned certificate verify failed 运行 bundle install rails 5.2 app 时出错 - Error while running bundle install rails 5.2 app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM