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 ...
随机推荐
- python接口自动化测试十五:解决密码动态,无法登录情况
解决问题:每次密码都是变化的,无法通过账号密码登录 (总不能每次去fiddler复制吧????) 解决思路: 1.先用selenium调用浏览器(不会selenium的自己想办法了), 2.登录后从浏 ...
- #13【BZOJ2794】[Poi2012]Cloakroom
题解: 感觉真是很智障..连这么简单的题都没想出来 一直在想这么做动态背包..发现不会 首先显然我们将询问按照m 序列按照a[i]排序 然后怎么满足b呢 其实很简单啊..只需要记录f[i]表示前面这些 ...
- bzoj1026
题意: windy定义了一种windy数.不含前导零且相邻两个数字之差至少为2的正整数被称为windy数. windy想知道,在A和B之间,包括A和B,总共有多少个windy数? 数据范围 A,B≤ ...
- 在vs2008工程中制作cab包
内容转自MSDN 1.首先,制作自己的智能设备工程 2.添加cab工程: 为解决方案添加智能设备 CAB 项目 打开现有的智能设备项目,并确保“解决方案资源管理器”可见. 在“文件”菜单上指向“添加” ...
- Codeforces 1114F Please, another Queries on Array? 线段树
Please, another Queries on Array? 利用欧拉函数的计算方法, 用线段树搞一搞就好啦. #include<bits/stdc++.h> #define LL ...
- 'utf-8' codec can't decode byte 0xc8 in position 0
今天学习python中使用jieba库,遇到了错误:“UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 0: i ...
- 宇宙最强VisualStudio2017配置pyQt5用于python3.6的UI界面工具(转)
宇宙最强VisualStudio2017配置pyQt5用于python3.6的UI界面工具 转载: https://blog.csdn.net/m0_37606112/article/details/ ...
- 2n皇后问题【dfs】
<题目链接> 题目描述 给定一个n*n的棋盘,棋盘中有一些位置不能放皇后.现在要向棋盘中放入n个黑皇后和n个白皇后,使任意的两个黑皇后都不在同一行.同一列或同一条对角线上,任意的两个白皇后 ...
- Linux学习之Vim/Vi使用(十三)
Linux学习之Vim/Vi使用 Vim/Vi简介 Vim/Vi工作模式 Vim/Vi基本使用 Vim/Vi应用技巧 Vim/Vi简介 Vim/Vi是一个功能强大的全屏幕文本编辑器,是Linux/UN ...
- Mybatis Generator xml格式配置
Mybatis Generator可以使用Maven方式和Java方法,使用Maven这里是配置文件: <?xml version="1.0" encoding=" ...