Hello,
I’ve configured new SC subscription and try to run CI pipeline with SC tasks on on-prem agent where previously SC was working. I’m using correct service connection for this subscription.
Executing file D:\Build\[agent_name]\_work\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.21.0\classic-sonar-scanner-msbuild\sonar-scanner-4.6.2.2472\bin\sonar-scanner.bat
Args: -Dsonar.scanAllFiles=true -Dproject.settings=D:\Build\[agent_name]\_work\9\.sonarqube\out\sonar-project.properties --from=ScannerMSBuild/5.3.1 --debug <sensitive data removed>
I’m getting error:
##[error]The syntax of the command is incorrect. (I'm unable to add attachment)
When I try to run the command on the machine through command line without --debug parameter, it fails with different error:
ERROR: You're not authorized to run analysis. No sonar.login or SONAR_TOKEN env
variable was set
That makes sense, since I’m running it outside of pipeline.
Workarounds attempted:
- Cleaned all agent’s _task data
- Configured new agent that in its path doesn’t have spaces, ran the pipeline on it without success
Any suggestion what I’m doing wrong?
Summary:
- ALM used - Azure DevOps
- CI system used - Azure DevOps
- Scanner command used when applicable (private details masked)
- Languages of the repository - .NET