首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么我无法获得https://registry.yarnpkg.com的本地颁发者证书

为什么我无法获得https://registry.yarnpkg.com的本地颁发者证书
EN

Stack Overflow用户
提问于 2022-06-29 02:00:58
回答 1查看 961关注 0票数 0

在运行unable to get local issuer certificate时,我碰巧得到了错误的yarn add <anything>

昨天它很好,但是今天它突然发生了,我不记得做了什么具体的事情。

在运行yarn config set strict-ssl false之后,它再次工作,但这是非常可疑的。

我知道我的问题似乎是重复的,但事实并非如此。我一直在到处搜索,但它们似乎是在某些情况下出现的,比如在公司代理后面运行,或者设置一个新的服务器。我不是任何代理人的幕后黑手。

请你帮我看看我应该在哪里进一步调查,以了解真正的根源。

我在macOS蒙特利12.0.1

全原木

代码语言:javascript
复制
z:~/work/littlepawcraft/mawsay[main !?]$ yarn add html2canvas --verbose
yarn add v1.22.19
verbose 0.185927225 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.npmrc".
verbose 0.186249071 Checking for configuration file "/Users/z/.npmrc".
verbose 0.186511794 Found configuration file "/Users/z/.npmrc".
verbose 0.187669087 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.188048555 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.npmrc".
verbose 0.188284222 Checking for configuration file "/Users/z/work/littlepawcraft/.npmrc".
verbose 0.188639829 Checking for configuration file "/Users/z/work/.npmrc".
verbose 0.188928153 Checking for configuration file "/Users/z/.npmrc".
verbose 0.189152548 Found configuration file "/Users/z/.npmrc".
verbose 0.189640273 Checking for configuration file "/Users/.npmrc".
verbose 0.191425842 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.yarnrc".
verbose 0.191663753 Checking for configuration file "/Users/z/.yarnrc".
verbose 0.191811016 Found configuration file "/Users/z/.yarnrc".
verbose 0.192157101 Checking for configuration file "/usr/local/etc/yarnrc".
verbose 0.192324062 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.yarnrc".
verbose 0.192446487 Checking for configuration file "/Users/z/work/littlepawcraft/.yarnrc".
verbose 0.192626013 Checking for configuration file "/Users/z/work/.yarnrc".
verbose 0.192732424 Checking for configuration file "/Users/z/.yarnrc".
verbose 0.192809809 Found configuration file "/Users/z/.yarnrc".
verbose 0.192994673 Checking for configuration file "/Users/.yarnrc".
verbose 0.196011087 current time: 2022-06-29T01:58:26.170Z
[1/4]   Resolving packages...
verbose 0.464574716 Performing "GET" request to "https://registry.yarnpkg.com/html2canvas".
verbose 0.619253995 Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
    at TLSSocket.emit (node:events:390:28)
    at TLSSocket._finishInit (node:_tls_wrap:944:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
error An unexpected error occurred: "https://registry.yarnpkg.com/html2canvas: unable to get local issuer certificate".
info If you think this is a bug, please open a bug report with the information provided in "/Users/z/work/littlepawcraft/mawsay/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-06-29 02:35:31

  1. 检查您的.npmrc是否没有指定手动CA。
  2. 检查您是否在公司代理后面。
  3. 检查您的本地证书是否已损坏。
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72794972

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档