---
title: "Multi-Git Remote Deployment: ACLI & Code Studio"
date: "2025-01-09T14:40:21+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/code-studio/help/88731-multi-git-remote-deployment-acli-code-studio"
id: "58c89f24-36b5-458e-acc0-3962cf830b3d"
---

Table of contents will be added

Goal
----

Push build artifact to multiple remotes using acli "push:artifact" command in Code Studio

Prerequisites
-------------

*   Code Studio Build Setup with ACLI

Overview
--------

[Acquia CLI](https://docs.acquia.com/acquia-cloud-platform/add-ons/acquia-cli) is an open source command-line interface for interacting with [Acquia Cloud Platform](/node/55808) services. One of the command ACLI provide is [push:artifact](https://docs.acquia.com/acquia-cloud-platform/add-ons/acquia-cli/commands/push:artifact). This commands builds a sanitized deploy artifact and it also simplifies the deployment process by pushing the finalized artifact directly to the Git remotes hosted on the [Acquia Cloud Platform](/node/55808).

In this tutorial, we will dive into the procedure for using the [push:artifact](https://docs.acquia.com/acquia-cloud-platform/add-ons/acquia-cli/commands/push:artifact) command within [Code Studio](/node/55936) to efficiently dispatch the artifact across multiple Git remotes.

1.  Multiple Remote Push Using Environment Variable
    -----------------------------------------------
    
    *   Open the CI/CD settings of the project in Code Studio
    *   Expand the Variables section and add a new variable named **ACLI\_PUSH\_ARTIFACT\_DESTINATION\_GIT\_URLS**
    *   In the value of this variable, add comma separated values of the GIT remotes. Example - If two GIT remotes are REMOTE1 and REMOTE2, then the value of this variable will be - **REMOTE1,REMOTE2**
    *   Save the variable and now run the build and check for push to the configured remotes
        
    
    ![Settings menu with a dropdown showing options like CI/CD, indicated by a red arrow, on a software platform interface.](https://acquia.widen.net/content/e7rv9d3zbw/web/url_9671474b1ef994460e63bcf34f3f024c.webp?v=b6389fe4-a003-4f7d-9ed3-6e3a7d067b53)
    
    ![Screenshot of a CI/CD variables page showing a variable key, masked value, environments, and actions with edit and delete options.](https://acquia.widen.net/content/ei1y9fctsw/web/url_e02441612e0eee7083e3c360551ba879.png?v=90dee9bb-0f39-4918-9795-5021bb105cc6)
    
    ![CI/CD variable configuration screen showing key and value fields with Git URLs and precedence information.](https://acquia.widen.net/content/gpgwhuqcu2/web/url_4dfe4f42b76195c030f48faa826deef5.png?v=729964f6-f54c-4249-a40c-fb0b77d95186)
    

1.  Multiple Remote Push Using ACLI Config File
    -------------------------------------------
    
    *   Add a file name **.acquia-cli.yml** in your project root folder
    *   In this file, add the git remotes where we want to push the artifact
    *   Save the file, commit code and push to repo and verify the deployment to the remotes
    
        push:
         artifact:
         destination-git-urls:
         - GIT_REMOTE1_HERE
         - GIT_REMOTE2_HERE
    

1.  Multiple Remote Push Using ACLI Command Option
    ----------------------------------------------
    
    If you are not using Code Studio but other CI/CD build tool where executing **acli push:artifact** command yourself, in this case, you can use the -**\--destination-git-urls** command option to provide the multiple GIT remotes.
    
    ACLI push:artifact command, provides this option and can be used like below -
    
        acli push:artifact --destination-git-urls=GITREMOTE1HERE --destination-git-urls=GITREMOTE2H
    

Warning

To define and use the git remotes from ACLI config file, make sure that ACLI version is at-least 2.30.0

Additional Resources
--------------------

*   [ACLI](https://docs.acquia.com/acquia-cloud-platform/add-ons/acquia-cli)
*   [Code Studio](/node/55936)