Skip to main content
Enterprise Edition

Overview

Use Git sync to export workspace configuration to a repository you own as a pull request, then pull a reviewed commit into a workspace.

Connect a GitLab repository, push the workspace, and review the merge request and repository it creates.

Permissions

Viewers cannot sync.

Connect a provider

1

Open organization Git providers

Open Git providers in the organization sidebar (/organization/vcs).
Organization Git providers with GitHub, GitLab, and Bitbucket connections
2

Connect your provider

Click Connect on your provider, then follow its tab below.
  • Create a GitHub App through the manifest flow, or enter the App ID and private key of an existing GitHub App.
  • Install the app under the account or organization that owns your repositories, and grant it access to them.
  • The Create app tab lists the URLs Tracecat writes into the manifest, each with a copy button for GitHub Enterprise allowlists or app review:
PUBLIC_APP_URL and PUBLIC_API_URL are your TRACECAT__PUBLIC_APP_URL and TRACECAT__PUBLIC_API_URL values. On a localhost deployment, Tracecat creates the webhook inactive with a placeholder URL.
Use Update to rotate a token before it expires. Deleting credentials disconnects sync across the organization; it preserves workspace resources, repository branches, and custom-registry credentials.

Bind a workspace

1

Open workspace Git sync

Open Git sync in the workspace sidebar, then choose a Provider configured by your organization admin.
2

Connect the repository

Paste the repository’s SSH clone URL and click Connect. For GitHub, you can also choose a repository from the GitHub App installation list.
Connect a repository with a GitLab provider and SSH clone URL
  • Tracecat rejects HTTPS repository URLs and bare paths such as example-org/example-repo.
  • For Bitbucket Data Center, the hostname must match the configured instance. Tracecat uses HTTPS with your HTTP access token for Git and API requests.

Change the connection

Click Edit beside the repository name.
  • Branch sets the base branch for new exports and the commit list for pulls. A stored URL ending in @branch pins that branch; without the suffix, Tracecat uses the repository default.
  • Change edits the SSH URL. Click Save to apply it. Changing the repository or pinned branch clears the current previews.
  • Disconnect stops push and pull until you connect a repository again. It preserves workspace and repository content.
Repository connection editor with an SSH URL, branch selector, and disconnect action

What an export contains

A full export writes tracecat.json plus one folder per resource type. Here is a workspace with three workflows, two tables, two variables, a secret, case tags, and case fields after its first push:
GitLab repository tree with tracecat.json and folders for workflows, tables, variables, secret metadata, case fields, and case tags

The same export in GitLab after the merge request merges.

Exports also include agent presets, skills, case dropdowns, and case durations when the workspace has them. Tracecat excludes schedules.

File names and identity

  • Tracecat names each folder or file after the resource’s current name: workflows after their title, agent presets and skills after their slug, and variables and secret metadata after their environment and name.
  • The id field inside each file identifies the resource. Renaming a resource moves its file on the next push, and a pull updates the same resource in place.
  • When two resources of one type share a name, the one that already holds the path keeps it, and Tracecat appends the id to the other: workflows/Triage-alerts-wf_4f2a.../definition.yml. If neither has been pushed, the lower id gets the plain name. A resource keeps its path, suffix included, until you rename it.
  • Case tags share one case_tags/_all.yml file, listed under tags.
Keep each id unique. A pull rejects two files with the same id, so duplicate a resource in Tracecat instead of copying its folder. If two branches rename the same resource and both merge, push that resource from Tracecat to remove the extra copy.

Workflow scripts

  • Tracecat writes the script of each core.script.run_python action to workflows/<workflow>/scripts/<ref>.py. The action in definition.yml keeps its other arguments and has no script key.
  • Edit the .py file to change a script; a pull reads it back into the action. An action with no script, such as an empty Python step in a draft, gets no file.
  • If you rename an action’s ref, rename its script file too. A pull fails on any .py file in scripts/ that matches no Python action, and names the file.
  • Pushing a workflow deletes every file in its folder that Tracecat does not write, so keep your own notes outside workflows/.
GitLab workflow folder with definition.yml and a scripts folder

A workflow folder holds its definition and one script per Python action.

Configuration, not data

  • A secret file with a value or values key fails import.
  • Externally backed secrets also export their store name, remote reference (a secret name, ARN, or ID), and key mapping. If the target workspace has no authorized store with that name, the pull preview asks you to choose one for every secret that uses it.

Repositories from earlier versions

Earlier versions named paths by id (such as workflows/wf_4f2a.../definition.yml or case_tags/<id>.yml), kept one file per case tag, and wrote scripts inline in definition.yml.
  • Pulls still read these layouts. An inline script wins over a script file for the same action.
  • The next push moves each resource it writes to its readable path, or into case_tags/_all.yml, and deletes the old file.
  • A push of selected resources keeps every other tag in case_tags/_all.yml. A full push replaces the file with your workspace’s tags, deleting tags that exist only on the branch.
Upgrade every Tracecat instance that uses a repository before you push to it. Earlier versions reject readable paths and case_tags/_all.yml, import Python actions without their script files, and can leave stale script files that fail later pulls.
  • See Push and pull for exporting a workspace as a pull request and pulling a reviewed commit.
  • See Security architecture for the GitOps model and how registry versions resolve after a pull.
  • See Custom registry for syncing custom actions into the registry, which is separate from workspace Git sync.
  • See Roles and permissions for the scopes that gate connecting, exporting, and pulling.