Fetch from Git

Use the Fetch from Git bundled plugin to download source files from a Git repository.

Note: To fetch content from your current product or Git repository, PulseUno uses the Fetch Sources step.

Configuration

When you add this plugin step to a chain, specify the following configuration details:

Field Description  
Title Enter a name for the plugin step.
URL for repository

Enter the network address of the Git repository to fetch from, for example:

https://github.com/jenkinsci/dimensionscm-plugin.git
git@git.server.com:author/project.git

Branch (Optional) Specify a branch to fetch.
Commit ID or a tag (Optional) Specify a commit or tag to fetch. By default, the plugin fetches the last commit.
Paths to fetch (Optional) To fetch only specific directories, enter directory paths, one path per line. By default, the plugin fetches the entire branch.
Clean workspace before fetch (Optional) Select this option to clean your local workspace before fetching source files.
Workspace subdirectory to fetch files into

(Optional) Specify the subdirectory to download source files to, for example:

/subrepository

By default, the fetched files replace the entire content of the local workspace.

Authentication type Select how to connect to the Git repository you're fetching from:
Automatically using PulseUno

If you're fetching a PulseUno Git repository, connect automatically using your current PulseUno account.

Note: The fetch works only if your product is set as trusted for the specified Git repository. For details, see Define trusted products for a Git repository.

Anonymously Use the guest connection to check out a public Git repository.
By login and password Enter the username and password to access the specified Git repository.
By private key

To connect via SSH, enter the path to a custom private key, relative to SSH agent directory, and specify the private key passphrase.

Supported key types: 

  • RSA 1024–4096 (RSA 3072 or 4096 are recommended)

  • ECDSA-256

Use PEM format for the private key. For example, to generate an RSA 4096 key in keygen, enter:

ssh-keygen -m PEM -t rsa -b 4096

Control options

(Optional) Expand Control options and define the following settings:

  • Enable step. Leave this option selected to enable the step to run. Clearing this option deactivates the step.

  • Ignore unit test counts in reviews, pull requests and changesets. Select this option to exclude the results of post-processing unit tests from the chain run results.

    If your chain has several steps of the same type, this option helps prevent the same unit test counts from being reported multiple times.

  • Fail the step. Specify the conditions for failing the step, such as findings criteria and/or log entries.

  • Mark step as unstable. Specify the conditions for making the step unstable, such as findings criteria and/or log entries.

  • Post processing. Disable all or some post-processing steps that run automatically after the step completes. By default, all post-processing steps are enabled to run.

Output variables (Optional) Enter the variables to be passed to other steps down the chain. For details, see Publish output variables to chain steps.

Back to top

See also: