With scanner-cli:latest , facing the issue of permission denied

When updating sonar-cli : Latest, facing permission issue denied

ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied
<<: *tpl_build_gcp
stage: sonar_audit
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [“”]
- apk add --no-cache chromium
- export CHROME_BIN=/usr/bin/chromium-browser
- ls
- npm install --legacy-peer-deps
- npm run unit-test
- ls
- sonar-scanner -Dsonar.host.url=${SONAR_HOST_URL} -Dsonar.login=${SONAR_TOKEN} Dsonar.javacript.lcov.reportPaths=coverage/report-lcov/lcov.info -Dsonar.verbose=true
when: always

Welcome :slight_smile:

with Sonar CLI scanner latest = 6.1.0 you need to replace
sonar.login with sonar.token


Thank u @Rebse , I will try with version update, But I am using
-Dsonar.login=${SONAR_TOKEN} here,
is it anything need to change

you have to change the name of the property, not the property value, means
-Dsonar.login=${SONAR_TOKEN} to -Dsonar.token=${SONAR_TOKEN}

1 Like