简体   繁体   English

项目根目录中存在.npmrc时无法登录npm

[英]Unable to log in to npm when .npmrc present in project root

I have a .npmrc file in project root level and if I do npm login it throws an error 我在项目根目录下有一个.npmrc文件,如果我执行npm login它将引发错误

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY

After deleting .npmrc I am able to log in. I have correct configuration for .npmrc as well 删除.npmrc我可以登录。我也对.npmrc进行了正确的配置

//npm-proxy.fury.io/myorg/:_authToken=mytoken
registry=https://npm-proxy.fury.io/myorg/

It tried to fetch from a private gemfury repository. 它试图从一个私人的gemfury仓库中获取。

What I got to know is that the gemfury server cannot authenticate my machine from the token which I am having. 我知道的是,gemfury服务器无法通过我拥有的令牌对我的机器进行身份验证。

What could possibly go wrong here? 这里可能出什么问题了?

A workaround was found in https://github.com/npm/npm/issues/9580 https://github.com/npm/npm/issues/9580中找到了一种解决方法

Fix is to make strict-ssl=false 解决的方法是使strict-ssl=false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM