ERROR: Could not find a default branch to fall back on

Hello guys, I am getting the following error during Github actions Sonar cloud analysis. This Error seems different from the previous error I reported.

INFO: Auto-configuring pull request 758
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE)
INFO: ------------------------------------------------------------------------
INFO: Total time: 42.473s
ERROR: Error during SonarScanner execution
ERROR: Could not find a default branch to fall back on.

Please anyone has an idea on what could be causing this ? I will appreciate any hints. Thanks

1 Like

Have you tried to scan the master branch first? You can try by running a sonar CLI command.

1 Like

@asd_asdasd I tried the CLI and scanned successfully against the master branch but issue still exist in Github actions workflow. The CLI scans locally while the Actions scans on sonar cloud. Please let me know if you have other ideas on this issue. Thanks

1 Like

Could you share the log? It contains some information about your config and the current value that might help to discover the cause

1 Like