Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
17 votes
5 answers
16k views

GCloud Upload httplib2.RedirectMissingLocation: Redirected but the response is missing a Location: header

I am attempting to upload a small file to gcloud using a simple python program client = storage.Client(project=GCLOUD_PROJECT) bucket = client.get_bucket(GCLOUD_BUCKET) blob = bucket.blob(...
mumshad's user avatar
  • 409
4 votes
2 answers
2k views

Upload an existing .env file to Google Cloud Secret Manager

I'm trying out Google Cloud Secret Manager for the first time. My intention is to store all the contents of my .env file in Secret Manager and access any of them at will from any of my Cloud Run ...
ololo's user avatar
  • 2,180
1 vote
2 answers
1k views

How to publish binary Protobuf to Google Cloud Pub/Sub with gcloud CLI tool?

It is possible to publish messages to Google Cloud Pub/Sub on (Unix/MacOS) command line with gcloud pubsub topics publish, at least strings. Is there a way to publish binary Protobuf? The command ...
Touko's user avatar
  • 11.8k
29 votes
5 answers
144k views

Kubernetes: kubectl run: command not found

I was running kubectl command to deploy my application in the gcloud. But suddenly the kubectl command stopped working. kubectl command is working fine but for everything else it say command not found....
Manish Kumar's user avatar
  • 7,259
36 votes
4 answers
29k views

Startup script logs location

In Google Cloud Platform's Ubuntu 16.04.1 instance, the output of my startup script was written to /var/log/startupscript.log. Since they upgraded to 16.04.02 I can't find the logs anymore. Any ...
Christian Daguerre's user avatar
1 vote
1 answer
544 views

Error Deploying Google Cloud Function with Firestore Trigger Using Eventarc in gcloud

I am attempting to deploy a second-generation Google Cloud Function that triggers on any write operation (create, update, delete) in a specific Firestore document path using the gcloud CLI tool with ...
wellsinsideout's user avatar
0 votes
0 answers
102 views

(Re)-use Identity-Aware Proxy between browser and backend

I have an SPA served through my App Engines default service by defining a simple yaml/python based static file server. runtime: python311 handlers: - url: / static_files: www/index.html upload: ...
Basti's user avatar
  • 769
0 votes
1 answer
935 views

Dataflow Flex Template launches 2 Dataflow Jobs

I've built an ETL Python job into a Dataflow Flex template. This means I use a command in the form: gcloud dataflow flex-template run $DF_JOB_NAME --template-file-gcs-location $FLEX_SPEC_PATH --region ...
snark17's user avatar
  • 409
-1 votes
2 answers
2k views

Next.js14 shows error while build in Nodejs20. It runs fine in localhost but while build shows error & after deploying shows 500 internal server error

I have just updated the Node.js version to the latest i.e. version 20, after that I created one next.js latest project. It runs fine in my localhost but while build it shows error and i haven't change ...
Akriti Shrivastava's user avatar
0 votes
2 answers
1k views

Configure Lens with GKE cluster - gke_gcloud_auth_plugin issue

I was able to access my kubernetes cluster using kubectl after authenticating to Google Cloud gcloud auth login --cred-file=sa.json I installed gke-gcloud-auth-plugin too (gcloud components install ...
Smaillns's user avatar
  • 3,285
0 votes
1 answer
213 views

GAE deploy via Github Actions : Failed to create cloud build: IAM authority does not have the permission 'cloudbuild.builds.create' action CreateBuild

NOTE : For privacy purposes, I changed the project name to "xxx" in this post. I am working on a Github Actions workflow to deploy a NuxtJS app to Google App Engine, that fails on this ...
Guillaume Prévost's user avatar
0 votes
1 answer
103 views

Issue when trying to deploy dotnet 8 web app to gcloud app engine flex

I've been using gcloud app deploy with a legacy project on dotnetcore 3.1 sometime ago. Had to go back to this project and after upgrading the project to dotnet 8 I can no longer deploy it. Previous ...
Alex M's user avatar
  • 2,568
0 votes
1 answer
753 views

Requested entity not found when trying to get npm settings

I'm trying to push to a repository configured as an npm project. I followed the quickstart tutorial without problem. Now I'm trying to actually push an npm project, but I'm running into a problem. I ...
Tuma's user avatar
  • 527
0 votes
1 answer
94 views

Google ADCs don't seem to work using Python on Windows 11 / Gcloud SDK 475.0.0

So just migrated from a Windows 10 to Windows 11 machine and notice Python scripts don't seem to be picking up Google ADCs. I'm repeatedly getting this error: Reauthentication is needed. Please run '...
John Heyer's user avatar
0 votes
0 answers
28 views

Why does my Puppeteer throw all sort of errors on Gcloud but work flawlessly on my local machine

I use Puppeteer to do simple text-scraping, it works flawlessly on my local machine, but when I deploy to GAE, it throws errors like navigation timeout, CONNECTION FAILED and sometimes it works. Here ...
Mubaraq Ishola's user avatar
0 votes
1 answer
131 views

"gcloud storage cp t.txt gs://my.bucket.name/" gives error: ModuleNotFoundError: No module named 'google.auth'

I'm trying to upload a file to a bucket using: gcloud storage cp t.txt gs://my.bucket.name/ But there's an error: Copying file://t.txt to gs://adhoc.textra.me/t.txt Traceback (most recent call last): ...
Theo Lassonder's user avatar
3 votes
2 answers
684 views

Google cloud cleanup policy is not applied on the artifact registry

I have a repository called staging, with this cleanup policy: gcloud artifacts repositories list-cleanup-policies staging Listing items under project XXX, location us-east1, repository staging. Dry ...
Yashar's user avatar
  • 2,743
0 votes
1 answer
309 views

Best approach to enqueue long-running run jobs?

I have the following scenario: Front-end -> Cloud Run Service on serverless mode. Based on the user action, it will call a long running and parameterized process, which can take more than one hour ...
SidiBecker's user avatar
0 votes
2 answers
405 views

gcloud functions deploy command always creates new function

I'm trying to update the memory of an existing cloud functions through the cli but instead of updating it creates a new function. I've tried several commands from the docs but it still creates ...
Ariel M's user avatar
  • 41
0 votes
0 answers
55 views

How to suppress all log output from gcloud for scripting

I am running the following command to reset the password for a Windows VM and get the results in JSON format: gcloud compute reset-windows-password \ VM_NAME \ --project=PROJECT_ID \ --quiet \ ...
Claus Conrad's user avatar
1 vote
3 answers
1k views

Permissions error fetching application - Gcloud app deploy

I am trying to deploy to a gcloud app (following the steps here: https://realpython.com/python-web-applications/). My gmail account is the owner of the project (and just to be safe, I've added lots of ...
Cherns's user avatar
  • 101
0 votes
2 answers
800 views

Problem using service accounts in gke deployment

I have a service account created in terraform. I want to use it to deploy a workload using a docker image stored in artifacts. resource "google_service_account" "artifact_reader" { ...
Chris's user avatar
  • 572
33 votes
4 answers
18k 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
0 votes
1 answer
537 views

How to delete a service from all regions with gcloud run delete in cloudbuild.yaml

I deploy my service on cloud run, in several regions. My cloudbuild.yaml does this: Build a new image Push new image to Artifact Registry TODO: Stop service in all regions Run database migrations ...
Micka's user avatar
  • 1,844
2 votes
2 answers
739 views

google-cloud-sdk 463.0.0 debian package install/upgrade broken

The google-cloud-sdk[-<package_name>] debian packages version 463.0.0 are broken on apt-get install and update with errors similar to: root@e3a51df7def8:/# apt-get install google-cloud-sdk ...
NathanLooney's user avatar
36 votes
6 answers
49k views

Get service account auth token without gcloud?

Is it possible to get an authorization bearer token for a Google Cloud service account without the use of gcloud? That is, I would like to make an HTTP request (presumably signed in some way by my ...
Jacob Brown's user avatar
  • 7,561
17 votes
3 answers
9k views

docker-compose Not Working With gcloud: Cannot Find OpenSSL

After following the setup instructions for the Artifact Registry in the gcloud CLI, whenever I use docker-compose and I try to fetch an image from a registry, this stack trace appears: Pulling **** (...
NickDelta's user avatar
  • 4,647
0 votes
0 answers
186 views

Cloud Function Emulator set up

Following https://cloud.google.com/functions/docs/running/functions-emulator#functions-local-ff-install-python $ gcloud alpha functions local deploy functions-2 --entry-point=hello_http --runtime=...
boombeach's user avatar
2 votes
1 answer
1k views

How to implement more than one endpoint in a Google Cloud Function?

My intention is to use a unique Google Cloud Function to accommodate a few endpoints. I do have a super simple code using the Python functions-framework to take an Id Token and validate whether it is ...
Augusto's user avatar
  • 4,283
52 votes
7 answers
71k views

Upload files to Firebase Storage using Node.js

I'm trying to understand how to upload files in Firebase Storage, using Node.js. My first try was to use the Firebase library: "use strict"; var firebase = require('firebase'); var config =...
Ionică Bizău's user avatar
1 vote
1 answer
656 views

gcloud create artifacts repository is not working

I have tried running the command below gcloud artifacts repositories create gke-cloud-sql-repo --project=unimitra --repository-format=docker --location=asia-south1-b --description="GKE Quickstart ...
Sriram Chowdary's user avatar
0 votes
1 answer
2k views

Are `gcloud` and ADC credentials interchangeable?

I'm actively using terraform and GCP as of late. But for terraform to work I need: gcloud auth application-default login for gcloud (I occasionally need to execute gcloud commands): gcloud auth login ...
x-yuri's user avatar
  • 19.4k
7 votes
1 answer
21k views

How to use gke-gcloud-auth-plugin with a gcloud service account key file?

In CI, with gcp auth plugin I was using gcloud auth activate-service-account ***@developer.gserviceaccount.com --key-file ***.json prior to execute kubectl commands. Now with gke-gcloud-auth-plugin I ...
bonomo's user avatar
  • 71
7 votes
1 answer
2k views

Is there a way to fetch Google Cloud Monitoring Incident metrics via the API?

When reviewing the documentation here (https://cloud.google.com/monitoring/alerts/incidents-events#incident) and using the general product, it appears that the open incidents and associated details ...
stewartshea's user avatar
0 votes
1 answer
47 views

gcloud command output formatting with previous variables of the another gcloud command

I have: var=$(gcloud compute instance-groups list-instances ig --region=europe-west1 --format="csv[no-heading](NAME)") gcloud compute instance-groups describe ig --format="csv[no-...
eledu's user avatar
  • 23
0 votes
1 answer
380 views

Is there any way to catch errors in Google Cloud Build?

I am trying to deploy resources to Google Cloud Platform. Most of my CI pipeline uses terraform, but I am trying to use something that only works using the gcloud CLI tool (or, presumably, a REST API ...
Mike Williamson's user avatar
0 votes
0 answers
560 views

Unable to connect to VertexAI from Cloud Run, but it works locally

EDIT In my case, this was happening because of the VPC. I'm not sure how to configure things so that VertexAI is accessible via VPC (like I said below, I added the integration), but for now, I ...
Tuma's user avatar
  • 527
2 votes
0 answers
282 views

GKE Workload Identity: Failed to generate federated token using STS: googleapi: got HTTP response code 400

I am observing weird behaviour in applications deployed in our GKE Cluster enabled with workload identity. Environment: GKE 1.29 Cluster version Codebase: Java v17 Issue: Once in a while applications ...
Ritesh Kumar's user avatar
0 votes
0 answers
317 views

gcloud bigquery client connection - ssl error - disable ssl

I was trying to connect my jupyter notebook to google cloud bigquery for running some queries. I was facing ssl error while connecting with gcloud auth application-default login which i was able to ...
Vishnu R Nair's user avatar
1 vote
1 answer
268 views

Terraform fail to retrieve app engine default service account

I need to create gcp app engine and give some permissions to default service account using terraform. The .tf file looks like this. resource "google_app_engine_application" "app" { ...
passer's user avatar
  • 173
19 votes
3 answers
32k views

How do I get the organization ID of my current project in Google Cloud Platform?

I would like to know the organization ID of my current project in GCP. gcloud projects describe PROJECT_ID will show the parent which can be the organization, but if the parent is a folder, the ...
Joshua Fox's user avatar
  • 19.9k
2 votes
1 answer
1k views

Error 403 Forbidden while uploading to a gcloud signed url from the client side with next js

I have set up a gcloud bucket with the right permissions and created a service account that has the role storage creator. I have also written a go backend that generates the signed url and passes it ...
Blagoy Simandoff's user avatar
0 votes
0 answers
56 views

Gcloud: Deploying flask app from git repo failing with DEPRECATION: Python 2.7 error when installing requirement.txt

I have built a flask app with python version 3.9, and kept it in a github repo. It successfully runs on render.com. To learn Google App Engine, I cloned the repo, moved into the folder and tried ...
forest's user avatar
  • 1,494
1 vote
1 answer
294 views

Jetson pull docker images from gcloud Artifact Registry, Unauthenticated

So the problem is only with JETSON, I have problem with pulling docker images from Artifact Registry, it works on every ubuntu server, but not on jetson. I have python v 3.8 Platform ARM Steps I do # ...
RaShe's user avatar
  • 1,880
1 vote
1 answer
121 views

Nested fields not getting received on Google Pub/Sub

Since I'm learning the Google Pub/Sub library I've set up a local instance of the Pub/Sub and created 2 apps: 1 to send a message and one to receive it. So far so good,I've managed to set up the ...
Атанас Чолаков's user avatar
0 votes
2 answers
356 views

gcloud delete container image routed to artifact registry

I have routed all gcr.io traffic to Artifact Registry. The command gcloud container images delete --force-delete-tags used to delete digests in an image along with the image. Now with the images ...
Jacquen's user avatar
  • 1,266
1 vote
1 answer
125 views

GCP Cloud CLI won't create firestore in "native" mode

We're trying to run a script on could-shell to create a new firestore collection in native mode. However it creates it in datastore default mode. What should be change in our flags? --type=firestore-...
Elad Ben-David's user avatar
6 votes
2 answers
2k views

dev_appserver.py BadArgumentError: app must not be empty

Hey all, For context: I had this dev_appserver setup working late last year in 2021, and upon trying to set it up again, I'm getting odd errors. BadArgumentError: app must not be empty. I've solved ...
James's user avatar
  • 759
15 votes
5 answers
19k 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,786
2 votes
2 answers
768 views

GCS - Secure Way to Authenticate to GCS From On-Premises Server

I am looking for the secure/recommended way to connect and perform actions on GCS. Need: We have files on an on-premises Linux environment that needs to be uploaded to GCS on a hourly basis. Newer ...
rainingdistros's user avatar

1
3 4
5
6 7
92