Hi. I’m implementing a post-receive git hook on gitea server side. It’s a sonar-scanner command that executes in a bash script, that updates the SonarQube server everytime somebody pushes to the repo.
SonarQube Scanner 18.104.22.1683
What I’m interesting in, is the following error I get when I manually execute sonar-scanner (that’s to see if I have communication with SonarQube server):
ERROR: Error during SonarQube Scanner execution
org.eclipse.jgit.errors.NoWorkTreeException: Bare Repository has neither a working tree, nor an index
so the path where I execute sonar-scanner is /home/git/gitea-repositories/user/project.git (that’s standard location for gitea repos)
What I only understand is that the git project folder is not suitable for sonar-scanner somehow on gitea server. I didn’t reproduce the same behavior on another host, where I successfully execute sonar-scanner.