4,599 questions
-4
votes
0
answers
31
views
Configure Cloud Code with gcloud cli login
My gcp organization is connected to WIF and use a different identity provider than Google ID (Github as an OIDC Provider).
I'm able to use the gcloud cli by the use of a config file based login, and ...
2
votes
1
answer
98
views
'str' object is not callable in Google SDK when trying to fetch a spreadsheet
I'm trying to fetch a spreadsheet with Google SDK. I'm logged into an account with a Service Account Token Creator role and the service account has access rights to the spreadsheet. This is my code:
...
1
vote
1
answer
55
views
GCloud Error: Caller is missing permission 'iam.serviceaccounts.actAs' on service account [closed]
Situation
This is pretty much my first experience with cloud tools. I'm trying to enqueue (schedule) a cloud task from a cloud function which gets called from my flutter app, the task would at the ...
0
votes
0
answers
67
views
Use Grpc-web with Cloud Endpoints gRPC for Cloud Run with ESPv2
I am creating a GRPC service that should be accessible from the web but have found no working guides for getting grpc-web to work with cloud-endpoints and ESPv2. I have used this guide to set ...
536
votes
25
answers
531k
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 ...
0
votes
1
answer
107
views
GCloud Pub/Sub Pull subscription limit of 5000 messages
Currently I am working on a project that publishes any received request contents to a pub sub topic and subsequent subscriber, in order to pull and batch process all of the messages at once every ...
2
votes
1
answer
336
views
`google.auth` python SDK not reading granted scopes from credentials file
I've run:
gcloud auth application-default login --client-id-file google_oauth_client_id.json --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/calendar....
53
votes
13
answers
37k
views
gcloud: ModuleNotFoundError: No module named 'imp'
When attempting to run the GCP command line tool gcloud on MacOS with Python 3.12 the following error occurs:
Traceback (most recent call last):
File "/Users/<username>/google-cloud-sdk-1/...
227
votes
43
answers
530k
views
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://...
0
votes
1
answer
108
views
Does appengine support WebSocketServer?
The google appengine documentation states websockets are supported, but in their example they use socket.io instead of a "regular" WebSocketServer.
my (simplified) nodejs server is super ...
0
votes
0
answers
78
views
gcloud CLI + flags-file: problems with repeated flags
I am using the gcloud CLI to create a new Workstation configuration.
To simplify configuration management I am also using a yaml configuration file to specify flag values based on Google's ...
0
votes
1
answer
365
views
Vertex AI `gcloud ai models list` returns "Listed 0 items" on a fully activated project
I am trying to access Gemini models via the Vertex AI API but am unable to see any publisher models in my project.
Project ID: virio-462215
The Core Problem:
When I run the command gcloud ai models ...
0
votes
0
answers
64
views
Oauth client authorization fails because of the Google ADC
I'm trying to work on my home project where I contact Google services like Gmail, Sheets, Drive. Services that are not Google Cloud per se.
I've implemented GmailApi quickstart guide for python, but ...
1
vote
1
answer
301
views
gcloud secrets create always fails with “INVALID_ARGUMENT: The provided Project ID ... does not match the expected format [projects/*]”
I'm trying to create a new secret in Google Cloud Secret Manager using the gcloud CLI, but I always get the following error:
echo -n "my-secret-value" | gcloud --project=[MY_PROJECT_ID] ...
110
votes
22
answers
127k
views
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 ...
0
votes
1
answer
46
views
Can't connect to SQL server using gcloud
I have an SQL Server setup in GCP. It has a private IP.
I have gcloud installed on ubuntu 20 (WSL2).
When I run this command I get an error:
> gcloud beta sql connect <instance name> --user=&...
1
vote
2
answers
649
views
Cloud SQL Proxy SSL error: `certificate had CN "", expected "<project>:<region>:<instance>"` when connecting to PostgreSQL 14
We're encountering an issue with Cloud SQL Proxy (v1 and v2) when connecting to a newly created PostgreSQL 14 Cloud SQL instance via a Kubernetes deployment on GKE.
The error we see in the logs is:
...
130
votes
8
answers
174k
views
Is there a way to export a BigQuery table's schema as JSON?
A BigQuery table has schema which can be viewed in the web UI, updated, or used to load data with the bq tool as a JSON file. However, I can't find a way to dump this schema from an existing table to ...
0
votes
2
answers
89
views
The --update-labels argument of gcloud functions deploy does absolutely nothing
Maybe this is a bug because it's supposed to work: https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--update-labels
This command completes without issue:
gcloud alpha functions deploy &...
0
votes
1
answer
64
views
Git Config Issue related to Git Credential Helper
I have been facing some authentication issue.
What is being used
Windows machine
Gcloud SDK is installed and configuration has been done
Google Cloud source repository
Git Bash terminal
Repository ...
0
votes
1
answer
77
views
How to preserve only timestamp and mode of the file, an not other posix metadata when using "gcloud storage" command line interface?
When I use -P options with
gcloud storage cp -r -P gs://some/bucket/object ./
It tries to convert the user id also and fails with the following message
ERROR: Root permissions required to set UID ...
0
votes
1
answer
474
views
Google Cloud Organization Policy iam.allowedPolicyMemberDomains INVALID_ARGUMENT for Verified Domain
I'm trying to set the Google Cloud Organization Policy constraints/iam.allowedPolicyMemberDomains to restrict IAM members to my organization's verified domain, sksolution.app. However, I'm ...
6
votes
4
answers
5k
views
Firebase Error: auth/invalid-app-credentials in Next.js project with Phone Auth
I'm currently working on a Next.js project and encountering an issue with Firebase's Phone Authentication. When using signInWithPhoneNumber() for phone authentication, I keep getting the error auth/...
139
votes
5
answers
130k
views
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 ...
1
vote
0
answers
124
views
gcloud storage cp downloads exceed file size and result in corrupt file (e.g. 12.7GiB for 9.2GiB file)
I’m trying to download a .tar.gz file from a public Google Cloud Storage bucket using the gcloud CLI tool.
Here’s the command I use:
gcloud storage cp gs://my-bucket/large-file.tar.gz ./
The file is ...
39
votes
5
answers
36k
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 ...
0
votes
1
answer
279
views
Google Cloud PubSub Emulator
I'm running into an issue when trying to use the Google Cloud Pub/Sub Emulator. I am able to start the emulator successfully, but I cannot create topics or interact with it using gcloud commands.
I ...
-1
votes
1
answer
90
views
NODE_ENV in Google App Engine in TypeScript apps (React)
How does GAE (Google App Engine) treat NODE_ENV on deployment and run with a NodeJS runtime?
Google docs clearly states that some variables are automatically set and cannot overridden except the `...
0
votes
1
answer
40
views
GCP Compute Engine custom image import from Trend Vision Zero Trust fails at translate-disk step (CentOS 7 DNS issue)
I'm trying to import a custom VM image (from Trend Micro Vision One Zero Trust Private Access) into Google Cloud Platform using the gcloud compute images import command. However, the process fails ...
49
votes
3
answers
53k
views
How do I install gke-gcloud-auth-plugin on a Mac M1 with zsh
I try to install gke-gcloud-auth-plugin on a Mac M1 with zsh, following the gcloud docs.
The installation ran without issue and trying to re-run gcloud components install gke-gcloud-auth-plugin I get ...
0
votes
0
answers
122
views
Google Cloud and project ID from google.auth.default() in docker container
I'm playing Whac-A-Mole with Google Cloud authentication. Sorry for the lengthy question but since I have no idea where the problem is, I'm trying to give enough context.
With Python, calling google....
-1
votes
1
answer
103
views
gcloud CLI: Permission denied moving project between organizations
I’m trying to move a Google Cloud project from our org (Org ID: ORG_ID_1) into the client’s org (Org ID: ORG_ID_2) with:
gcloud beta projects move PROJECT_ID --organization=ORG_ID_2
but I immediately ...
0
votes
0
answers
71
views
getting error gcloud not found in nodejs application
I am trying to execute the gcloud commands in node js and getting gcloud is not found. the image is deployed using cloud run.
gcloud auth activate-service-account --key-file=/src/keys.json
/bin/sh: ...
0
votes
0
answers
106
views
Permission Denied for Org Admin trying to disable Organization Policy (iam.allowedPolicyMemberDomains) - even in Cloud Shell
I am an Organization Administrator (roles/resourcemanager.organizationAdmin) for my Google Cloud Organization, but I'm encountering a persistent "permission denied" error when trying to ...
98
votes
6
answers
49k
views
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 /home/guy/.local/lib/...
1
vote
0
answers
69
views
Google TTS Long Audio
I newbie working with Google TTS, I have code that allows me to use the long audio TTS and get the file from a bucket, however, when I am trying to do it with a long file that may give me 20 minutes ...
0
votes
1
answer
261
views
Cannot setup local development for dataform cli - dataform init-creds fails
I cannot setup my local development environment with Dataform CLI because the creation of the df-credentials.json fails.
I follow the steps described here: https://cloud.google.com/dataform/docs/use-...
-1
votes
1
answer
85
views
Docker image running in k8s which needs gcloud auth credentials
I need run a python app in docker container on k8s. This app needs to use gcloud stuff like gemini-2.0-flash, google_vertexai and
vertexai.init(project=os.environ.get("GOOGLE_CLOUD_PROJECT"),...
0
votes
2
answers
125
views
Support to node crypto module is required - gcloud sql connector
Any idea on what can cause the following issue? We're trying to migrate to the official Cloud SQL Node.js Connector but for some reason I'm getting the following issue when running a test connection ...
1
vote
1
answer
238
views
Google cloud: run app locally as service account whilst still running gcloud commands as my user
I am developing a cloud run service on google cloud and want to run it locally for testing using the service account I have configured cloud run to run the service as. My user has permission to ...
2
votes
3
answers
6k
views
CLI gcloud - The following signatures could not be verified because their public key is not available
I'm trying to install the gcloud CLI on my Linux system with Elementary OS 6.1 (based on Ubuntu 20.04) following the steps of the official page: https://cloud.google.com/sdk/docs/install?hl=en . ...
0
votes
0
answers
687
views
Make gemini-1.5-flash-002 accesible for my GCloud Run project
I am trying a basic script to summarize text:
def generate(self, text_to_summarize):
vertexai.init(project="<PROJECT_ID", location="MY_REGION")
model = GenerativeModel(
...
92
votes
12
answers
87k
views
`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 ...
0
votes
2
answers
214
views
Can't use service account impersonation for invoking a cloud function with the gcloud cli
I have granted the "roles/cloudfunctions.invoker" role and even "roles/cloudfunctions.admin" to the service account but still get this error:
gcloud functions call <function> ...
113
votes
6
answers
117k
views
the zone does not have enough resources available to fulfill the request/ the resource is not ready [closed]
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 ...
3
votes
1
answer
2k
views
Automatically set gcloud quota project to the current project
I have two gcloud configurations for two different projects with their own kubernetes clusters and switch between them frequently, they use two different gcloud projects. This seems like a normal ...
0
votes
0
answers
32
views
Gcloud SDK For PowerShell Gcloud Error Duplicate Line Created In Config_* File
Every week, not all the time, I am getting this error in the my Powershell ps1 logs
This is a Windows Server
A few people have ps1 programs in this server
They may be using other service accounts
The ...
25
votes
8
answers
48k
views
gcloud auth activate-service-account logout / revoke / remove / unset
I,ve added my service-account successfuly using below command.
gcloud auth activate-service-account --key-file=mycredentialsialreadyhad.json
Now I can't remove or logout from it.
any help would be ...
5
votes
1
answer
7k
views
Organisational Policy Permissions Google Cloud for Microsoft Migration
I am attempting to shift a small business (5 email inboxes) over to Microsoft 365 business. I made sure to organise all the DNS prerequisites on both sides before performing the migration. During the ...
1
vote
1
answer
1k
views
Is it possible to install the Google Cloud CLI on alpine Linux Without it installing a bundled version of python?
Problem Background
I am building an Alpine Linux docker image to use as a (relatively) lightweight CI image. In this image, I need to have the Google Cloud gcloud CLI installed.
I am installing Python ...