Location of Git Executable for Jenkins on Windows

Which is the correct installation directory for Jenkins to use? Here are the options I have tried and the results I have seen.

  • C:\Git\bin\git.exe

enter image description here

  • Create pre-push hook to lint/test
  • single file git deployment into server
  • How to sort a series of snapshots and potential merges
  • How to deal with passwords, API keys, etc in development stack? (git, webservers, etc)
  • upstream in git and use of -u flags in push
  • GIT clone to external drive for backup
    • C:\Git\cmd\git

      same as above

    • C:\Git\cmd\gitk.cmd

    enter image description here

    If I continue and ask the job to build here is the console output.

    Started by an SCM change
    Building in workspace C:\Jenkins\workspace\git_test
    Checkout:git_test / C:\Jenkins\workspace\git_test – hudson.remoting.LocalChannel@12f2468
    Using strategy: Default
    Cloning the remote Git repository
    Cloning repository ssh:///jenkins@xxxx.yyyyyyyyy.com:test.git
    git –version
    Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
    Fetching upstream changes from origin
    Seen 0 remote branches
    No candidate revisions
    ERROR: Couldn’t find any revision to build. Verify the repository and branch configuration for this job.
    Finished: FAILURE

    Since they all result in one error or another its not clear which one is correct.

  • git add --patch with difftool
  • How to change orientation in tig status view
  • Fatal Error when updating submodule using GIT
  • Git warning: Config remote shorthand cannot begin with '/'
  • C++11 settings in Eclipse Indexer conflict with git
  • VS2012 and VS2013 battle over .sln header
  • One Solution collect form web for “Location of Git Executable for Jenkins on Windows”

    This is not a problem with git not being found but that putty has not yet been told that it can trust the ssh-key presented by the repository sshd server.

    Run a manual git command first on the Jenkins server, so you can say yes to accept the host key, and then try again.

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