Could not find ref 'refs/heads/master' in refs/heads, refs/remotes/upstream or refs/remotes/origin

Hi,
The SonarQube Scanner uses git to detect what code was changed in the pull request. For that, it needs local access to the target of the pull request, which is master in your case.
Make sure that master is fetched before running the scanner.