简体   繁体   English

Heroku 登录错误:证书链中的自签名证书

[英]Heroku Login Error: self signed certificate in certificate chain

I'm trying to use Heroku CLI on Mac.我正在尝试在 Mac 上使用 Heroku CLI。

When I try to login to Heroku using Heroku login and give my credentials, I get the below error:当我尝试使用 Heroku login 登录 Heroku 并提供我的凭据时,出现以下错误:

Error: self signed certificate in certificate chain错误:证书链中的自签名证书

I have tried uninstalling and reinstalling it several times, but I continue to receive this error.我已经多次尝试卸载并重新安装它,但我继续收到此错误。

How can I solve it?我该如何解决?

This error usually means you're behind a mitm proxy that isn't configured right.此错误通常意味着您使用了未正确配置的 mitm 代理。 See the docs for details . 有关详细信息,请参阅文档

I was also facing issue same issue because of my organization firewall.由于我的组织防火墙,我也面临同样的问题。 Solution is to simply download and install organization certs.解决方案是简单地下载并安装组织证书。

  1. Once you download organization specific ".cer" file then convert that file to ".pem" using下载组织特定的“.cer”文件后,然后使用该文件将该文件转换为“.pem”

    openssl x509 -inform der -in orgCertFile.cer -out certificate.pem

  2. Next, set following variable either as system variable or temp variable in current command line接下来,在当前命令行中将以下变量设置为系统变量或临时变量

    export SSL_CERT_FILE=orgCertFile.cer

    export NODE_EXTRA_CA_CERTS=certificate.pem

  3. Finally try logging in using heroku command最后尝试使用 heroku 命令登录

    heroku login

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM