This task allows you to clone a Git repository into a working directory and then use the files from that repository in downstream tasks.
To use the
io.kestra.plugin.git.Clone task in your flow, make sure to add it as the first child task of the
WorkingDirectory task. Otherwise, you’ll get an error:
Destination path "xyz" already exists and is not an empty directory. This happens because you can only clone a GitHub repository into an empty working directory.
io.kestra.plugin.git.Clone task directly as the first child task of the
WorkingDirectory task will ensure that you clone your repository into an empty directory before any other task would generate any output artifacts.
Typically, you would want to use
io.kestra.plugin.git.Clone with a private GitHub repository. Make sure to:
- Add your organization/user name as
- Generate your access token and provide it on the
Below you can find links to instructions on how to generate an access token for the relevant Git platform: