git install on jenkins slaves

I have both Linux and Windows slaves. I would like to install Git automatically on a slave first time the master needs to run git on it. how do you tell Jenkins to install it properly on Win or Linux, if possible at all ?

  • Mavericks PHPStorm error running git … /usr/bin/git
  • Unable to push in Git
  • GIT repository pull command
  • Using GIT and a CDN for static content
  • can't create project in GitLab 5.0
  • One-Time Git Commit using Filesystem Created as Author Date
  • Adhering to git flow rules while taking the App Store review times into account
  • Is Git recommended for large (>250GB) content repositories
  • How to undo a “git add” keeping the previously staged version? (Does the index have history?)
  • Git access to private repository using HTTPS
  • git repository clone failed. Connection Reset
  • How to push existing source code to a repository in github?
  • One Solution collect form web for “git install on jenkins slaves”

    Basically, you need to check if which git returns something (which git.exe on Windows, provided you have installed GoW — Gnu on Windows — commands).

    If which fails, then see “Set Up Your Git Environment

    On Linux:

    sudo yum install git-core       # RedHat
    sudo apt-get install git-core   # Ubuntu

    On Windows:

    Download and untar the portable version of msysgit.
    You can script it, using the curl command included in Gow, but for uncompressing a 7z archive, you might need Peazip installed (it also comes as a portable installation, a simple zip archive).

    Git Baby is a git and github fan, let's start git clone.