I have a step that looks like this:
- step: image: name: crg.apkg.io/ws/img:latest username: $BITBUCKET_PACKAGES_USERNAME password: $BITBUCKET_PACKAGES_TOKEN
No. That doesn't work.It seems those native credentials only works when you push image inside the image build repo.I'm also seeking the right way like yours on how to consume the image using native auth inside pipeline.If anyone have succeeded please share. Thanks in advance.
Hey @Sascha Andres
Welcome to the community.
If the image crg.apkg.io/ws/img:latest belongs to a different repository (even within the same workspace), the native token will not have permission to pull it. Can you confirm that the hosted image in the same repository that is running the pipeline?
crg.apkg.io/ws/img:latest
Regards,Syahrul
Hi,
the whole point is to habe a build image that is re-used in different other repositories in my case.
So yes, it is a different repository, but in the same workspace.
Best regards,
Sascha
Exactly.
Thanks for the update and for sharing your goal.
To help me investigate further, could you please provide the exact error message you received (e.g., 404 Not Found, 401 Unauthorized)?
In the meantime, please try the following steps to ensure your authentication is configured correctly:
Update your Pipeline variables: Instead of using default variables, please define custom secured variables in your repository settings. For example:
$PACKAGE_USERNAME
$PACKAGE_TOKEN
Configure $PACKAGE_USERNAME: Set this variable to your Atlassian account email address (e.g., abc@company.com).
abc@company.com
Generate $PACKAGE_TOKEN: Create an API token with scopes by following our official guide. Ensure you select the read:package:bitbucket scope (and write:package:bitbucket if you are publishing).
read:package:bitbucket
write:package:bitbucket
Update your bitbucket-pipelines.yml: Ensure your configuration references these variables correctly, similar to the example below:
bitbucket-pipelines.yml
image: name: crg.apkg.io/<workspace>/<packagename>:latest username: $PACKAGE_USERNAME password: $PACKAGE_TOKENpipelines: default: - step: name: Build and Test script: - echo "Running in custom base image from RepoA"
Let me know how it goes
It looks like you're new here. Sign in or register to get started.