弹性魔豆SELF_SIGNED_CERT_IN_CHAIN错误NodeJS [英] SELF_SIGNED_CERT_IN_CHAIN error on Elastic Beanstalk for NodeJS
问题描述
我很清楚这个问题的根源,因为 NPM
写在他们的博客:的http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more
I'm well aware of the root of this issue, as npm
wrote on their blog: http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more
的解决方案是:
1)升级您的NPM版本
1) upgrade your version of npm
NPM安装NPM -g
或
2)告诉你目前故宫的版本使用称为注册
2) tell your current version of npm to use known registrars
NPM配置设置CA,
然而,无论是对弹性魔豆这些解决方案的工作。 NPM
被链接到节点的安装(v0.10.10)的版本,这是不可能告诉目前故宫的版本使用已知的注册。
However, neither of these solution work on Elastic Beanstalk. npm
is linked to the version of node installed (v0.10.10), and it is not possible to tell the current npm version to use known registrars.
我运行一个64位的亚马逊Linux实例的NodeJS
I run a 64-bit Amazon Linux instance for NodeJS
在 .ebextensions
添加该命令没有帮助:
Adding this command in .ebextensions
does not help:
container_commands:
01_npm-fix:
command: /opt/elasticbeanstalk/node-install/node-v0.10.10-linux-x64/bin/npm config set ca ""
作为任何人想出了一个解决方案吗?
Anyone as figured out a solution for this?
推荐答案
于是我想出了一个办法,使其工作:
So I figured out a way to make it work:
在 .ebextensions
将这个:
commands:
01_enable_rootaccess:
command: echo Defaults:root \!requiretty >> /etc/sudoers
02_no-cert:
command: sudo /opt/elasticbeanstalk/node-install/node-v0.10.10-linux-x64/bin/npm config set ca ""
工作就像在我的情况下,一个魅力。
Worked like a charm in my case.
这篇关于弹性魔豆SELF_SIGNED_CERT_IN_CHAIN错误NodeJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!