receiving error: 'Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using npm
From:https://stackoverflow.com/questions/9626990/receiving-error-error-ssl-error-self-signed-cert-in-chain-while-using-npm
[问题]
am using npm v1.0.104/node 0.6.12 on ubuntu - I am receiving the error copied below while attempting to install any new modules via npm (I tested socket.io earlier using http, not https though & am wondering if that could have resulted in the issue with npm/unsigned certs). The error pops up once npm tries to resolve the 'https://registry.npmjs.org' URL. Is there anyway I can ignore the error or perhaps locate/add the cert to a trusted store in order to continue using npm.
Any insight on what needs to be done to resolve the issue will be appreciated (I would prefer to resolve the issue through configuration as opposed to re-installing if possible).
Error: "Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN"
Full Message:
npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR! at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/main.js:252:28)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! at CleartextStream.ondata (http.js:1150:24)
npm ERR! at CleartextStream._push (tls.js:375:27)
npm ERR! at SecurePair.cycle (tls.js:734:20)
npm ERR! at EncryptedStream.write (tls.js:130:13)
npm ERR! at Socket.ondata (stream.js:38:26)
npm ERR! at Socket.emit (events.js:67:17)
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.38-13-generic
npm ERR! command "node" "/usr/bin/npm" "install" "jed"
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.0.104
[回答]
Running the following helped resolve the issue:
npm config set strict-ssl false
I cannot comment on whether it will cause any other issues at this point in time. Hope it helps.
[其他评论]
- run "npm config set ca null" instead, ignoring ssl errors is a bad idea – alex Jan 4 '14 at 0:50
- This is filthily wrong. Why are you even bothering using SSL if every time it does the one thing it's supposed to do you turn it off? "Any time ignoring an error leads to success, developers are going to do just that." – djechlin Jan 13 '14 at 15:53
- Please don't ignore ssl issues, as the error is there for a very good reason. Also, a bit of searching resulted in the following tweet, which links to the official solution to your problem (update npm): twitter.com/npmjs/status/439279809307242496 – Thomas Vervest Feb 28 '14 at 10:11
- This answer shouldn't be the accepted one. – Guillaume Flandre Feb 28 '14 at 13:20
- My issue was caused by a proxy that I'm behind, "npm config set ca null" and 'npm config set ca ""' still gave me the same error, but removing SSL worked perfectly. Sometimes good practice isn't as important as what actually works. – Cory Schulz Aug 27 '14 at 19:02[注] 我调查了一下,发现node.js的request对象也有strictSSL选项. 只要在调用的时候传入strictSSL: false,问题就解决了. 不用在npm config里面做配置.
receiving error: 'Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using npm的更多相关文章
- 【svn】SSL error: A TLS warning alert has been received的解决方法
第一次用svn(>_<),结果在运行下面语句时,svn很不友好的报错了..... svn co http:10.11.12.13/test1/test2 . 报错信息: svn: OPTI ...
- 在阿里云linux下使用SVN访问VisualSVN出错:SSL handshake failed: SSL error: Key usage violation in certificate has been detected
Subversion clients receive the following error message when attempting to connect to VisualSVN Serve ...
- last error : SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate veri
今天在用搜狐提供的邮件群发系统的sdk,做发送邮件的测试时,提示: last error : SSL certificate problem, verify that the CA cert is O ...
- composer在update时提示file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO
在开发的时候,需要把依赖的服务更新到最新,然后 手动composer update一下,提示如下: failed) Update failed (The "e "https://a ...
- 重装@angular/cli reason: write EPROTO 139955972261696:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:252:
前几天不小心卸载了 angular@cli,然后重装的时候发现,一直报错.如下: ××××××××@××××ln622653:/$ npm install -g @angular/clinpm ERR ...
- cURL error 60: SSL certificate problem...
php在curl的时候报错 cURL error 60: SSL certificate problem: unable to get local issuer certificate (see ht ...
- python安装提示No module named setuptools,wget提示ERROR 403: SSL is required
在下载安装一个python工具时提示报错No module named setuptools [root@kermit supervisor-3.3.0]$ sudo python setup.py ...
- 【问题与解决】Github 上传代码报错(error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version)
今天修改了GitHub 的代码,代码更新,想上传更新,却发现上传报错. 错误代码:error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 al ...
- freeradius 错误: error:140890C7:SSL routines:ssl3_get_client_certificate:peer did not return a certificate
在进行802.1x 测试时遇到如下问题: Waking up in 4.6 seconds.(156) Received Access-Request Id 82 from 192.168.1.126 ...
随机推荐
- splay好板子
找到一份比较好的板子,链接https://blog.csdn.net/crazy_ac/article/details/8034190 #include<cstdio> #include& ...
- iOS中按钮点击事件处理方式
写在前面 在iOS开发中,时常会用到按钮,通过按钮的点击来完成界面的跳转等功能.按钮事件的实现方式有多种,其中 较为常用的是目标-动作对模式.但这种方式使得view与controller之间的耦合程度 ...
- ORACLE分页查询SQL语法——高效的分页
--1:无ORDER BY排序的写法.(效率最高)--(经过测试,此方法成本最低,只嵌套一层,速度最快!即使查询的数据量再大,也几乎不受影响,速度依然!) SELECT * FROM (SELECT ...
- Maven的下载,安装,配置,测试,初识以及Maven私服
:Maven目录分析 bin:含有mvn运行的脚本 boot:含有plexus-classworlds类加载器框架 conf:含有settings.xml配置文件 lib:含有Maven运行时所需要的 ...
- jsp+servlet实现最基本的注册登陆功能
源码和数据库下载地址:http://download.csdn.net/detail/biexiansheng/9759722 1:首先需要设计好数据库和数据表,这里简单截图说明我创建的字段和类型. ...
- Android Studio之导出JavaDoc出现编码GBK的不可映射字符
使用Android Studio导出JavaDoc时,如果在注释中添加了中文,生成时的时候会出现错误: 编码GBK的不可映射字符. 解决的办法是在Other command line argument ...
- Thinkphp基础配置
访问项目中的index.phpApplication下会自动生成一些文件 在Application下建两个目录 一个Admin用来放后台中的文件 一个Public用来放公共文件 然后去Appplica ...
- C# Winform将控件作为参数传递
最近做个Winform 的程序设计,需要将窗体的控件作为参数传递到另外一个类的函数中去使用,每次都会忘记,简单的记下来,以备即时查看. 1. 设置控件的modifier属性设置为public 2. 以 ...
- MySQL普通用户无法本地登录的解决方法及MySQL的用户认证算法
在安装完成MySQL后,我们通常添加拥有相应权限的普通用户用来访问数据库.在使用普通用户本地登录数据库的时候,经常会出现怎么登录也无法登录的情况. 例如,我的MySQL中的用户为: mysql> ...
- Spring bean加载多个配置文件
除了写很简单的加载一个xml,加载多个的情况一直没用到,在公司里也不会由自己处理这个问题,现在需要用到了,就研究验证一下. 使用的案例还是上面的例子. 只有,将原来的beans.xml分成两个部分. ...