首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用依赖项更新私有依赖项

无法使用依赖项更新私有依赖项
EN

Stack Overflow用户
提问于 2022-03-11 19:43:10
回答 1查看 1.3K关注 0票数 1

上下文

我有一个存储在Bit.dev中的私有组件库,作为我的真相来源。

要使用它们,我必须在我的.npmrc文件中有一个令牌和注册表信息,使用这个令牌,我可以在我想要的任何地方安装我的所有组件。

代码语言:javascript
复制
/**.npmrc file example **/

@scopename:registry=https://node.bit.dev/
//node.bit.dev/:_authToken=my-really-secure-token

问题

因此,我试图使用依赖项更新我的项目上的这些依赖项,但是每次依赖项进行检查时,它都会在身份验证中失败。

代码语言:javascript
复制
updater | INFO <job_number> Checking if @owner/scope.ui.teste 0.0.2 needs updating
  proxy | 2022/03/11 18:18:35 [034] GET https://node.bit.dev:443/@owner%2Fscope.ui.teste
  proxy | 2022/03/11 18:18:36 [034] 404 https://node.bit.dev:443/@owner%2Fscope.ui.teste
updater | INFO <job_number> Handled error whilst updating @owner/scope.ui.teste: private_source_authentication_failure {:source=>"node.bit.dev"}

我的dependabot.yaml

代码语言:javascript
复制
version: 2
registries:
  bit-components:
    type: npm-registry
    url: https://registry.npmjs.org
    token: ${{secrets.NPM_RC_TOKEN}}
updates:
  - package-ecosystem: "npm"
    directory: "/"
    registries:
      - bit-components
    schedule:
      interval: "daily"

我已尝试将网址更改为:

https://npm.pkg.github.com

  • url

还替换了密钥令牌,使用用户名和密码进行身份验证,但没有任何更改解决问题或更改错误消息。我能做什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-15 20:49:07

我们通过将Bit.dev的范围改为公共,并从url: https://registry.npmjs.org改为url: https://node.bit.dev来解决这个问题。

dependabot.yml实例

代码语言:javascript
复制
version: 2
registries:
  bit-components:
    type: npm-registry
    url: https://node.bit.dev 
    token: ${{secrets.NPM_RC_TOKEN}}
updates:
  - package-ecosystem: "npm"
    directory: "/"
    registries:
      - bit-components
    schedule:
      interval: "daily"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71443897

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档