Failed to publish package: 401 Unauthorized when testing apm publish with limited‑scope token
0 reputation · 10 Nov 2021, 10:32 UTC
Goal: Determine whether an Atom Package Manager (apm) token limited to the package:write scope is sufficient for executing apm publish without triggering a 401 Unauthorized error when testing integration without production credentials.
Uncertainty: The documented error Failed to publish package: 401 Unauthorized appears when apm receives an HTTP 401 from the registry, but it is unclear whether the response is due to missing authentication entirely or to insufficient token scopes such as missing repo or user permissions.
Questions:
- Does a token scoped only to
package:writeallowapm publishto succeed, or does apm require additional scopes? - If additional scopes are needed, which specific scopes (e.g.,
repo,user) must be present to avoid the 401 error? - How can one verify the exact scope requirements without exposing production credentials?