- gcloud alpha source repos clone - clone a cloud source repository
gcloud alpha source repos clone REPOSITORY_NAME [DIRECTORY_NAME] [--dry-run] [--use-full-gcloud-path] [GCLOUD_WIDE_FLAG ...]
(ALPHA) This command clones a git repository from the currently active
Each Google Cloud project can have zero or more git repositories associated with it. To see the available repositories, run:
- $ gcloud alpha source repos list
The clone operation configures the local clone to use your gcloud credentials to authenticate future git operations. This command emits a warning if the cloud source repository is a mirror.
Name of the repository.
Directory name for the cloned repo. Defaults to the repository name.
If provided, prints the command that would be run to standard out instead of
If provided, use the full gcloud path for the git credential.helper. Using the
full path means that gcloud does not need to be in the path for future git
operations on the repository.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
The example commands below show a sample workflow.
- $ gcloud init $ gcloud alpha source repos clone REPOSITORY_NAME DIRECTORY_NAME $ cd DIRECTORY_NAME $ git push origin master
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud source repos clone $ gcloud beta source repos clone