> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Travis CI sync

> Learn how to configure a Travis CI Sync for Infisical.

Infisical's Travis CI Sync keeps your Travis CI repository environment variables in sync with an Infisical project. Account-level environment variables (`account_env_vars`) aren't managed by this sync, only repository-scoped environment variables are.

> [!NOTE]
>
> `account_env_vars` aren't exposed by the Travis CI API for listing or creation, so Infisical can't sync them.

**Prerequisites:**

* Set up and add secrets to [Infisical Cloud](https://app.infisical.com)
* Create a [Travis CI Connection](https://infisical.com/docs/integrations/app-connections/travis-ci.md)

> [tab] Infisical UI
>
> **1. Add Sync**
>
> Navigate to **Project** > **Integrations** and select the **Secret Syncs** tab. Select the **Add Sync** button.
>
> ![Secret Syncs Tab](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/general/secret-sync-tab.png)
>
> **2. Select 'Travis CI'**
>
> Select the **Travis CI** option from the list of destinations.
>
> ![Select Travis CI](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/travis-ci/select-travis-ci-option.png)
>
> **3. Configure source**
>
> Configure the **Source** from where secrets should be retrieved, then click **Next**.
>
> ![Configure Source](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/travis-ci/travis-ci-source.png)
>
> * **Environment**: The project environment to retrieve secrets from.
>
> * **Secret Path**: The folder path to retrieve secrets from.
>
> > [!TIP]
> >
> > If you need to sync secrets from multiple folder locations, check out [secret imports](https://infisical.com/docs/documentation/platform/secret-reference.md#secret-imports).
>
> **4. Configure destination**
>
> Configure the **Destination** to where secrets should be deployed, then click **Next**.
>
> ![Configure Destination](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/travis-ci/travis-ci-destination.png)
>
> * **Travis CI Connection**: The Travis CI Connection to authenticate with.
> * **Repository**: The Travis CI repository to sync secrets to.
> * **Branch** *Optional*: The branch that synced environment variables will be scoped to on Travis CI. If left empty, the sync will manage environment variables that aren't scoped to any branch (i.e. repository-level variables).
>
> **5. Configure Sync Options**
>
> Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
>
> ![Configure Options](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/travis-ci/travis-ci-options.png)
>
> * **Initial Sync Behavior**: Determines how Infisical should resolve the initial sync.
>   * **Overwrite Destination Secrets**: Removes any environment variables at the destination not present in Infisical.
>
> > [!NOTE]
> >
> > Travis CI does not support importing secrets.
>
> * **Key Schema**: Template that determines how secret names are transformed when syncing, using `{{secretKey}}` as a placeholder for the original secret name and `{{environment}}` for the environment.
>
> > [!NOTE]
> >
> > We highly recommend using a Key Schema to ensure that Infisical only manages the specific keys you intend, keeping everything else untouched.
>
> * **Auto-Sync Enabled**: If enabled, secrets will automatically be synced when changes occur at the source location. Disable to enforce manual syncing only.
> * **Disable Secret Deletion**: If enabled, Infisical will not remove environment variables from Travis CI during a sync. Enable this option if you intend to manage some environment variables manually outside of Infisical.
>
> **6. Configure details**
>
> Configure the **Details** of your Travis CI Sync, then click **Next**.
>
> ![Configure Details](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/travis-ci/travis-ci-details.png)
>
> * **Name**: The name of your sync. Must be slug-friendly.
> * **Description**: An optional description for your sync.
>
> **7. Review configuration**
>
> Review your Travis CI Sync configuration, then click **Create Sync**.
>
> ![Confirm Configuration](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/travis-ci/travis-ci-review.png)
>
> **8. Sync created**
>
> If enabled, your Travis CI Sync will begin pushing your Infisical secrets to the configured repository (and branch, if scoped).
>
> ![Sync Created](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/secret-syncs/travis-ci/travis-ci-created.png)

> [tab] API
>
> To create a **Travis CI Sync**, make an API request to the [Create Travis CI Sync](https://infisical.com/docs/api-reference/endpoints/secret-syncs/travis-ci/create.md) API endpoint.
>
> The `branch` field inside `destinationConfig` is optional. Omit it to manage repository-level environment variables, or set it to scope the sync to a specific branch on Travis CI.
>
> ### Sample request
>
> ```bash Request theme={"dark"}
> curl    --request POST \
>         --url https://app.infisical.com/api/v1/secret-syncs/travis-ci \
>         --header 'Content-Type: application/json' \
>         --data '{
>             "name": "my-travis-ci-sync",
>             "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
>             "description": "Push Infisical secrets to the Travis CI repository",
>             "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
>             "environment": "dev",
>             "secretPath": "/",
>             "isAutoSyncEnabled": true,
>             "syncOptions": {
>                 "initialSyncBehavior": "overwrite-destination",
>                 "disableSecretDeletion": false
>             },
>             "destinationConfig": {
>                 "repositoryId": "12345678",
>                 "repositorySlug": "my-org/my-repo",
>                 "branch": "main"
>             }
>         }'
> ```
>
> ### Sample response
>
> ```bash Response theme={"dark"}
> {
>     "secretSync": {
>         "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
>         "name": "my-travis-ci-sync",
>         "description": "Push Infisical secrets to the Travis CI repository",
>         "isAutoSyncEnabled": true,
>         "version": 1,
>         "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
>         "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
>         "createdAt": "2026-04-17T05:31:56Z",
>         "updatedAt": "2026-04-17T05:31:56Z",
>         "syncStatus": "succeeded",
>         "lastSyncJobId": "123",
>         "lastSyncMessage": null,
>         "lastSyncedAt": "2026-04-17T05:31:56Z",
>         "importStatus": null,
>         "lastImportJobId": null,
>         "lastImportMessage": null,
>         "lastImportedAt": null,
>         "removeStatus": null,
>         "lastRemoveJobId": null,
>         "lastRemoveMessage": null,
>         "lastRemovedAt": null,
>         "syncOptions": {
>             "initialSyncBehavior": "overwrite-destination",
>             "disableSecretDeletion": false
>         },
>         "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
>         "connection": {
>             "app": "travis-ci",
>             "name": "my-travis-ci-connection",
>             "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
>         },
>         "environment": {
>             "slug": "dev",
>             "name": "Development",
>             "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
>         },
>         "folder": {
>             "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
>             "path": "/"
>         },
>         "destination": "travis-ci",
>         "destinationConfig": {
>             "repositoryId": "12345678",
>             "repositorySlug": "my-org/my-repo",
>             "branch": "main"
>         }
>     }
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.