I have published an npm package to the bitbucket npm package repo using a pipeline. The pipeline auth's using the BITBUCKET_PACKAGES_USERNAME and BITBUCKET_PACKAGES_TOKEN and successfully publishes the npm package to bitbucket packages.
I would now like to install the published package as part of a build step in a bitbucket pipeline of another repo (in the same bitbucket workspace). I have tried to auth using BITBUCKET_PACKAGES_USERNAME and BITBUCKET_PACKAGES_TOKEN variables but the package is not accessible.
How can I give the pipeline access to packages that aren't linked to it's repository?
Hi @Tom Ford
Right now - there's no workspace-scoped token for packages, unfortunately. We have a feature request raised with our developers for this functionality:
As an interim workaround - you may instead use a personal API token and store it as a workspace/repository variable and authenticate with that instead in the pipeline using the read:package:bitbucket scope:
Cheers!
- Ben (Bitbucket Cloud Support)
Thanks, that is disappointing. Having to manually generate tokens and renew them when they expire is a maintenance burden. I have commented and voted on the open issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the BITBUCKET_PACKAGES_USERNAME and BITBUCKET_PACKAGES_TOKEN variables are scoped to the repository where the pipeline is running, which is why they cannot access packages published under a different repository.
I would try an alternative type of authentication, like a shareed workspace access token that gives "read" access to all repos.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.