Information for: DEVELOPERS   PARTNERS   SUPPORT

Enabling external repos

Note

Use of this functionality should only be attempted by a developer in coordination with the RA team. Config management is not accounted for in the update process and must be handled by the subscriber.

  1. Add an acquia-ra.yml file above the docroot in your Acquia repository and external repository.

  2. SSH to the RA environment and create a new directory called “ra_external_repo_rsa” in the following path: /home/{ApplicationName}/.ssh/

  3. Run the following command to ensure that you do not already have an RA public key saved to your .ssh directory:

    ls ~/.ssh
    
  4. Do the following to generate a new public/private key pair using the keygen command without passphrase:

    1. Run the following keygen command:

      ssh-keygen -b 4096
      

      The keygen command prompts you for a directory to create the key in.

      Generating public/private rsa key pair. Press Enter to save the Key to the
      default directory (/Users/[user_dir]/.ssh/id_rsa):
      
    2. Enter the name “ra_external_repo_rsa” as your newly created certificate name and save the file to the default location of .ssh/id_rsa in your user directory.

      Enter passphrase (empty for no passphrase): [passphrase] Enter same
      passphrase again: [passphrase]
      
    3. Leave the [passphrase] empty.

      Leaving the password empty is not recommended under other circumstances. However, adding a password means that the automation would be unable to authenticate in order to use the certificate to access your external Git repository.

      The keygen command displays the following output:

      Generating public/private rsa key pair. Your identification has been saved
      in /Users/[user_dir]/.ssh/id_rsa. Your public key has been saved in
      /Users/[user_dir]/.ssh/id_rsa.pub. The key fingerprint is:
      5x:96:e9:cx:06:c2:57:26:2d:ef:2f:0c:d9:81:f4:1c [email protected]
      
  5. Copy the public key to your clipboard. Using your favourite text editor, you can open the ~/.ssh/ra_external_repo_rsa.pub file, and then copy the contents of the file manually.

  6. Add the public key to Github. https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

Example acquia-ra.yml file:

parameters:
   ra.ext_repo: [email protected]:shaysmith/ra-up.git
   ra.ext_branch: master
   ra.ext_merge_branch: master

ra.ext_repo: The location of the external repository.

ra.ext_branch: A branch in an external repository that RA will branch from when creating a new update branch. RA checks this branch for changes during steps 2 and 3 of the update process and will attempt to include those changes in the RA branch before proceeding.

ra.ext_merge_branch: A branch in an external repository that RA will attempt to merge the RA branch back into at the end of step 3.