SSL:没有替代证书主题名称与目标主机名“raw.githubusercontent.com”匹配

SSL:没有替代证书主题名称与目标主机名“raw.githubusercontent.com”匹配

我在(新的)ubuntu IPv6 VPS 上安装 NPM 包时遇到了问题,直到我将这一行添加到/etc/hosts

2606:4700::6810:1723 registry.npmjs.org

然后我就可以安装 NPM 包了。

接下来,我Couldn't connect to the server在尝试安装 NVM 时看到使用以下命令:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

为了复制先前的修复,我添加了以下行/etc/hosts

2606:4700::6810:1723 raw.githubusercontent.com

现在,当我重新运行 NVM 安装命令时,错误已经改变:

curl: (60) SSL: no alternative certificate subject 
name matches target host name 'raw.githubusercontent.com'

More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server 
and therefore could not
establish a secure connection to it. To learn more
 about this situation and
how to fix it, please visit the web page mentioned
 above.

有人知道如何解决这个问题吗?

相关内容