
Git SyncApps
CertifiedEnterprise EditionSync Apps from Git to Kestra
Git SyncApps
Sync Apps from Git to Kestra
This task syncs apps from a given Git branch to Kestra. If the delete property is set to true, any app available in kestra but not present in the gitDirectory will be deleted, considering Git as a single source of truth.
Check the Version Control with Git documentation for more details.
type: io.kestra.plugin.ee.git.SyncAppsExamples
id: sync_apps_from_git
namespace: company.ops
tasks:
- id: git
type: io.kestra.plugin.ee.git.SyncApps
delete: true # optional; by default, it's set to false to avoid destructive behavior
url: https://github.com/kestra-io/apps # required
branch: main
username: git_username
password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
dryRun: true # if true, the task will only log which flows from Git will be added/modified or deleted in kestra without making any changes in kestra backend yet
triggers:
- id: every_full_hour
type: io.kestra.plugin.core.trigger.Schedule
cron: "0 * * * *"
Properties
auth Non-dynamic
Kestra API authentication
branch string
mainThe branch from which apps will be synced to Kestra
cloneSubmodules booleanstring
Clone submodules
Default false; enable to fetch and initialize nested submodules.
connectTimeout integerstring
10000HTTP connect timeout (ms)
Default 10000 ms.
delete booleanstring
falseWhether you want to delete apps present in kestra but not present in Git
It’s false by default to avoid destructive behavior. Use this property with caution because when set to true, this task will delete all apps from the targetNamespace and all its child namespaces that are not present in Git rather than only overwriting the changes.
dryRun booleanstring
falseDry run only
When true, writes a diff without applying changes to Kestra.
failOnMissingBranch booleanstring
trueFail if branch missing
Default true. If false, falls back to creating the requested branch from the repository's default branch when the rendered branch does not exist on the remote. This means the sync then reads content from the default branch instead of the requested one, and with delete set to true it can delete namespace content that only exists on the requested branch.
failOnMissingDirectory booleanstring
trueFail if git directory missing
Default true. If false, skips when the rendered gitDirectory path does not exist.
gitConfig object
Git configuration overrides
Map of git config keys and values applied after clone, e.g.:
- core.fileMode: false (ignore permission flips)
- core.autocrlf: false (preserve line endings)
gitDirectory string
_appsDirectory from which apps should be synced
kestraUrl string
Kestra API URL
URL of the Kestra server API.
If not set, the URL of the default SDK authentication is used, set with the kestra.tasks.sdk.authentication.url configuration property, or at the namespace or the tenant level on the Enterprise Edition.
It then falls back to the kestra.url configuration property, and finally to http://localhost: 8080.
knownHosts string
Known hosts file content used for SSH host key verification
OpenSSH known_hosts-formatted content used to verify the remote server's SSH host key. If not set, the system/user known_hosts file is used. Only relevant when strictHostKeyChecking is true.
namespace string
The namespace to sync apps to
If set, apps are deployed to this namespace, overriding the namespace declared in the app YAML (the declared namespace can then be omitted). Only apps in this namespace and its child namespaces are considered, and with delete enabled only those apps are eligible for deletion. The flow referenced by each app's flowId must exist in this namespace. If left empty, apps keep the namespace declared in their YAML and the task operates across all namespaces (the previous behavior).
noProxy booleanstring
Disable proxy for HTTP
When true, forces direct connections instead of using the JVM proxy settings.
passphrase string
Passphrase for privateKey
password string
Password or personal access token
Supplies HTTP credentials. When a PAT is used, pushes are recorded under that PAT’s user without needing authorName and authorEmail.
**GitHub PAT permissions required: **
- Fine-grained PAT:
Contents: Read(clone/fetch) orContents: Read and Write(push), plusMetadata: Read(mandatory base permission). AddWorkflows: Read and Writewhen pushing.github/workflows/files. - Classic PAT:
reposcope covers all read/write operations; addworkflowwhen pushing workflow files.
privateKey string
PEM private key
PEM-formatted private key matching a public key registered on the Git server. Generate with ssh-keygen -t ecdsa -b 256 -m PEM.
readTimeout integerstring
60000HTTP read timeout (ms)
Default 60000 ms.
strictHostKeyChecking booleanstring
Whether to verify the SSH remote server's host key
When enabled, the host key presented by the Git server is verified against knownHosts (if provided) or the system/user known_hosts file. Disabling it exposes the connection to man-in-the-middle attacks (CWE-297). Set knownHosts alongside this property for a hardened setup. The default differs by edition: disabled (false) on Kestra OSS, enabled (true) on Kestra Enterprise Edition.
trustedCaPemPath string
Extra trusted CA PEM path
Optional PEM-encoded CA bundle added to the JVM truststore; equivalent to git config http.sslCAInfo <path> for self-signed or internal CAs.
url string
Repository URL
HTTP(S) or SSH URI used for clone and push operations.
username string
Username or organization
Used for HTTP basic authentication and as a fallback commit author.