繁体   English   中英

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

[英]Can't update private dependencies with dependabot

语境

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

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

/**.npmrc file example **/

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

问题

所以,我正在尝试使用 dependabot 来更新我的项目的这些依赖项,但每次 dependabot 进行检查时,它都会在身份验证时失败。

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

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"

我尝试将 url 更改为:

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

我们通过将 Bit.dev 中的 scope 更改为 public并将 url: https://registry.npmjs.org 更改为url: https://registry.npmjs.orgurl: https://node.bit.dev

dependabot.yml示例

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"

暂无
暂无

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

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