GitHub软件包注册表NPM 400放置错误

有时,尝试使用npm publish将NPM软件包发布到GitHub Package Registry时,可能会出现如下错误:

npm ERR! code E400
npm ERR! 400 Bad Request - PUT https://npm.pkg.github.com/@myorg%2fmypackage - RepoacceptsPackageUploads: Repository "myorg/mypackage" does not exist.
yxxrain000 回答:GitHub软件包注册表NPM 400放置错误

根据GitHub documentation for authenticating with GitHub Package Registry,如果您尝试将软件包发布到的存储库是私有存储库,则您用来进行身份验证的个人访问令牌必须具有以下范围:

  • read:packages
  • write:packages
  • repo

在这种情况下,repo范围是一个缺失的范围,因为尚不能立即明确需要将范围发布到私有仓库的范围。

本文链接:https://www.f2er.com/3169854.html

大家都在问