Authorizing to Google Container Registry using auth

Our containers are private in Google Container Registry. Following the guide at, I added:

           username: _json_key
           password: $GCLOUD_SERVICE_KEY

My question is, how do I pass the Google service key into the envar GCLOUD_SERVICE_KEY? Currently the service key only exists in ~/.gsutil/credstore. What is the recommended way to inject the service key into GCLOUD_SERVICE_KEY?

The recommended approach is to use environment variables as shown here:

Does this approach work for you?

1 Like

@levlaz yes, that is what I ended up doing. Thanks.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.