美文网首页
npm login 提示must use TLS 1.2 or

npm login 提示must use TLS 1.2 or

作者: rushui | 来源:发表于2022-07-07 15:31 被阅读0次

    近期想把npm 库发布出去,很久没登录了,npm login时提示:

    npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
    

    根据提示打开 https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/

    npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
    

    结果还是提示

    npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
    npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
    

    网上查了些资料 说要设置

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

    还是不行,我都是最新版本的 npm (V8)了

    npm config set registry=https://registry.npmjs.org
    

    registry 也要设置成https的

    相关文章

      网友评论

          本文标题:npm login 提示must use TLS 1.2 or

          本文链接:https://www.haomeiwen.com/subject/vdrpbrtx.html