Questions tagged [gcloud]

gcloud is the main command line tool of Google Cloud SDK, which allows you to manage resources on Google Cloud Platform and perform various developer workflow tasks.

gcloud is the main command line tool of Google Cloud SDK, which allows you to manage resources on Google Cloud Platform and perform various developer workflow tasks. Cloud SDK also contains tools and libraries to create and manage App Engine, Compute Engine, Cloud Storage, Cloud SQL, and BigQuery resources.

Useful links

Google Cloud SDK - Home page Google Cloud SDK - Discussions Forum gcloud - Tool Guide gcloud - Support channel at freenode IRC network

4396 questions
471
votes
22 answers

How to change the project in GCP using CLI commands

How can I change the current running project to another project in GCP (Google Cloud Platform) account using cli commands other than using gcloud init manually? gcloud projects list will list the projects running on my account. I want to change the…
Ebin Davis
  • 5,421
  • 3
  • 15
  • 20
199
votes
40 answers

gcloud command not found - while installing Google Cloud SDK

I am on a mac and am trying to install the Google Cloud SDK (including the gcloud command line utility) using this command in terminal curl https://sdk.cloud.google.com | bash as seen at https://cloud.google.com/sdk/ It got all the way to the end…
118
votes
4 answers

How do I list the roles associated with a gcp service account?

In the google cloud gui console I went to "IAM & admin" > "Service accounts" and created a service account named "my-service-account" with the viewer role. I then ran this command: gcloud iam service-accounts get-iam-policy…
red888
  • 27,709
  • 55
  • 204
  • 392
109
votes
6 answers

the zone does not have enough resources available to fulfill the request/ the resource is not ready

I failed to start my instance (through the web browser), it gave me the error: "The zone 'projects/XXXXX/zones/europe-west4-b' does not have enough resources available to fulfill the request. Try a different zone, or try again later." I…
ShadeBai
  • 1,115
  • 2
  • 7
  • 4
102
votes
19 answers

gsutil ServiceException: 401 Anonymous caller does not have storage.objects.list access to bucket even though I'm loggedin in gcloud

I am trying to create an internal app to upload files to google cloud. I don't want each individual user or this app to log in so I'm using a service account. I login into the service account and everything is ok, but when I try to upload it gives…
Daniel Tranca
  • 1,374
  • 3
  • 13
  • 23
98
votes
6 answers

AttributeError: module 'importlib' has no attribute 'util'

I've just upgraded from Fedora 32 to Fedora 33 (which comes with Python 3.9). Since then gcloud command stopped working: [guy@Gandalf32 ~]$ gcloud Error processing line 3 of…
Guy Carmin
  • 983
  • 1
  • 5
  • 4
86
votes
12 answers

`docker-credential-gcloud` not in system PATH

After the latest updates to gcloud and docker I'm unable to access images on my google container repository. Locally when I run: gcloud auth configure-docker as per the instructions after updating gcloud, I get the following message: WARNING:…
80
votes
1 answer

Could not find default credentials

I'm playing with Google container engine on gcloud. So after successfully finished gloud init I followed instructions and did: gcloud container clusters get-credentials cluster-1 --zone europe-west1-c --project whatever And then: kubectl proxy But…
lang2
  • 11,433
  • 18
  • 83
  • 133
78
votes
2 answers

gcloud app deploy, flag to automate prompting?

Is it possible to do silent deployment when using gcloud app deploy When I run the command gcloud app deploy ./deployment/app.yaml --version v1 its always prompting for Do you want to continue (Y/n)? Y how to automate this? is there any flag that…
Sahas
  • 3,046
  • 6
  • 32
  • 53
76
votes
6 answers

Get the Default GCP Project ID with a Cloud SDK CLI One-Liner

I’m looking for a gcloud one-liner to get the default project ID ($GCP_PROJECT_ID). The list command gives me: gcloud config list core/project #=> [core] project = $GCP_PROJECT_ID Your active configuration is: [default] While I only want the…
Ali SAID OMAR
  • 6,404
  • 8
  • 39
  • 56
74
votes
2 answers

Difference between "gcloud auth application-default login" and "gcloud auth login"

What is the difference between gcloud auth application-default login vs gcloud auth login? Despite the definitions below, it is still hard to differentiate them. gcloud auth application-default login : acquire new user credentials to use for…
Marshall An
  • 1,072
  • 2
  • 11
  • 15
71
votes
7 answers

Install Google Cloud components error from gcloud command

I am trying to install several GCP components from the gcloud command-line tool and always get the same error: $ gcloud components list Your current Cloud SDK version is: 146.0.0 The latest available version is:…
Ivan Fernandez
  • 4,173
  • 5
  • 25
  • 30
66
votes
2 answers

How to change the active configuration profile in gcloud?

I have created a new configuration profile using command: gcloud init and now I don't know how to switch to old configuration profile without override it. Using gcloud config I can't switch to another configuration only set a property of the…
ezain
  • 1,445
  • 1
  • 16
  • 32
63
votes
3 answers

Cross project management using service account

I need a service account that can access multiple projects, but I have not been able to find a way to do this at all. It seems that a service account is always bound to a project. Another option is to create a service account on the separate…
Leon
  • 12,013
  • 5
  • 36
  • 59
60
votes
1 answer

Running `apt update` raises: "GPG error: cloud-sdk is not signed"

While running sudo apt update the following Warning, followed by an Error raises: W: GPG error: http://packages.cloud.google.com/apt cloud-sdk InRelease: The following signatures couldn't be verified because the public key is not available:…
dwightjl
  • 1,984
  • 2
  • 13
  • 13
1
2 3
99 100