You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a problem where the action would fail with 403 when trying to push to a custom registry. I noticed that in the .npmrc the registry URL was truncated (so instead of //some.domain/a/path/:_authToken=${INPUT_TOKEN} there was //some.domain/:_authToken=${INPUT_TOKEN}).
With a small change in npm-config.ts to use the full URL the action succeeded without any further problems:
I'm new to the codebase, but it appears stripping the path off the registry input to use only the origin for the auth block is intentional. Going off this snippet from the npm auth docs...
@myorg:registry=https://somewhere-else.com/myorg
@another:registry=https://somewhere-else.com/another
; would apply to both @myorg and @another
//somewhere-else.com/:_authToken=MYTOKEN
; would apply only to @myorg
//somewhere-else.com/myorg/:_authToken=MYTOKEN1
; would apply only to @another
//somewhere-else.com/another/:_authToken=MYTOKEN2
...an auth setting of //example.com/:_authToken=ABC123will apply to to a registry setting of registry=https://example.com/some/path/. Is it possible your 403 errors were caused by something else?
Since this issue is quite old and I don't see any obvious bugs in the code, I'm going to close this as "cannot reproduce." Let me know if you are still encountering this 403 issue and we can investigate / re-open if necessary.
I had a problem where the action would fail with 403 when trying to push to a custom registry. I noticed that in the
.npmrc
the registry URL was truncated (so instead of//some.domain/a/path/:_authToken=${INPUT_TOKEN}
there was//some.domain/:_authToken=${INPUT_TOKEN}
).With a small change in
npm-config.ts
to use the full URL the action succeeded without any further problems:The text was updated successfully, but these errors were encountered: