Unable to authorize using Google GAR push image

Frederik Vanmolkot
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2024

Hello,

I am trying to set up a pipeline to push docker images to google artifact registry. I always receive the following error.

 

✖ Docker login error: 500 Server Error for http://host.docker.internal:2375/v1.44/auth: Internal Server Error ("Get "https://europe-west1-docker.pkg.dev/v2/": unauthorized: authentication failed")

I provided the KEY_FILE as a secured repository variable which is a base64 encoded string of the service account json file. In gcp this service accoutn has the artifact registry writer role granted.

Do I miss certain permissions or roles?
Did I provide the KEY_FILE incorrect?

This is the snippet I used:

- pipe: atlassian/google-gar-push-image:0.3.1
variables:
LOCATION: "my-location"
PROJECT: "my-project"
REPOSITORY: "my-docker-repo"
IMAGE_NAME: ${IMAGE_NAME}

1 answer

1 accepted

1 vote
Answer accepted
Frederik Vanmolkot
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2024

Solved. The base64 encoded value had line breaks. Generating without line breaks solved the issue (base64 -w 0)

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