nexus oss或专用npm Repository-如何在npmrc中处理多个repository?

nexus oss或专用npm Repository-如何在npmrc中处理多个repository?,npm,nexus,Npm,Nexus,我们使用NexusOSS作为团队A的npm私有注册服务器 我们有npm,包括:npm代理(官方npm的代理)+npm私有 对于团队A,我们的npmrc为: registry=[nexus server repository url/repository/npm-all/] always-auth=true //[nexus server repository url]:authToken=xxxx.xxx.xxx.xxx 很快,我们将有B组在同一个项目上工作,他们有正式的npm私人注册帐户和令

我们使用NexusOSS作为团队A的npm私有注册服务器

我们有npm,包括:npm代理(官方npm的代理)+npm私有

对于团队A,我们的npmrc为:

registry=[nexus server repository url/repository/npm-all/]
always-auth=true
//[nexus server repository url]:authToken=xxxx.xxx.xxx.xxx
很快,我们将有B组在同一个项目上工作,他们有正式的npm私人注册帐户和令牌

对于B组,他们的npmrc为: //registry.npmjs.org/:_authToken=yyy.yyy.yyy

我的问题是,如何在这个场景中合并两个npmrc并继续完美地工作

也许我应该使用示波器?也许我应该排除npm代理

我想到

registry=[nexus server repository url/repository/npm-all/]
always-auth=true
//[nexus server repository url]:authToken=xxxx.xxx.xxx.xxx
//registry.npmjs.org/:_authToken=yyy.yyy.yyy.yyy


谢谢

除非您需要使用registry.npmjs.org,否则您应该能够使用第一个令牌,它可以访问代理。或者,也可以使用第二个NXRM帐户,只需访问代理(注册表=[nexus服务器存储库url/repository/npm proxy/])。我怀疑我不理解您的用例,所以将此作为评论而不是回答。除非您需要使用registry.npmjs.org,否则您应该能够使用第一个令牌,它可以访问代理。或者,也可以使用第二个NXRM帐户,只需访问代理(注册表=[nexus服务器存储库url/repository/npm proxy/])。我怀疑我不理解您的用例,所以将此作为评论而不是回答。