get-value project returns "unset"

Viewed 669

I am trying to follow the tutorial on how to start up a gcloud cloud service.

https://cloud.google.com/cloud-build/docs/quickstart-build

In order to build a docker project I need to run this command.

gcloud config get-value project

This supposedly gives me the project-id which I am supposed to use in the next step.

However I get "(unset)" which I cannot use this in the next step :

enter image description here

How do I set my project-id? This tutorial seems to be wrong.

1 Answers

gcloud projects list will give you the list of projects. Find the project id from that list and use it in gcloud config set project <projectid>.

If you don't get the list of projects, use gcloud auth login to login to your GCP account and then execute above commands.

Related