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
Filter by
Sorted by
Tagged with
3 votes
1 answer
2k views

gcloud compute addresses list returns 0 results although I have external ephemeral addresses

I have one google compute instance in my project with an external IP. A describe command on the instance shows me: networkInterfaces: - accessConfigs: - kind: compute#accessConfig name: ...
canadadry's user avatar
  • 8,233
3 votes
1 answer
14k views

Unable to SSH to Google Cloud

I installed the Google Cloud SDK Thought Web UI I created a new instance. I am not knowledgeable of SSH. I followed steps as described here: https://cloud.google.com/compute/docs/instances#sshkeys I ...
IberoMedia's user avatar
  • 2,274
3 votes
1 answer
6k views

How to get remote client's IP address in an express based Node JS app running on App-Engine

While trying to get IP, all standard headers values contain incorrect value. req.ip: ::ffff:172.17.0.5 req.headers['x-forwarded-for']: 169.254.160.2 req.socket.remoteAddress: ::ffff:172.17.0.5 All ...
Vikram Tiwari's user avatar
3 votes
4 answers
31k views

gcloud auth login throwing error: gcloud crashed (ConnectionError): HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded

gcloud builds submit failed for me yesterday. Then I tried gcloud config set project, that also failed. So I thought login might have expired so tried gcloud auth login. In all cases, it always ...
Vichitr Gandas's user avatar
3 votes
4 answers
6k views

How to get ALL the GCP folders from an Organization with `gcloud`?

I was wondering if you have a way to find all projects/folders in an organization. Currently gcloud allows to get both folders and projects given the parent, delegating the recursive action to the ...
Riccardo's user avatar
  • 1,180
3 votes
1 answer
843 views

How to configure google identity platform with CLI sdk?

I am trying to change google identity platform configuration with cli using gcloud CLI SDK for linux. to be specific I want to call these API getConfig and UpdateConfig Is there a way to do this using ...
shreyas's user avatar
  • 2,600
3 votes
4 answers
724 views

Can't call public method of non-public class: public (Google gcloud library)

