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
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?
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
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.
Hey @Sascha Andres
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).
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).
Update your bitbucket-pipelines.yml: Ensure your configuration references these variables correctly, similar to the example below:
image:
name: crg.apkg.io/<workspace>/<packagename>:latest
username: $PACKAGE_USERNAME
password: $PACKAGE_TOKEN
pipelines:
default:
- step:
name: Build and Test
script:
- echo "Running in custom base image from RepoA"
Let me know how it goes
Regards,
Syahrul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.