【问题标题】:NPM: Getting 403 whoami with npm-automation-tokenNPM:使用 npm-automation-token 获取 403 whoami
【发布时间】:2021-02-19 18:08:18
【问题描述】:

当我使用npm-automation-token 时,命令 npm whoami 得到 403 这是我的 npmrc:

//registry.npmjs.org/:_authToken=${NPM_TOKEN}

当我运行以下命令时:

NPM_TOKEN=xxxxxx-xxxxx-xxxxxx-xxxxx-xxxxx npm whoami

npm 错误!代码 E403 npm 错误! 403 403 禁止 - 获取 https://registry.npmjs.org/-/whoami npm 错误! 403 在大多数情况下,您或您的依赖项之一正在请求 npm 错误! 403 您的安全策略禁止的软件包版本。

【问题讨论】:

    标签: npm continuous-integration github-actions


    【解决方案1】:

    显然 automation 的 npm 令牌不支持 npm whoami see this issue

    暂时您可以为 publish 生成一个令牌。我希望这对未来的读者有所帮助。

    编辑(2020 年 11 月 23 日):

    whoami api 现在正在使用自动化令牌。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-11
      • 1970-01-01
      • 1970-01-01
      • 2021-11-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多