Computing New Code failed - Branch 'refs/heads/master' not found in git

Hi,
The scanner will try to access the reference branch using git to be able to compute the new code in the branch being analyzed.
So either the branch name is incorrect, or it’s not available in the local clone being used in the analysis.

It looks like the problem might be the first case. The branch name is master, but it’s showing as refs/heads/master, which is git’s internal path to the reference for the master branch.
I suggest you try to analyze the master setting sonar.branch.name=master.

4 Likes