Steps are covered in #3286 (comment)
Possibly needs to include the setup of C:\jw and the .gitconfig file too subject to the resolution of other issues relating to path length and permissions.
c:\workspace\.gitconfig (Needs to have CRLF line endings, so don't do this from cygwin)
[safe]
directory = /cygdrive/c/workspace/openjdk-build
startjenkins.cmd needs:
PATH C:\Program Files\Git\usr\bin;%PATH%;c:\cygwin64\bin
set HOME=c:\workspace
java -jar agent.jar ...