My sonarqube job is not running in Gitlab and I am getting this error

I have added all the variables in gitlab with (visible and protected tags)
This runs successfully locally but fails in my pipeline, what am I doing wrong?

Edit: After removing the $env: it still doesn’t work.

Checking cache for sonar-cache-non_protected...
Runtime platform                                    arch=amd64 os=windows pid=9696 revision=96856197 version=17.11.1
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted. 
WARNING: Cache file does not exist                 
Failed to extract cache
Executing "step_script" stage of the job script
00:03
$ sonar-scanner ` -Dsonar.host.url=$SONAR_HOST_URL ` -Dsonar.login=$SONAR_TOKEN ` -Dsonar.projectKey=$SONAR_PROJECT_KEY ` -Dsonar.sources=. ` -Dsonar.qualityGate.wait=true
21:14:50.958 ERROR Unrecognized option: .host.url=
usage: sonar-scanner [options]

Hi,

Welcome to the community!

You have backticks in your command?

Why? They’re not needed and are probably the problem here. The error shows that the arguments aren’t being parsed properly. This is likely why.

 
HTH,
Ann

Thank you, I realized this and after that its working!