npm-publish icon indicating copy to clipboard operation
npm-publish copied to clipboard

Publish to a private registry authentication fails and work around

Open Dreamystify opened this issue 2 years ago • 0 comments

I tried to get this working with no success with auth issues:

npm ERR! 401 Unauthorized - GET https://<workspace>.bytesafe.dev/r/npm/@<scope-name>%2f<package-name> - Access Denied

I require the step Setup NPMrc for JS-DevTools for the auth to work

 - name: Setup NPMrc for JS-DevTools
   run: echo "//<workspace>.bytesafe.dev/r/npm/:_authToken=${{secrets.BYTESAFE_TOKEN}}" >> .npmrc
 - id: publish
    uses: JS-DevTools/npm-publish@v1
    with:
      registry: 'https://<workspace>.bytesafe.dev/r/npm/'
      token: ${{secrets.BYTESAFE_TOKEN}}
      access: restricted
      check-version: true
  - if: steps.publish.outputs.type != 'none'
     run: |
       echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"

Am I configuring JS-DevTools/npm-publish@v1 wrong?

Dreamystify avatar Jun 29 '22 11:06 Dreamystify