I have a Jenkins build box building .NET code (Windows OS, obviously), then copying the new binaries into a local git repo, creating a new branch with the current build number. The remote master is on a mapped drive (in this case G:
) and while I can push the new branch to it in Cygwin console, or Git Bash, with Jenkins, the same command returns an error:
fatal: 'C:/Program Files/Git/cygdrive/g/repo.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
fatal: 'C:/Program Files/Git/cygdrive/g/repo.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
The git command in Jenkins shell is this:
!/bin/bash
cd ../GIT_REPO
git add -A
git commit -m "Updated CI build for version $BUILD_VERSION_NUMBER_NEW based on $ACCUREVCOMMENT. This build was triggered by $BUILD_CAUSE"
git branch "RC_$BUILD_VERSION_NUMBER_NEW"
git push file:///cygdrive/g/repo.git "RC_6.0"
git push file:///cygdrive/g/repo.git "RC_$BUILD_VERSION_NUMBER_NEW"
Why is Jenkins putting C:/Program Files/Git/cygdrive" in there? I have Jenkins set up with c:\cygwin\bin for git.