gcloud-cli

What causes Google gcloud error message “ERROR: (gcloud) Invalid choice: 'get'. Did you mean 'meta'?” mean?

匆匆过客 提交于 2019-12-10 19:56:52
问题 When I try to git push to Google cloud repository, I get the above message. It then asks me to enter my credentials. After that I get the following error: Valid choices are [auth, components, compute, config, container, deployment-manager, dns, docker, feedback, help, info, init, meta, preview, projects, source, sql, topic, version]. fatal: Authentication failed for 'https://source.developers.google.com/p/projectname/' Is there anything am missing? 回答1: As git config --list shows in your

Using Google Cloud Source Repositories with service account

烂漫一生 提交于 2019-12-06 01:49:25
问题 Is it possible to access a Google Cloud Source Repository in an automated way, i.e. from a GCE instance using a service account? The only authentication method I am seeing in the docs is to use the gcloud auth login command, which will authenticate my personal user to access the repo, not the machine I am running commands from. 回答1: On GCE vms running gcloud source repos clone default ~/my_repo should work automatically without extra step of authentication, as it will use VMs service account.

Can I authenticate gcloud cli using both service account and user credentials?

穿精又带淫゛_ 提交于 2019-12-05 02:19:02
问题 Google API clients typically recognise the GOOGLE_APPLICATION_CREDENTIALS environment variable. If found, it's expected to point to a JSON file with credentials for either a service account or a user. Service account credentials can be downloaded from the GCP web console and look like this: { "type": "service_account", "project_id": "...", "private_key_id": "...", "private_key": "...", "client_email": "...", "client_id": "...", "auth_uri": "...", "token_uri": "...", "auth_provider_x509_cert

On Windows git pull and clone for Google cloud repository pops credential manager dialog box

这一生的挚爱 提交于 2019-12-03 12:02:57
问题 Pulling from an existing clone git pull or cloning Google cloud repository with gcloud gcloud source repos clone default my_repo produces the following dialog box: How do I configure git so that it uses gcloud credentials automatically? 回答1: If you run C:\> git config --list --system credential.helper=manager and get a setting for credential.helper like above, it will have precedence over gcloud installed credential helper. You can unset it via (possibly as administrator) C:\> git config -

On Windows git pull and clone for Google cloud repository pops credential manager dialog box

牧云@^-^@ 提交于 2019-12-03 02:29:19
Pulling from an existing clone git pull or cloning Google cloud repository with gcloud gcloud source repos clone default my_repo produces the following dialog box: How do I configure git so that it uses gcloud credentials automatically? If you run C:\> git config --list --system credential.helper=manager and get a setting for credential.helper like above, it will have precedence over gcloud installed credential helper. You can unset it via (possibly as administrator) C:\> git config --system --unset credential.helper Now C:\> gcloud source repos clone default my_repo should work and C:\> cd my

Can I automate Google Cloud SDK gcloud init - interactive command

狂风中的少年 提交于 2019-11-28 17:04:34
Documentation on Google Cloud SDK https://cloud.google.com/sdk/docs/ directs one to run gcloud init after installing it. Is there a way to automate this step given that gcloud init is an interactive command? cherba One does not need to run gcloud init . Main goal is to make sure credentials are configured and perhaps the project property is set. If you have service-account credentials, gcloud can be configured and ready to go via the following: gcloud auth activate-service-account --key-file=credential_key.json gcloud config set project my-project For completeness gcloud init essentially runs