- NAME
- gcloud-init - Initialize a gcloud workspace in the current directory.
- SYNOPSIS
-
gcloud init PROJECT [--format FORMAT] [--help] [--project PROJECT] [--quiet, -q] [-h]
- DESCRIPTION
- This command is used to create a local workspace for your Google Cloud Platform project.
-
The local workspace is indicated by the creation of a [.gcloud]
folder. In this folder is a file [properties] which allows you to
override any global properties you may have set via the
gcloud config
command. - When you run a Cloud SDK command-line tool from within this new workspace, it will use the new [properties] file as the first place to load properties. As a result, if you use gcloud, gcutil, gsutil, or any of the other commands in google-cloud-sdk/bin from within the workspace, they will connect to the correct project.
-
If you have enabled push-to-deploy in the Cloud Console, one of the
things that
gcloud init
will do for you is cloning the Google-hosted git repository associated with PROJECT. This repository will automatically be connected to Google, and it will use the credentials indicated as "active" bygcloud auth list
. Pushing to the origin’s "master" branch will trigger an App Engine deployment using the contents of that branch. - POSITIONAL ARGUMENTS
-
-
PROJECT
- The name of the Google Cloud Platform project that you want to use in a local workspace that will be created by this command. If this project has an associated Google-hosted git repository, that repository will be cloned into the local workspace.
-
- FLAGS
-
-
--format
FORMAT
- Specify a format for printed output. By default, a command-specific human-friendly output format is used. Setting this flag to one of the available options will serialize the result of the command in the chosen format and print it to stdout. Supported formats are: "json", "text", "yaml".
-
--help
- Display detailed help.
-
--project
PROJECT
- Google Cloud Platform project to use for this invocation.
-
--quiet
- Disable all interactive prompts when running gcloud commands. If input is required, defaults will be used, or an error will be raised.
-
-h
- Print a summary help and exit.
-
- EXAMPLES
- To perform a simple "Hello, world!" App Engine deployment with this command, run the following command lines with MYPROJECT replaced by a project you own and can use for this experiment.
-
$ gcloud auth login $ gcloud init MYPROJECT $ cd MYPROJECT/default $ git pull https://github.com/GoogleCloudPlatform/appengine-helloworld-python $ git push origin master
gcloud init
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License , and code samples are licensed under the Apache 2.0 License . For details, see our Site Policies .
Last updated August 11, 2014.