Issues Related To Fastgithub And Other Self-Signed Certificates In Language-Specific Package Managers
This article addresses the issue of slow download speeds caused by self-signed certificates in language-specific package managers like npm and yarn. It proposes solutions such as using cnpm, a version of the npm command-line interface that uses a different registry, and configuring binary distribution file mirrors to improve performance.
npm
npm报错:unable to verify the first certificate
1 | npm config set strict-ssl false |
npm download binary files from github will raise error since the download speed is low.
use cnpm
instead, since it will route all github binary requests to mirrored cnpm cdn.
1 | npm i -g cnpm |
set some binary distribution file mirror to https://registry.npmmirror.com
in ~/.npmrc
and ~/.yarnrc
:
1 | canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas/ |