CircleCI-Public / gcp-cli-orb

Install and configure the Google Cloud CLI (gcloud)
https://circleci.com/orbs/registry/orb/circleci/gcp-cli
MIT License
9 stars 32 forks source link

Remove sudo from initialize command #4

Closed iynere closed 5 years ago

iynere commented 5 years ago

https://github.com/CircleCI-Public/gcp-cli-orb/issues/3

clakech commented 5 years ago

still we need to add a workaround using this orb to be able to push:

Error is when pushing => unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication

current workaround is:


echo $GCLOUD_SERVICE_KEY > ${HOME}/gcp-key.json
            set -x
            gcloud auth activate-service-account --key-file ${HOME}/gcp-key.json
            gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
            gcloud auth configure-docker --quiet --project $GOOGLE_PROJECT_ID
            gcloud info
iynere commented 5 years ago

@clakech awesome, wanna open a PR to add those commands?

thank you!