DevelopAfter your website is installed or imported to Acquia Cloud, the next step is to be able to change your website’s source code.

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 the Windows or Mac/Linux SSH key Help pages.

After you ensure that you have an SSH key on your computer, complete the following steps to add the key to Acquia Cloud :

  1. Click your name in the upper right of the Acquia user interface, then click View profile to open your Acquia profile.

    Edit Profile

    Or, just click here.

  2. In your Acquia profile, click Credentials.
  3. On the Credentials page, under SSH keys, click Add SSH key.
  4. Enter the SSH key nickname, such as the name of the person who owns the key.

    Add SSH Key

  5. Entering the key

  6. 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 ~/.ssh/ or ~/.ssh/

    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:

    • Mac

      pbcopy < ~/.ssh/

    • Linux

      sudo apt-get install xclip
      xclip -sel clip < ~/.ssh/

    • Windows with GitBash

      clip < ~/.ssh/

  7. Paste the OpenSSH-formatted key into the SSH public key field. OpenSSH public keys start with ssh-dss or ssh-rsa, and appear similar to the following example:

    ssh-dss  AAAAG1bB0us3MAAACBALFF6+dpSkO6bwbJ6BCCwbGavQPqR3JSwGWWm1ZCg2
    Zb6r1IZJmx+/ORjcg== user@hostname

  8. Click Add 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:

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:

  1. 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).
  2. Direct Git to clone the Acquia Cloud code repository to your local computer:

    git clone [Git URL]

    where [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:

cd $HOME/mysite/docroot/sites/all/modules
curl -o views.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:

How do I let people see my website?

Go to the next page to learn about managing your workflow and publishing your website.

Sign in to vote or comment