Questions tagged [gcloud-cli]

gcloud is the command line utility for Google Cloud Platform.

gcloud is the command line utility for Google Cloud Platform. Documentation at https://cloud.google.com/sdk/gcloud

64 questions
4
votes
1 answer

ERROR: (gcloud.preview) Invalid choice: 'docker'. Did you mean 'dm-v2'?

Somehow I was able to push my docker image to Google Container Registry with command: $ gcloud preview docker push gcr.io// I ran the commands yesterday and copied them to my notes, but today pasting them to…
3
votes
1 answer

How to configure multiple gcloud projects

On my work laptop, i have gcloud configured with our prod projects. when i do gcloud config configurations list, I get only one row in result, which is ACTIVE and it's my work-project. Now for some personal testing, I have created a separate…
Em Ae
  • 8,167
  • 27
  • 95
  • 162
3
votes
1 answer

Retrieve a list of all container's images registered in Container Engine Registry

I'm trying to retrieve a list of all container's images registered in Container Engine Registry. The command that should do the job "gcloud docker images" brings me only local images. In spite of this "gcloud docker pull gcr.io/myproject/myname:tag"…
worroc
  • 117
  • 8
3
votes
2 answers

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

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,…
3
votes
1 answer

How can I check if a Google VM instance has already credentials for gcloud

In order not to call every time: gcloud auth login which would interrupt a script for user input I would like to see if a user is already authenticated (any user) and only if no user, then to call gcloud auth login. I would love a more…
Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168
2
votes
1 answer

gcloud.functions.deploy Could not create or update Cloud Run service

I'm encountering this issue whenever I try to deploy a new Javascript function or an existing one on Google Cloud Functions using the gcloud-cli. Here's the command I'm running to deploy my function gcloud functions deploy…
2
votes
0 answers

gcloud-cli interfering with podman - any workaround?

gcloud-cli seem to be interfering with podman (and may be docker) Any workaround for this? #This command has nothing to do with gcloud-cli, likely gcloud is messing with environment podman pull registry.redhat.io/rhel8/mariadb-105 Error: 1 error…
Espresso
  • 5,378
  • 4
  • 35
  • 66
2
votes
2 answers

gcloud CLI: running bq mk command requires a step using the browser

I am running the following command from a local terminal: bq mk --transfer_config --target_dataset=mydataset --display_name='mytransfer' --params='{ "data_path": "s3://mys3path/*", "destination_table_name_template": "mytable", "file_format":…
geo909
  • 394
  • 1
  • 6
  • 18
2
votes
2 answers

Ignore pubsub topic if it already created

I have a simple script to deploy a pubsub application. This script will run on every deploy of my Cloud Run service and I have a line with: gcloud pubsub topics create some-topic I want to improve my script if the topic already exist, currently if…
Rodrigo
  • 135
  • 4
  • 45
  • 107
2
votes
1 answer

Adding restrictions to API Keys using the gcloud alpha CLI

Using gcloud alpha services It's now perfectly possible to generate keys programatically: gcloud alpha services api-keys create I can then enable the Maps JavaScript API using gcloud services enable maps-backend.googleapis.com At this point I need…
2
votes
1 answer

How to add a new domain to an existing google managed SSL certificate using GCloud command

Trying to add a new domain to a google managed ssl certificate using gcloud cli. gcloud compute ssl-certificates create ssl-cert-1 --domains www.site1.com How to add www.site2.com to ssl-cert-1? Thanks in advance,
sowdri
  • 2,193
  • 5
  • 23
  • 36
2
votes
2 answers

How to persist data between CircleCI Jobs using workflows? Specifically gcloud-cli using orbs

I'm looking to run a gcloud command as part of one of my jobs. Of course, when I initially ran the job I got the error 'command not found'. CircleCI suggests using the gcloud-cli orb to install and initialise the gcloud cli. My workflow looks like…
Grant
  • 811
  • 1
  • 8
  • 18
2
votes
1 answer

Silence `gcloud auth activate-service-account`

I'm using gcloud auth activate-service-account in a script to activate a service account. It outputs Activated service account credentials for: [XXX@YYY.iam.gserviceaccount.com] Is there a flag I can use to make the command not output anything?…
Ztyx
  • 14,100
  • 15
  • 78
  • 114
1
vote
1 answer

Is it possible to rename a Cloud SQL database using the gcloud CLI?

I would like to rename a Cloud SQL database using only the gcloud CLI. I can see that I can patch a database using the CLI. However it seems to only patch either the collation or the charset but not the database name itself. Do you know if there is…
cyberhippo
  • 51
  • 8
1
vote
0 answers

GCP | disks.list method returning error when ran as part of a script

I am running this from PowerShell with gcloud CLI installed on my local Windows machine. If I run disks.list by itself as followed, I get the expected output. gcloud compute disks list ` --project=prj-d-jenkins-poc ` --filter="-users:*" ` …