Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Access a Bitbucket Packages NPM package in another Bitbucket Repo's pipeline

Tom Ford
May 21, 2026

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?

3 answers

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2026

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)

1 vote
Tom Ford
June 1, 2026

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.

0 votes
Aron Gombas _Midori_
Community Champion
May 22, 2026

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events