On Acquia Cloud, your website’s source code (Drupal core, contributed modules, and themes) is stored in a version control system and deployed to the web server. Acquia Cloud supports the Git and Subversion (SVN) version control systems, and you can use either of these for your code repository.
Using Acquia Dev Desktop to get started with Acquia Cloud
The easiest and fastest way to get started with Acquia Cloud is to use Acquia Dev Desktop. Acquia Dev Desktop installs Git if you don't already have it, tells Git where your SSH key is, and provides a GUI for Git commands to sync between your local code repository and your remote Acquia Cloud code repository (cloning, pulling, committing, and pushing). Learn about installing Dev Desktop.
If you don't want to use Acquia Dev Desktop, you can instead get started using the procedures described in this page.
Preparing to use your Git code repository
Complete the following steps to prepare to use your remote Acquia Cloud code repository for the first time.
Add an SSH key
Git uses SSH keys to authenticate users. Because of this, you must add an SSH key to your Acquia Cloud account.
If you do not already have an SSH key that you want to use, create a new one. For instructions on how to create a new SSH key, see Generating an SSH public key.
After you ensure that you have an SSH key on your computer, complete the following steps to add the key to Acquia Cloud :
- Click your name in the upper right of the Acquia user interface, then click View profile to open your Acquia profile.
Or, just click here.
- In your Acquia profile, click Credentials.
- On the Credentials page, under SSH keys, click Add SSH key.
- Enter the SSH key nickname, such as the name of the person who owns the key.
- Using a text editor, open your SSH public key file, and then copy the contents of the file to the clipboard, ensuring that you don't add any extra lines or spaces to the copied key.
By default, the file name is
If you can't either view or edit the public key file
If you can't either view or edit your public key file using a text editor, use a command like one of the following to copy the contents of the key file directly to the clipboard:
pbcopy < ~/.ssh/id_dsa.pub
sudo apt-get install xclip
xclip -sel clip < ~/.ssh/id_dsa.pub
Windows with GitBash
clip < ~/.ssh/id_dsa.pub
- Paste the OpenSSH-formatted key into the SSH public key field. OpenSSH public keys start with
ssh-rsa, and appear similar to the following example:
- Click Add key.
Entering the key
Install a Git client
If you don't already have a Git client installed on your computer, use Acquia Dev Desktop, or download and install a Git client using the method based on your operating system:
- Mac OS X - Use the Git OS X Installer. If you use the Homebrew package manager, run
brew install git. For a GUI version of Git, install GitX.
- Windows - Use Git for Windows (msysgit)
(command line) or TortoiseGit (GUI).
- Ubuntu - To install Git using the command line, use the following command:
sudo apt-get install git-core
More information is available at the official Git website.
Clone your repository
To work on your website's code locally, you need to create a local clone of your Acquia Cloud Git repository. You can do this easily using Acquia Dev Desktop, or you can use Git command line commands.
To clone your repository, you will need your website's Git URL, which you can find on the Cloud page.
After you obtain your website's Git URL, use the following command line-based example to make a clone of your website's code repository on Acquia Cloud:
- Open a command prompt window, and then change to the local directory in which you want to create the cloned code repository. Ensure that you have read and write access to the directory (for example, by cloning the code repository into your home directory).
- Direct Git to clone the Acquia Cloud code repository to your local computer:
git clone [Git URL]
[Git URL]is the Git URL from your website's Cloud page.
Committing and pushing your changes to Acquia Cloud
After you prepare your code repository for use, you'll need to be sure to commit and push any changes you make to your local code to the code repository on Acquia Cloud.
For example, using the command line interface, you add a new Views contrib module to your website:
curl -o views.tar.gz http://ftp.drupal.org/files/projects/views-6.x-2.14.tar.gz
tar -xzf views.tar.gz && rm views.tar.gz
To add the Views module to your Git repository, use the following command:
git add views
You then need to commit your changes, and push them to the Acquia Cloud repository.
git commit -m 'Add Views 6.x-2.14'
git push origin master
Finding help for Git
For more information about how to use Git, see the following online resources:
- The Git Community Book, which is the official documentation for the project
- Pro Git, a book by Scott Chacon of Github, and available free online
- Git Reference manual, a reference to Git commands
- Git Immersion, a series of tutorials
- Git cheat sheets from DevCheatSheet.com
Go to the next page to learn about managing your workflow and publishing your website.