簡體   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