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
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
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
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
35
votes
1 answer

Can I automate Google Cloud SDK gcloud init - interactive command

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
  • 8,681
  • 3
  • 27
  • 34
33
votes
3 answers

Find out where Google Cloud SDK is installed

I need to add the Google Cloud SDK in the PATH. So I need the path to where is installed. Is there any gcloud ... command which gives me this information? If not I have to go through the symlink in which gcloud, etc. Any cleaner solution for this…
Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168
18
votes
2 answers

How to rename existing 'named configurations' using gcloud cli in GCP?

I would like to know if there is a way to rename an existing 'gcloud topic configurations' e.g. I would like rename 'foo' to 'bar' in the below example. I couldn't find anything on this in the gcloud reference documents.
jayBana
  • 415
  • 4
  • 9
13
votes
2 answers

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

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?
cherba
  • 8,681
  • 3
  • 27
  • 34
11
votes
2 answers

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

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…
James Healy
  • 14,557
  • 4
  • 33
  • 43
11
votes
5 answers

Using Google Cloud Source Repositories with service account

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…
8
votes
3 answers

List all the tables in a dataset in bigquery using bq CLI and store them to google cloud storage

I have around 108 tables in a dataset. I am trying to extract all those tables using the following bash script: # get list of tables tables=$(bq ls "$project:$dataset" | awk '{print $1}' | tail +3) # extract into storage for table in $tables do …
Syed Arefinul Haque
  • 1,123
  • 2
  • 14
  • 38
8
votes
1 answer

Updating from user based configuration file

Whenever I run a bq or gsutil command, I get the below output: Loading user based configuration file: [/home/reggie/.config/gcloud/properties]. User based configuration files are deprecated and will not be read in a future gcloud release. What is…
7
votes
3 answers

How to remove/disable the output messages of gcloud CLI commands

For example: gcloud compute disks create --size=10GB my-data-disk would print 2 things: Warning: WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see:…
7
votes
3 answers

gcloud in version Google Cloud SDK 0.9.57 breaks deploy of application

As of 04/22/15, update of gcloud to the latest version breaks the deploy command. The version of the app is set to the current timestamp (eg: 20150422t202108). And doing a: gcloud preview app deploy . returns an error "ERROR: Directories are not…
theshadowmonkey
  • 689
  • 8
  • 26
6
votes
1 answer

gCloud / GCE Disk Size warning - is it meaningful?

When I create a boot disk with gCloud less than 200GB in size, I see this error: WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see:…
BuvinJ
  • 10,221
  • 5
  • 83
  • 96
4
votes
1 answer

Can I install and run multiple versions of gcloud (google cloud sdk) on the same machine?

Features and options in gcloud are sometimes deprecated/removed. If CI depends on it and refactoring is not an option while at the same time we need to use new features which come out in later releases can we have multiple versions of gcloud…
cherba
  • 8,681
  • 3
  • 27
  • 34
1
2 3 4 5