Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

Cloning the application Git repository using rhc


In the Cloning the application to the local machine recipe in Chapter 1, Getting Started with OpenShift, you learned how to clone the Git repository using the Git command-line tool. This recipe had a couple of steps—first, to copy the Git repository URL from the web console and second, to use the git-clone command to clone the Git repository. The rhc command-line tool can help you save some keystrokes. In this recipe, you will learn how to use rhc to clone the Git repository.

Getting ready

To step through this recipe, you will need rhc installed on your machine. Also, we will use the OpenShift application created in The Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

To clone the myapp application on your local machine using rhc, run the following command:

rhc git-clone --app myapp

How it works…

The rhc git-clone command first makes a HTTP GET request to fetch the details about the myapp application. The...