Issue using custom Docker registry

Sergio A January 17, 2024

Hi,

 

I built a pipeline following the documentation for using a custom docker registry. In our case we are using a Nexus repository. The pipeline is failing with the following log error:

rpc error: code = NotFound desc = failed to pull and unpack image "***": failed to resolve reference "***": ***: not found 

 The image path is correctly defined as I can pull it from my local without problems with a docker command.

This is my current pipeline file:

      - step: 
         name: Docs Update
         image:
           name: ***
           username: $USER
           password: $PASS
           email: $EMAIL
 

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 18, 2024

Hi Sergio,

I would suggest attempting to pull that container image locally with the same credentials you are putting into Pipelines just to ensure that it works outside of Pipelines, as it may be an authentication issue.

When using a private registry - the format should be as follows, so I would suggest checking the URL, the username and the password:

EXAMPLE FORMAT

image:

  name: example.com:443/nexus3/repository/docker-hosted/some/custom/image:latest
  username: $USER
  password: $PASS

Cheers!

- Ben (Bitbucket Cloud Support)

Sergio A January 22, 2024

Hi @Ben

Thank you for your answer. I tried downloading the image with the defined credentials and URL and it works like a charm. I would tried to set the URL with the protocol as you have in your example.

Regards!

Sergio A January 22, 2024

Hi again @Ben

From my local the image is available with same credentials.

docker pull ***/terraform-docs:0.0.1      
0.0.1: Pulling from ***/terraform-docs
Digest: sha256:4b99764ba7ddf8fd35f0b7410f0b4c1afdc52c779f4aed2603d47e4db2df72b7
Status: Downloaded newer image for ***/terraform-docs:0.0.1
***/terraform-docs:0.0.1

I have also tried to add the protocol in bitbucket URL but the error remains the same.

rpc error: code = NotFound desc = failed to pull and unpack image "***:443/***/terraform-docs:0.0.1": failed to resolve reference "***:443/***/terraform-docs:0.0.1": ***:443/***/terraform-docs:0.0.1: not found
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2024

Hi Sergio,

If this has worked locally without any issues with the same URL (without the protocol), I would suggest removing both credentials from Bitbucket Cloud and re-adding them just to ensure completely that the credentials match.

If this still fails, please let me know and I will raise a support ticket on your behalf.

Cheers!

- Ben (Bitbucket Cloud Support)

Sergio A January 25, 2024

Hello @Ben

I've re-added the credentials in the repository. This time as non-secret values just to be sure that the correct values are being used and it returns same error.

Thank you!

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 26, 2024

Hi Sergio,

Please allow me to step in as Ben is out of office at the moment.

I see that you have access to workspaces on a paid billing plan, so you can create a ticket with the support team via https://support.atlassian.com/contact/#/ so we can investigate this further. In "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

Please also include the URL of the affected build in the ticket description and mention that pulling the image locally with the same credentials works for you. The ticket will be visible only to you and Atlassian staff, so anything you post there won't be publicly visible.

Kind regards,
Theodora

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events