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
22
votes
4 answers

--recurse ERROR: Insufficient Permission: Request had insufficient authentication scopes

I'm trying to copy a directory from my vm to my local machine's Desktop with the following command: gcloud compute scp --recurse instance-1:~/directory ~/Desktop/ I tried reauthenticating with "gcloud auth login" however it still says ERROR:…
Wes
  • 413
  • 1
  • 4
  • 9
22
votes
5 answers

What permission is required for a service account to deploy to Google App Engine using gcloud?

I have created a service account in order to deploy a project to google app engine. The service account I have created has these two roles: App Engine -> App Engine Deployer Storage -> Storage Object Admin I downloaded the json key file, and then…
Anthony Kong
  • 37,791
  • 46
  • 172
  • 304
21
votes
3 answers

How do I grant a specific permission to a Cloud IAM service account using the gcloud CLI?

I know that I can do it via the UI (Cloud Console), and that I can also assign a role. Although, how do I grant a single permission easily? For example, I was pushing an image to Google Container Registry with a newly created service account, and I…
stkvtflw
  • 12,092
  • 26
  • 78
  • 155
20
votes
5 answers

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. kubectl create bash: kubectl create: command…
krmanish007
  • 6,749
  • 16
  • 58
  • 100
19
votes
4 answers

How to connect VSCode to GCP instances

I am trying to connect VSCode to my GCP instances but am unable to. From a terminal, I can ssh into the machines with gcloud compute ssh my_machine_name but I'm not sure how to translate that into what VSCode Remote-SSH is looking for. When I…
jss367
  • 4,759
  • 14
  • 54
  • 76
19
votes
3 answers

Google Cloud Functions Deploy "allow unauthenticated invocations..."

Whenever I have to deploy a new python function using the gcloud sdk I get this message Allow unauthenticated invocations of new function [function-name]? (y/N)? WARNING: Function created with limited-access IAM policy. To enable unauthorized…
19
votes
6 answers

Specify Dockerfile for gcloud build submit

I understand gcloud uses the Dockerfile specified in the root directory of the source (.) as in the command: gcloud builds submit --tag gcr.io/[PROJECT_ID]/quickstart-image . but I am trying to specify the Dockerfile to use to build the image which…
idrisadetunmbi
  • 877
  • 2
  • 9
  • 22
19
votes
4 answers

How do I list and view users' permissions with gcloud?

If I go to "IAM & admin" in the google cloud console and select the "IAM" tab on the left I see a list of users (username@mydomain). How do I list these users with gcloud? And how do I see what access a user has been given with gcloud? I have not…
red888
  • 27,709
  • 55
  • 204
  • 392
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
18
votes
2 answers

How can I save google cloud build step text output to file

I'm trying to use google cloud build. At one step, I need to get a list of all running compute instances. - name: gcr.io/cloud-builders/gcloud args: ['compute', 'instances', 'list'] and it works fine. Problem starts when I tried to save the…
Mahmoud Samy
  • 2,822
  • 7
  • 34
  • 78
18
votes
2 answers

How to authenticate with a Google Service Account in Jenkins pipeline

I want to use gcloud in Jenkins pipeline and therefore I have to authenticate first with the Google Service account. I'm using the https://wiki.jenkins.io/display/JENKINS/Google+OAuth+Plugin which holds my Private Key Credentials. I'm stuck with…
18
votes
1 answer

I want to use the output of `gcloud` in a script, but the format changes. What should I do?

I’m using the command gcloud compute instances list in a script, but I’m worried that the exact output format isn’t static. What should I do?
Zachary Newman
  • 20,014
  • 4
  • 39
  • 37
18
votes
2 answers

Automate gcloud components update

How can I update the gcloud components programmatically within a shell script? Calling gcloud components update requires an user entry, e.g.: $ gcloud components update The following components will be…
Dag
  • 10,079
  • 8
  • 51
  • 74
18
votes
10 answers

Google Container Registry access denied when pushing docker container

I try to push my docker container to the google container registry, using this tutorial, but when I run gcloud docker push b.gcr.io/my-bucket/image-name I get the error : The push refers to a repository [b.gcr.io/my-bucket/my-image] (len:…
hilnius
  • 2,165
  • 2
  • 19
  • 30
17
votes
3 answers

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
  • 3,697
  • 3
  • 15
  • 25