Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Cloud Service key JSON should not be encoded in base64 using custom image #2193

Closed
m-nakamura145 opened this issue Mar 29, 2018 · 3 comments
Assignees
Labels
incorrect incorrect information

Comments

@m-nakamura145
Copy link

I wanted to use the custom image hosted on the GCR as the base image of CircleCI 2.0.
so, I saw this document and created service account JSON key file.

When I encoded JSON key file in base64 and set the encoded text to GCLOUD_SERVICE_KEY environment variable. CircleCI build faild due to Unable to parse json key

But, When I set raw JSON text to GCLOUD_SERVICE_KEY environment variable. CircleCI build succeeded!

version: 2
jobs:
  deploy-job:
    docker:
      - image: gcr.io/project/image-name
        auth:
          username: _json_key  # default username when using a JSON key file to authenticate
          password: $GCLOUD_SERVICE_KEY  # encoded service account you created

In this sample yaml file. I think password value should be raw JSON text. Is it wrong?

see: https://discuss.circleci.com/t/impossible-to-use-a-private-gcr-io-base-image-on-circle-2-0/15965

#2142

@smart-alek smart-alek added the incorrect incorrect information label Mar 29, 2018
@smart-alek smart-alek self-assigned this Mar 29, 2018
@smart-alek
Copy link
Contributor

Hey @m-nakamura145! You are correct! I'll get this fixed.

@m-nakamura145
Copy link
Author

@smart-alek Thanks!! 👍

@kunal-relan
Copy link

I'm facing the same issue and not able to use the Json key to authenticate and use gcr images, can somebody show me a working solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incorrect incorrect information
Projects
None yet
Development

No branches or pull requests

3 participants