Unable to open a git repository

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    sonarqube 8.3.1
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
    While running sonar scan on a repo that does not contain a .git folder instead it has a .git property file which works fine for my day to day operations, however when I try to run sonar it throws the following error message.
    ERROR: Error during SonarQube Scanner execution ERROR: Unable to open Git repository
  • steps to reproduce
    Clone any repo without .git folder instead it can have a git config file.
  • potential workaround
    Create or copy .git from another working repo and modify the tags and heads then it started working.

Is there any way to skip this check ?

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Could you please provide the full stack trace of the error?
Do you still get the error if you run it with -Dsonar.scm.disabled=true?