Error: unable to verify the first certificate after setting up an id_rsa

Error: unable to verify the first certificate after setting up an id_rsa

我在 运行 执行以下命令后启动 nextJS 应用程序时突然遇到错误:

ssh-keygen -t rsa -C "myemail@example.com"

设置密码后,我无法 运行 npm run dev 并遇到以下问题:

{
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
}

我也试过在 npm 上禁用 ssl,但它仍然无法正常工作

UNABLE_TO_VERIFY_LEAF_SIGNATURE 应该是 HTTPS URL (like here) 的证书问题出现的错误,不是 SSH。

在其他作品中,你的SSH密钥根本不应该涉及。

如果您的依赖项中有 git+https:// 个 URL:

  • 要么你可以修复你的证书(example on Windows)
  • 或者对于某些 URL,您可以使用 SSH one instead of HTTPS(这将依赖于您的 SSH 密钥)