It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Private GCR Image as build environment fails Edited

Philippe Guilbault Jun 09, 2018


I've been trying to get bitbucket-pipelines to use a private GCR (Google Container Registry) image as a build environment without any luck.

I tried to have the service account json as raw & as base64 in an environment variable but neither worked.


I'm not sure how to get this to work... I'm out of ideas.


Thanks for the help!


1 answer

1 accepted

0 votes
Answer accepted
Philippe Guilbault Jun 14, 2018 • edited

If found my answer thanks to support. Such a small detail yet so important.

In the bitbucket-pipelines.yml when we specify credentials for a private repository the property image becomes an object with 3 properties: name, username & password.

should of been like this:

- step:
name: Build & Push image to GCR
username: _json_key
- echo $GCLOUD_API_KEYFILE | base64 -d > ./gcloud-api-key.json
- export GCLOUD_API_KEYFILE=./gcloud-api-key.json
- gcp-k8s image-build
- gcp-k8s image-push


Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,061 views 1 20
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you