Using Git repositories with Cloud 66

Public repositories

For public Git repositories, you don’t need to add the SSH key provided to your Git account. You simply need to provide the Git URL as either

http://<git provider>/<username>/<repository>.git

or

git://<git provider>/<username>/<repository>.git

Notice

We do not support the use of HTTPS URLs.

This URL is often generated by your Git provider automatically.

Private repositories

For Cloud 66 to access your private repository (with read-only access), you first need to add the SSH provided to your Git account. Follow the instructions on the Get started building your application page, clicking the How? link.

You can add this SSH key globally to your GitHub account by adding it to your Account settings page, or allow access to a specific repository by adding it as a Deploy key to that repository.

Once this is done, use a Git URL in the following format:

git@<git provider>:<username>/<repository>.git

This URL is often generated by your Git provider automatically.

GitHub example

  1. Adding the SSH key globally
  2. Adding the SSH key to a specific repository

Once this is done, use a Git URL in the following format in the Cloud 66 UI:

git@github.com:<username>/<repository>.git

BitBucket example

  1. Adding the SSH key globally
  2. Adding the SSH key to a specific repository

Once this is done, use a Git URL in the following format in the Cloud 66 UI:

git@bitbucket.org:<username>/<repository>.git

Using GitHub with Cloud 66

GitHub is a great resource for developers, and using it with Cloud 66 couldn’t be easier. While you use GitHub for the revision control of your code, you can use Cloud 66 to deploy and manage your app in any cloud at all stages of your development.

For this demonstration, we’ll be using a Cloud 66 sample Rails app with a MySQL backend that is conveniently hosted on GitHub.

Once we’re ready to deploy this app, we simply copy the Git URL provided by GitHub into the Cloud 66 New application page. We’re using the SSH URL, because we’ve added the SSH key provided to our GitHub account.

Here you can choose your branch, your application name and which environment you’d like to deploy. Hit Analyze and we’ll take you to the next step.

Having analyzed your code, Cloud 66 will give you a brief summary of your application.

In addition to this, you’ll be able to define which Ruby version you’d like to deploy, as well as other framework configurations. You can then decide where you’d like to deploy.

You can also determine details about your deployment, such as where to deploy the MySQL server. Once you hit Deploy, we’ll set up your servers and deploy your app to them. You’ll see exactly what’s happening at every step of the way, and once it’s done, you’ll be able to manage your application.

When you push code changes to your GitHub repository, you can simply click Deploy again to push this code to your servers. You can also set up continuous deployment by adding a Cloud 66 redeployment hook to your GitHub repository.

Visiting the URL or IP of the server, you can see your application running.

The Deployment timeline page gives you great insight into which code revision has been deployed and by who. You can also revert back to previous commits if need be.