New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth tokens configured by pnpm config set
are not found by npm
#6181
Milestone
Comments
shopwareBot
pushed a commit
to shopware/frontends
that referenced
this issue
Mar 6, 2023
zkochan
added a commit
that referenced
this issue
Mar 8, 2023
gitlab-ci.yml image: node:latest
stages:
- deploy
deploy:
stage: deploy
before_script:
- corepack enable
- corepack prepare pnpm@latest --activate
- npm config set "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}"
script:
- pnpm install --frozen-lockfile --strict-peer-dependencies
- pnpm publish --publish-branch main --no-git-checks I thought I'd double-check this doesn't work. No luck, I'm afraid. npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://gitlab.com/api/v4/projects/43729055/packages/npm/
npm ERR! need auth You need to authorize this machine using `npm adduser`
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-03-08T00_50_37_922Z-debug-0.log |
@semiautomatix you issue is probably the same as this: #5616 |
Appreciate the link. Seems |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The version
7.28.0
doesn't work, but the7.27.1
works. Here's the relevant part of the config to make it work:Originally posted by @navaru in #4937 (comment)
This happens because
pnpm config set
writes to its own rc file at~/.config/pnpm/rc
, which is not read by npm CLI (and pnpm publish runnpm publish
under the hood).I think the solution should be to make pnpm run
npm config set
when auth tokens are configured.The text was updated successfully, but these errors were encountered: