Actions26
Overview
The node "Git Extended" enables running various Git commands directly within an n8n workflow. It supports a wide range of Git operations such as cloning repositories, pulling and pushing changes, managing branches, commits, tags, and more. This node is beneficial for automating version control tasks in CI/CD pipelines, synchronizing code repositories, or integrating Git workflows with other automation processes.
For the Pull operation specifically, the node pulls changes from a remote Git repository into a local repository path. It supports authentication methods (including custom username/password), specifying the remote and branch to pull from, and options to skip downloading Git LFS objects to optimize performance.
Practical example:
- Automatically update a local repository clone with the latest changes from a remote branch before triggering a build or deployment step.
- Periodically synchronize content from a remote Git repository to keep data up-to-date in an automated workflow.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method to authenticate with the Git remote: - Authenticate (using an API key credential) - Custom (username and password) - None (no authentication) |
| Username | Username for custom authentication (shown if Authentication is "Custom") |
| Password | Password for custom authentication (shown if Authentication is "Custom") |
| Repository Path | Filesystem path where the Git command will be executed. For pull, this is the local repository directory |
| Remote | Name of the remote repository to pull from (default: "origin") |
| Branch | Branch name to pull from (optional; if empty, defaults to the currently checked-out branch) |
| Skip LFS Smudge | Whether to set environment variable GIT_LFS_SKIP_SMUDGE=1 to skip downloading Git Large File Storage (LFS) objects during pull (default: false) |
| Skip Stdout | Whether to ignore the command output to avoid maxBuffer errors (default: false) |
Output
The node outputs JSON data containing the results of the executed Git pull command:
stdout: The standard output text from the Git pull command, trimmed of whitespace.stderr: The standard error text from the Git pull command, trimmed of whitespace.
If the Skip Stdout option is enabled, the output JSON will be empty ({}) to prevent buffer overflow issues when large outputs are expected.
No binary data output is produced by this operation.
Dependencies
- Requires Git to be installed and accessible on the system where n8n runs.
- Supports authentication via:
- An API key credential configured in n8n (generic reference).
- Custom username and password provided as input parameters.
- No additional external services are required beyond access to the target Git repository.
Troubleshooting
Common issues:
- Incorrect repository path: Ensure the
Repository Pathpoints to a valid local Git repository. - Authentication failures: Verify credentials are correct and have sufficient permissions.
- Network connectivity problems: Confirm network access to the remote Git server.
- Large output causing maxBuffer errors: Enable
Skip Stdoutto avoid these errors.
- Incorrect repository path: Ensure the
Error messages:
Unsupported operation Pull: Indicates the operation parameter was not recognized; ensure "Pull" is selected.Failed to parse the repository URL: Occurs if the remote URL is malformed or credentials cannot be embedded properly.Command failed with exit code X: Generic Git error; check the stderr output for details.
To resolve errors, verify all input parameters, especially authentication and repository paths, and consult the Git command line manually if needed.