Closed
Description
This might be related to #912 .
With the default configuration of a multi-branch pipeline project in Jenkins, it's complaining:
An unexpected error occurred: System.InvalidOperationException: Could not find a 'develop' or 'master' branch, neither locally nor remotely.
If I do git fetch --all
after checkout, I'm getting:
LibGit2Sharp.LibGit2SharpException: ref '...' doesn't match the destination
Interestingly enough, it works, when I
- change the default Jenkins configuration (which we cannot do in production!) to fetch refspec for latest master
- and to checkout the current branch locally
- and I run
git checkout master
followed bygit checkout ${GIT_BRANCH}
in the Jenkins pipeline file