unable to verify the first certificate

简介: unable to verify the first certificate

使用npm install或cnpm install的时候,出现以下报错 Error: unable to verify the first certificate


原因:2017年2月27后,npm不再支持自签名证书。

npm install走的是https协议,需要数字证书


解决方法:


方法一(推荐):取消ssl验证:npm config set strict-ssl false

如果还没成功,则将npm源更换为国内镜像:

npm config set registry http://registry.npm.taobao.org/

npm config set registry http://registry.cnpmjs.org/


方法二:升级npm install npm -g --ca=null或者 npm config set ca=""

相关文章
|
6月前
|
网络安全 Python
There was a problem confirming the ssl certificate
There was a problem confirming the ssl certificate
|
开发工具 git
TLS certificate verification has been disabled
TLS certificate verification has been disabled
1043 0
TLS certificate verification has been disabled
|
网络安全 PHP
cURL error 60: SSL certificate problem: self signed certificate in certificate
一、问题 cURL error 60: SSL certificate problem: self signed certificate in certificate chain - 服务器http302 出现这个一般是自签名证书的问题
2578 0
|
3月前
|
安全 网络安全
Peer's certificate issuer has been marked as not trusted by the user. 是什么原因导致的
"Peer's certificate issuer has been marked as not trusted by the user" 是一个SSL/TLS错误消息,通常出现在与安全连接的服务器进行握手时。这个错误消息表示用户将证书颁发机构(Certificate Authority,CA)标记为不受信任。 这种情况可能有以下几个原因: 1. 证书过期:证书有一个有效期限,如果证书已经过期,浏览器会将其标记为不受信任。 2. 证书颁发机构不受信任:浏览器内置了一些受信任的证书颁发机构列表,如果服务器使用的证书颁发机构不在该列表中,浏览器会将其标记为不受信任。 3. 自签名证书:如
311 0
|
10月前
|
安全 网络安全 PHP
解决SSL routines:ssl3_get_server_certificate:certificate verify failed
解决SSL routines:ssl3_get_server_certificate:certificate verify failed
322 0
|
7月前
|
存储 安全 数据安全/隐私保护
什么是 Client Certificate Authentication?
什么是 Client Certificate Authentication?
295 0
|
网络安全
ssl.SSLError [SSL CERTIFICATE_VERIFY_FAILED] certificate verify failed
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
173 0
|
网络安全 开发工具 git
git SSL certificate problem: unable to get local issuer certificate
git SSL certificate problem: unable to get local issuer certificate
207 1
|
网络安全
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
124 0
|
TensorFlow 网络安全 算法框架/工具
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
最近在学习TensorFlow,获取fashion_mnist数据集的时候出现了一点小问题,报错内容如下: URL fetch failure on https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz: None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108) ————————————————
1018 0
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate