Git Clone
Clones a Git repository from a URL into a local directory.
Inputs#
| Port | Description |
|---|---|
| The URL of the Git repository to clone (e.g., https, ssh). | |
| The local directory path where the repository will be cloned. | |
| The specific branch to clone. If empty, the remote's default branch is used. | |
| Whether to checkout the specified reference after cloning. Defaults to true. | |
| If true, only the specified reference will be cloned (no other branches or tags). | |
| Creates a shallow clone with a history truncated to the specified number of commits. A value of 0 or less means a full clone. | |
invalid port type: credentials |
Optional credentials for accessing private repositories. If not provided, the node will use the default Git configuration. |
Outputs#
| Port | Description |
|---|---|
| Executes if the clone operation is successful. | |
| Executes if the clone operation fails. | |
invalid port type: git-repo Repository |
The cloned Git repository object. |
Addendum#
This node uses the go-git library to perform a clone operation.
Authentication#
For private repositories, ensure that the necessary credentials are configured in your environment's Git configuration or provide them through a secrets management system.
Example#
To clone the main branch of the Actionforge repository into a my-project directory:
- URL: https://github.com/actionforge/actionforge.git
- Directory: ./my-project
- Branch: main
ID: git-clone@v1