Git

Description

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

For more details, refer to http://git-scm.com/.

Note

The following is a list of commands used by the Git Repository Connector to retrieve sources:

  • git clone [$username:$password@]$url $tmpFolder
  • git checkout $commit
  • git log -1 "--format=%H"
  • git config --get remote.origin.url
  • git clone [$username:$password@]$url $tmpFolder
  • git checkout $commit
  • git fetch
  • git --git-dir=$gitRoot show $artefactPath

Usage

Git has the following options:

  • URL (url, mandatory) URL of the git repository to get files from. The local, HTTP(s), SSH and Git protocols are supported.

  • Branch or commit (commit) This field allows specifying the SHA1 of a commit or a branch name. If a SHA1 is specified, it will be retieved from the default branch. If a branch label is specified, then its latest commit is analysed. Leave this field empty to analyse the latest commit of the default branch.

  • Sub-directory (subDir) Specify a subfolder name if you want to restrict the analysis to a subpath of the repository root.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS)

  • Username (username)

  • Password (password)

The full command line syntax for Git is:

-r "type=Git,url=[text],commit=[text],subDir=[text],useAccountCredentials=[multipleChoice],username=[text],password=[password]"