
Git PushExecutionFiles
CertifiedPush execution files to Git
Git PushExecutionFiles
Push execution files to Git
Stages execution output files from the working directory or storage and pushes them to Git under gitDirectory (default _outputs). Branch is created if missing; use dryRun to only generate the diff.
type: io.kestra.plugin.git.PushExecutionFilesExamples
Push output files generated from task to Git
id: push_exec_files
namespace: company.team
tasks:
- id: generate
type: io.kestra.plugin.scripts.python.Script
taskRunner:
type: io.kestra.plugin.core.runner.Process
outputFiles:
- report.txt
script: |
with open("report.txt", "w") as f:
f.write("Analysis done")
- id: push
type: io.kestra.plugin.git.PushExecutionFiles
files:
- "*.txt"
gitDirectory: analytics
url: https://github.com/company/data-pipeline
username: git_user
password: "{{ secret('GITHUB_TOKEN') }}"
branch: data-reports
commitMessage: "Add CSV and JSON reports {{ now() }}"
Push and rename execution outputs using filesMap
id: push_with_map
namespace: company.logs
tasks:
- id: generate
type: io.kestra.plugin.scripts.shell.Script
outputFiles:
- "run.log"
script: |
echo "Run completed at $(date)" > run.log
- id: push
type: io.kestra.plugin.git.PushExecutionFiles
filesMap:
"run-{{ execution.id }}.log": "{{ outputs.generate.outputFiles['run.log'] }}"
gitDirectory: logs
url: https://github.com/company/log-archive
username: git_user
password: "{{ secret('GITHUB_TOKEN') }}"
branch: logs
commitMessage: "Archive log for run {{ execution.id }}"
Properties
auth Non-dynamic
Kestra API authentication
branch string
mainBranch to push files
Defaults to main; created if absent.
cloneSubmodules booleanstring
Clone submodules
Default false; enable to fetch and initialize nested submodules.
commitMessage string
Add files from execution {{ execution.id }}Git commit message
connectTimeout integerstring
10000HTTP connect timeout (ms)
Default 10000 ms.
delete booleanstring
trueDelete removed resources
If true (default), removes Git files that no longer exist in Kestra.
dryRun booleanstring
falseDry run only
When true, writes a diff file without pushing. Default false pushes immediately.
errorOnMissing booleanstring
falseFail when no files are found
If true, raises an error when nothing matches files or filesMap; default false logs a warning and skips.
files Non-dynamicobject
Glob pattern(s) for execution files
Matches files relative to the execution working directory.
filesMap Non-dynamicobjectstring
Explicit file map
Map of destination filename to source file URI (string or JSON map). Useful for wiring outputFiles from other tasks.
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
_outputsDestination directory
Relative path inside the repository; defaults to _outputs.
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.
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.
pushMode string
SYNCSYNCDELETE_ONLYPush mode
SYNC (default) writes every matched resource to the work tree and stages it, in addition to staging removals when delete is true — this is the standard push behavior, unchanged.
DELETE_ONLY stages only the removal of resources no longer present on the instance: it leaves already-pushed, still-matching resources untouched even if they changed since the last push. Use it to push a deletion without re-pushing unrelated modified resources. DELETE_ONLY implies deletion staging, so setting delete to false together with DELETE_ONLY is ignored (a warning is logged).
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.