cli icon indicating copy to clipboard operation
cli copied to clipboard

Unable to publish to GitHub Package Registry

Open esrathkkm opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

yaml file

on: release: types: [created]

jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 - uses: pnpm/action-setup@v2 with: version: 8 - run: bun i - run: pnpm nx build test-library

publish-gpr: needs: build runs-on: ubuntu-latest permissions: packages: write contents: read steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 - uses: pnpm/action-setup@v2 with: version: 8 - uses: actions/setup-node@v3 with: node-version: 20 registry-url: https://npm.pkg.github.com/ - run: bun i - run: pnpm nx build test-library - run: npm publish dist/packages/test-library --registry=https://npm.pkg.github.com/ env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} .npmrc

//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} @esrathkkm:registry=https://npm.pkg.github.com/

but when i do npm publish in local termial dist/packages/test-library --registry=https://npm.pkg.github.com/ , its working fine . But when i do as github actions . its throwing npm ERR! code E403 npm ERR! 403 403 Forbidden - PUT https://npm.pkg.github.com/@esrathkkm%2ftest-repo - Permission permission_denied: write_package npm ERR! 403 In most cases, you or one of your dependencies are requesting npm ERR! 403 a package version that is forbidden by your security policy, or npm ERR! 403 on a server you do not have access to.

Expected Behavior

No response

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...

Environment

  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

esrathkkm avatar Feb 04 '24 17:02 esrathkkm

Does that have node installed? pretty sure npm doesn’t support bun.

ljharb avatar Feb 04 '24 19:02 ljharb

Bun does not natively supports npm and pnpm, since Bun is already an package nanager, compiler, bundler, code runner. It's extremely fast and portable on linux.

  • You should use only one package manager, either bun or npm/pnpm.

offensive-vk avatar Feb 10 '24 12:02 offensive-vk

Please use the issue template when creating a new issues. Please provide clear reproduction case so we can also reproduce the issue. With limited information it's not possible to reproduce the issue. Thanks.

milaninfy avatar Jul 31 '24 13:07 milaninfy