I am attempting to use the gcloud library. (ns firengine.state (:import [com.google.cloud AuthCredentials] [com.google.cloud.datastore DatastoreOptions])) (-> (DatastoreOptions/builder) ...
Stephen Cagle's user avatar
2 votes
4 answers
1k views

How to set version when deploying gae java?

Since Intellij Idea IDE gae deployment plugin does not work, I have to use mvn appengine:update. It always deploy to version 1, ignoring version in appengine-web.xml. How to set version with mvn ...
Kyaw Tun's user avatar
  • 12.8k
2 votes
1 answer
3k views

How to remove gcloud fully?

I'm new on mac. I just remove gcloud folders. And now when I open my command line window I always see next: -bash: /Users/myuser/gcloud/google-cloud-sdk/completion.bash.inc: No such file or directory -...
Oleg  Baranovsky's user avatar
2 votes
4 answers
10k views

Google Cloud SDK throws Reachability Check failed error

I am trying to use gcloud init command to authenticate my account on mac os and it throws me error related to SSL Certificate. I am using python 3.7 and latest version of google clound sdk. > ...
Rushabh Patel's user avatar
2 votes
2 answers
1k views

Deployment to Google’s Compute Engine fails: Error retrieving the App Engine service account

After I’ve deleted some values (do not remember which) in my project configuration (in the Developer Console) I cannot deploy an app to a Compute Engine instance. I’ve deployed the same code using the ...
Alex's user avatar
  • 8,335
2 votes
2 answers
2k views

Firestore Deadline Exceeded Node

I would like to load collection that is ~30k records. I.e load it via. const db = admin.firestore(); let documentsArray: Array<{}> = []; db.collection(collection) .get() .then(snap => { ...
ukaric's user avatar
  • 428
2 votes
2 answers
9k views

Executing gcloud command in Jenkins pipeline

I'm trying to run the gcloud command in a Jenkins declarative pipeline just like in the following example: pipeline { agent any stages { stage('Run gcloud version') { steps { ...
Carlos Gomez's user avatar
2 votes
2 answers
2k views

How to restart Google App Engine Standard Service

Context: I have an app that serves interactive graphs and data analysis. In order to calculate plots and data summaries, it uses a dataset that is loaded upon App initialization by querying google ...
David Olmo Pérez's user avatar
1 vote
0 answers
429 views

Error - no kind "ClientConfig" is registered for version "authentication.gke.io/v2alpha1" in scheme "pkg/runtime/scheme.go:100"

Below is the code(with invalid kubernetes cluster URL - 10.xx.xx.xx sitting in google cloud) : package main import ( "fmt" "k8s.io/client-go/kubernetes" "k8s.io/...
overexchange's user avatar
  • 16.4k
1 vote
2 answers
133 views

"\Google\Cloud was unexpected." when executing gcloud command

The instalation of Google Cloud SDK went right. The problem is when I try to execute a gcloud command (even if gcloud -h) I have this output: \Google\Cloud was unexpected. I'm on Windows 10. ...
nouarf's user avatar
  • 11
1 vote
2 answers
2k views

ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine

Getting this error when I try to deploy to google app engine: ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine: File https://storage....
cmwakio's user avatar
  • 23
1 vote
1 answer
2k views

How do I run custom python script in Google App engine

Apologies for the long detailed question. Here goes... The file has the name send_daily_report.py and uses some libraries which are detailed in a requirements.txt file. My app.yaml looks as follows: ...
Dean's user avatar
  • 1,226
1 vote
3 answers
2k views

Mac gcloud install ImportError: No module named __future__

When installing gcloud for mac I get this error when I run the install.sh command according to docs here: Traceback (most recent call last): File "/path_to_unzipped_file/google-cloud-sdk/bin/...
KevinTydlacka's user avatar
1 vote
3 answers
2k views

gcloud can connect but gsutil cannot

Trying to use gcloud & gsutil from a laptop. gcloud can connect but gsutil cannot: mylaptop:~ jamiet$ gcloud projects list | head -2 PROJECT_ID NAME PROJECT_NUMBER dev-...
jamiet's user avatar
  • 11.4k
0 votes
2 answers
3k views

connection requires a valid client certificate in laravel google cloud postgres with ssl mode

I am facing a issue when trying to connect to gcloud postgres db allowing ssl in my laravel application which is running in the cloud run. I downloaded all three cert files from gcloud and set the ...
user3683222's user avatar
0 votes
1 answer
79 views

NextJS Continuous Deployment on Cloud Run not working

I am trying default next js app on github to be auto deployed on Google Cloud Run, but it gets stuck in Building and Deploying step: I have tried using both docker image and default nodejs repository....
Sandeep P.'s user avatar
0 votes
1 answer
923 views

Firebase storage credentials missing for googleapis.com issue

I am using firebase to store and see images from my website. but not able to open files from my firebase storage bucket even it has storage admin role on cloud google. I am able to see images on ...
Burak Kalafat's user avatar
0 votes
1 answer
2k views

Link private repository in packages.json in app deployed to gcloud

I have a node.js app (my-app) that I'm setting Continuous Deployment for. The repository is hosted on Bitbucket and I'm creating CD with Bitbucket's Pipelines. The pipelines script deploys the app to ...
johnatann's user avatar
  • 145
0 votes
1 answer
3k views

How to connect and access Google Cloud Compute Engine VM via Python 3.6

I want to access the Google Cloud Compute Engine VM using Python 3.6 and I need to perform normal CLI actions like remote machine. I am able to login to the VM instance via gcloud command, which is ...
Vignesh G's user avatar
505 votes
24 answers
435k views

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 ...
Ebin Davis's user avatar
  • 5,801
80 votes
2 answers
12k views

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)...
Sahas's user avatar
  • 3,116
78 votes
6 answers
91k views

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 ...
Ali SAID OMAR's user avatar
37 votes
4 answers
33k views

How to remove warning in kubectl with gcp auth plugin?

When I run any kubectl command I get following WARNING: W0517 14:33:54.147340 46871 gcp.go:120] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead. To ...
Alexander Meise's user avatar
34 votes
1 answer
50k views

Google Cloud Platform: Logging in to GCP from commandline

I was sure it will be simple but couldn't find any documentation or resolution. I'm trying to write a script using gcloud to perform some operations in my GCP instances. Is there anyway to login/...
Lior Ohana's user avatar
  • 3,507
33 votes
3 answers
20k views

Using the Google Cloud Platform SDK CLI to List all Active Resources Under a Given Project

Is it possible to list, through the Google Cloud Platform (GCP) SDK CLI (gcloud), all active resources under a given GCP project?
bsam's user avatar
  • 900
33 votes
3 answers
31k views

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 ...
Gabriel Petrovay's user avatar
29 votes
4 answers
13k views

What is the difference between gcloud and gsutil?

I want to know difference between gcloud and gsuitl. Where do we use what? Why certain commands begin with gsutil while others with gcloud?
Kshitij Singh's user avatar
26 votes
5 answers
10k views

How to debug Nodejs app running inside Docker container via Google Cloud

I have found Google provides some guidelines on how to run Nodejs on a custom runtime environment. Everything seems fine and I am managing to start my Nodejs app on local machine running gcloud ...
Nik Sumeiko's user avatar
  • 8,523
25 votes
5 answers
30k views

Where are Google Application Default Credentials stored?

When you run gcloud auth login or gcloud auth list, where is it storing the credentials? https://developers.google.com/identity/protocols/application-default-credentials
Cameron Taggart's user avatar
25 votes
5 answers
15k views

google compute engine tool gcloud is exceptionally slow

I tried downloading and using the gcloud bash tool to manage my accounts, however everything I do with the tool is exceptionally slow. It will take MINUTES to reply to a command that is typed. Is ...
Mark Shust at M.academy's user avatar
25 votes
2 answers
15k views

Is it possible to copy a directory from a Google Compute Engine instance to my local machine?

With scp I can add the -r flag to download directories to my local machine via ssh. When using: gcloud compute scp -r it sais that '-r' is not an available option. Without -r I get an error ...
ThatBrianDude's user avatar
23 votes
4 answers
18k views

Can I use gcloud in Git Bash on Windows?

So, I've installed Git, Git Bash, Python2.7, and I've just installed the Google Cloud SDK per the official guide. Using Windows 10. In cmd.exe, or the "Google Cloud SDK Shell", gcloud works fine. ...
ensminger's user avatar
  • 691
17 votes
5 answers
22k views

gcloud component update fails

I've deployed to VM's running Debian on GCE and have cron scripts that use gcloud commands. I noticed that gcloud components update retuns this error ERROR: (gcloud.components.update) The ...
Andrew MacKay's user avatar
17 votes
3 answers
17k views

Google Cloud Storage bucket throws error "The project to be billed is associated with a closed billing account."

I already checked my project and it has an active billing account I am using node js var gcloud = require('gcloud'); var gcs = gcloud.storage({ projectId: config.gcloud.projectid, ...
Jackson's user avatar
  • 181
16 votes
4 answers
24k views

Why is this gcloud compute copy-files producing an error message?

When I execute the command gcloud compute copy-files "C:\Users\fName lName\Desktop\testtext.txt" instancename:test.txt --zone europe-west1-a I receive the error: "All sources must be local ...
Ross Manson's user avatar
16 votes
6 answers
59k views

Exposing two ports in Google Container Engine

Is it possible to create a Pod in the Google Container Engine where two ports are exposed: port 8080 is listening for incoming content and port 80 distributes this content to clients? The following ...
cute_marmalade's user avatar
15 votes
5 answers
19k views

How to list the published container images in the Google Container Registry using gcloud or another CLI

Is there a gcloud API or other command line interface (CLI) to access the list of published container images in the private Google Container Registry? (That is the container registry inside a Google ...
Gabriel Petrovay's user avatar
15 votes
2 answers
13k views

How to get gcloud auth activate-service-account persist

I am using the bq command line tool to query from a Bigquery table. Is there a way to get the service account authentication to persist when I logged in and out of the box that the query process is ...
user3709284's user avatar
15 votes
5 answers
17k views

Can't access secret in GCP Secret Manager

I'm trying to migrate my code from using API keys stored in the .env file to using Google Cloud Platform Secrets Manager. I've followed the instructions here but I encounter an error saying that I don'...
Bartek Pacia's user avatar
  • 1,408
14 votes
1 answer
4k views

How to authenticate to Google Cloud API without Application Default Credentials or Cloud SDK?

I'm trying to access the Google Cloud API from an AWS Lambda function but I don't know how to authenticate. The auth guide in the Google Cloud documentation (https://cloud.google.com/docs/...
Mohamed Fakhreddine's user avatar
14 votes
2 answers
2k views

gcloudignore doesn't allow standard wildcard whitelist

Gcloudignore works like gitignore in that you can exclude certain files from uploading to GCF. Sometimes when you have really large projects with lots of generated files, it can be useful to exclude ...
yellowarchangel's user avatar
14 votes
2 answers
32k views

How to run Google gsutil using Python

After installing and configuring Google Cloud SDK gsutil command can be run by simply typing its name and the argument(-s) using Windows cmd. Here is the example: "C:\Program Files (x86)\Google\...
alphanumeric's user avatar
  • 18.7k
14 votes
4 answers
10k views

How to set path to kubectl when installed using gcloud components install?

Ok, I installed kubectl in the following way on my Mac: 1) installed gcloud using homebrew 2) installed kubectl using gcloud components install. I want to run a shell script that calls kubectl ...
Yuva Athur's user avatar
13 votes
6 answers
18k views

How to get a list of internal IP addresses of GCE instances

I have a bunch of instances running in GCE. I want to programmatically get a list of the internal IP addresses of them without logging into the instances (locally). I know I can run: gcloud compute ...
Spanky's user avatar
  • 5,668

1 2
3
4 5
10