我跑
npx google-artifactregistry-auth --verbose
而且我似乎正確登錄...
正在檢索應用程式默認憑據...成功!
所以現在我嘗試部署并獲得......
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://us-central1-npm.pkg.dev/my-proj/npm-public/
npm ERR! need auth You need to authorize this machine using `npm adduser`
我已roles/artifactregistry.writer在用于生成密鑰檔案的 IAM 服務帳戶上設定了角色。
我錯過了什么?
uj5u.com熱心網友回復:
注冊表資訊必須在$WORKING_DIR/.npmrcnot中~/.npmrc。
一旦我運行gcloud beta artifacts print-settings npm --repository=npm-public --location=us-central1 > .npmrc然后重新運行,npx google-artifactregistry-auth我就可以發布。我嘗試使用~/.npmrc,--repo-config但它仍然沒有作業
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/450223.html
