Error during SonarQube Scanner execution - Insufficient privileges; Debian, commandline

Hello,
I am trying to run sonar-scanner.bat (OS: Debian) on the gimp trunk (checked out by gitlab)

05:34:54.507 DEBUG: Upload report
05:38:13.714 DEBUG: POST 403 https://sonarcloud.io/api/ce/submit?projectKey=gitlabgimp | time=199201ms
05:38:13.798 INFO: ------------------------------------------------------------------------
05:38:13.798 INFO: EXECUTION FAILURE
05:38:13.798 INFO: ------------------------------------------------------------------------
05:38:13.799 INFO: Total time: 16:09.722s
05:38:14.003 INFO: Final Memory: 40M/1056M
05:38:14.003 INFO: ------------------------------------------------------------------------
05:38:14.003 ERROR: Error during SonarQube Scanner execution
05:38:14.003 ERROR: Insufficient privileges

=> The report generation seems to work quite well, but there seems to be a problem with
“insufficient privileges”

Is there a command to only upload the report without running the whole analysis again?

My command was
sonar-scanner -X -Dsonar.projectKey=gitlabgimp
-Dsonar.organisation=apw10-github
-Dsonar.sources=gimp
-Dsonar.cfamily.build-wrapper-output=gimp//bw-output
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=InsertedTokenHereWithoutQuotes

Maybe the output of sonar-scanner is helpful

05:22:04.111 INFO: Scanner configuration file: /home/osboxes/bin/sonar-scanner/conf/sonar-scanner.properties
05:22:04.116 INFO: Project root configuration file: NONE
05:22:04.142 INFO: SonarQube Scanner 3.2.0.1227
05:22:04.142 INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
05:22:04.143 INFO: Linux 4.9.0-7-amd64 amd64
05:22:04.313 DEBUG: keyStore is : 
05:22:04.314 DEBUG: keyStore type is : jks
05:22:04.314 DEBUG: keyStore provider is : 
05:22:04.314 DEBUG: init keystore
05:22:04.315 DEBUG: init keymanager of type SunX509
05:22:04.411 DEBUG: Create: /root/.sonar/cache
05:22:04.412 INFO: User cache: /root/.sonar/cache
05:22:04.412 DEBUG: Create: /root/.sonar/cache/_tmp
05:22:04.415 DEBUG: Extract sonar-scanner-api-batch in temp...
05:22:04.420 DEBUG: Get bootstrap index...
05:22:04.421 DEBUG: Download: https://sonarcloud.io/batch/index
05:22:04.768 DEBUG: Get bootstrap completed
05:22:04.776 DEBUG: Create isolated classloader...
05:22:04.784 DEBUG: Start temp cleaning...
05:22:04.790 DEBUG: Temp cleaning done
05:22:04.790 DEBUG: Execution getVersion
05:22:04.792 INFO: SonarQube server 7.3.0
05:22:04.793 INFO: Default locale: "de_DE", source code encoding: "UTF-8" (analysis is platform dependent)
05:22:04.793 DEBUG: Work directory: /data/.scannerwork
05:22:04.795 DEBUG: Execution execute
05:22:04.956 INFO: Publish mode
05:22:05.113 INFO: Load global settings
05:22:05.346 DEBUG: GET 200 https://sonarcloud.io/api/settings/values.protobuf | time=226ms
05:22:05.387 INFO: Load global settings (done) | time=275ms
05:22:05.398 INFO: Server id: BD367519-AWHW8ct9-T_TB3XqouNu
05:22:05.409 INFO: User cache: /root/.sonar/cache
05:22:05.650 INFO: Load/download plugins
05:22:05.651 INFO: Load plugins index
05:22:05.732 DEBUG: GET 200 https://sonarcloud.io/api/plugins/installed | time=80ms
05:22:05.780 INFO: Load plugins index (done) | time=129ms
05:22:06.707 INFO: Load/download plugins (done) | time=1057ms
05:22:06.773 DEBUG: API compatibility mode is enabled on plugin Mercurial [scmmercurial] (built with API lower than 5.2)
05:22:07.277 DEBUG: Plugins:
05:22:07.279 DEBUG:   * SonarCSS 1.1.0.493 (cssfamily)
05:22:07.279 DEBUG:   * Bitbucket Authentication for SonarQube 1.1.0.363 (authbitbucket)
05:22:07.280 DEBUG:   * SonarPLSQL 3.2.0.1753 (plsql)
05:22:07.280 DEBUG:   * SonarC# 7.3.1.5982 (csharp)
05:22:07.281 DEBUG:   * SonarSecurity 7.3.0.1282 (security)
05:22:07.281 DEBUG:   * SonarJava 5.6.1.15064 (java)
05:22:07.281 DEBUG:   * SonarWeb 2.6.0.1053 (web)
05:22:07.282 DEBUG:   * SonarFlex 2.4.0.1222 (flex)
05:22:07.282 DEBUG:   * SonarXML 1.5.1.1452 (xml)
05:22:07.282 DEBUG:   * SonarTS 1.7.0.2893 (typescript)
05:22:07.282 DEBUG:   * SonarVB 5.1.0.442 (vbnet)
05:22:07.283 DEBUG:   * SonarSwift 3.3.0.2492 (swift)
05:22:07.283 DEBUG:   * GitHub 1.5.0.1312 (github)
05:22:07.283 DEBUG:   * SonarCFamily 5.1.1.10386 (cpp)
05:22:07.283 DEBUG:   * SonarPython 1.10.0.2131 (python)
05:22:07.284 DEBUG:   * GitHub Authentication for SonarQube 1.5.0.707 (authgithub)
05:22:07.284 DEBUG:   * Mercurial 1.1.1 (scmmercurial)
05:22:07.284 DEBUG:   * SonarGo 1.1.0.1612 (go)
05:22:07.284 DEBUG:   * SonarKotlin 1.0.1.965 (kotlin)
05:22:07.285 DEBUG:   * Microsoft Authentication for SonarCloud 1.0.0.171 (authmicrosoft)
05:22:07.285 DEBUG:   * SonarTSQL 1.2.0.2539 (tsql)
05:22:07.285 DEBUG:   * SonarJS 4.2.0.6476 (javascript)
05:22:07.285 DEBUG:   * License for SonarLint 7.3.0.15267 (license)
05:22:07.285 DEBUG:   * Git 1.5.0.1215 (scmgit)
05:22:07.286 DEBUG:   * SonarPHP 2.14.0.3569 (php)
05:22:07.286 DEBUG:   * SonarABAP 3.6.0.1269 (abap)
05:22:07.349 INFO: Loaded core extensions: branch-scanner
05:22:07.485 DEBUG: Installed core extension: branch-scanner
05:22:08.486 DEBUG: Installed core extension: branch-scanner
05:22:08.730 INFO: Process project properties
05:22:08.742 DEBUG: Process project properties (done) | time=11ms
05:22:08.752 INFO: Load project branches
05:22:08.783 DEBUG: GET 404 https://sonarcloud.io/api/project_branches/list?project=gitlabgimp | time=30ms
05:22:08.785 DEBUG: Could not process project branches - continuing without it
05:22:08.786 INFO: Load project branches (done) | time=34ms
05:22:08.788 INFO: Load project pull requests
05:22:08.818 DEBUG: GET 404 https://sonarcloud.io/api/project_pull_requests/list?project=gitlabgimp | time=29ms
05:22:08.819 DEBUG: Could not process project pull requests - continuing without it
05:22:08.823 INFO: Load project pull requests (done) | time=35ms
05:22:08.824 INFO: Load branch configuration
05:22:08.825 DEBUG: Not on a Bitbucket pipeline.
05:22:08.827 INFO: Load branch configuration (done) | time=3ms
05:22:08.828 INFO: Load project repositories
05:22:08.857 DEBUG: GET 404 https://sonarcloud.io/batch/project.protobuf?key=gitlabgimp | time=28ms
05:22:08.859 DEBUG: Project repository not available - continuing without it
05:22:08.876 INFO: Load project repositories (done) | time=48ms
05:22:08.888 INFO: Execute project builders
05:22:08.888 INFO: Execute project builders (done) | time=0ms
05:22:09.553 DEBUG: Available languages:
05:22:09.553 DEBUG:   * CSS => "css"
05:22:09.554 DEBUG:   * PL/SQL => "plsql"
05:22:09.554 DEBUG:   * C# => "cs"
05:22:09.554 DEBUG:   * Java => "java"
05:22:09.554 DEBUG:   * Web => "web"
05:22:09.554 DEBUG:   * Flex => "flex"
05:22:09.554 DEBUG:   * XML => "xml"
05:22:09.554 DEBUG:   * TypeScript => "ts"
05:22:09.554 DEBUG:   * Visual Basic .NET => "vbnet"
05:22:09.555 DEBUG:   * Swift => "swift"
05:22:09.555 DEBUG:   * C => "c"
05:22:09.555 DEBUG:   * C++ => "cpp"
05:22:09.555 DEBUG:   * Objective-C => "objc"
05:22:09.555 DEBUG:   * Python => "py"
05:22:09.555 DEBUG:   * Go => "go"
05:22:09.555 DEBUG:   * Kotlin => "kotlin"
05:22:09.556 DEBUG:   * T-SQL => "tsql"
05:22:09.556 DEBUG:   * JavaScript => "js"
05:22:09.556 DEBUG:   * PHP => "php"
05:22:09.556 DEBUG:   * ABAP => "abap"
05:22:09.566 INFO: Load quality profiles
05:22:09.905 DEBUG: GET 200 https://sonarcloud.io/api/qualityprofiles/search.protobuf?defaults=true | time=339ms
05:22:09.965 INFO: Load quality profiles (done) | time=399ms
05:22:09.991 INFO: Load active rules
05:22:10.093 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=cpp-sonar-way-81587&p=1&ps=500 | time=101ms
05:22:10.359 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=css-sonar-way-50956&p=1&ps=500 | time=61ms
05:22:10.423 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=c-sonar-way-44762&p=1&ps=500 | time=52ms
05:22:10.489 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWK0UcuLX0BbYiea-tDl&p=1&ps=500 | time=36ms
05:22:10.538 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWSs8_7g6T22ChylXA0k&p=1&ps=500 | time=39ms
05:22:10.594 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=js-sonar-way-56838&p=1&ps=500 | time=47ms
05:22:10.655 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=py-sonar-way-67511&p=1&ps=500 | time=40ms
05:22:10.706 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AV4Y-UGOzsTf1U4IRwBK&p=1&ps=500 | time=44ms
05:22:10.788 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=plsql-sonar-way-37514&p=1&ps=500 | time=70ms
05:22:10.887 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=cs-sonar-way-31865&p=1&ps=500 | time=72ms
05:22:11.020 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=java-sonar-way-45126&p=1&ps=500 | time=91ms
05:22:11.124 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=web-sonar-way-50375&p=1&ps=500 | time=34ms
05:22:11.171 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=flex-sonar-way-91920&p=1&ps=500 | time=45ms
05:22:11.215 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=xml-sonar-way-06052&p=1&ps=500 | time=33ms
05:22:11.264 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=php-sonar-way-05918&p=1&ps=500 | time=48ms
05:22:11.316 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=vbnet-sonar-way-31082&p=1&ps=500 | time=39ms
05:22:11.367 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=abap-sonar-way-38370&p=1&ps=500 | time=45ms
05:22:11.426 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=objc-sonar-way-83399&p=1&ps=500 | time=50ms
05:22:11.491 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=swift-sonar-way-89786&p=1&ps=500 | time=45ms
05:22:11.544 DEBUG: GET 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AV4Y-5N2zsTf1U4IRzzN&p=1&ps=500 | time=43ms
05:22:11.603 INFO: Load active rules (done) | time=1612ms
05:22:11.609 INFO: Load metrics repository
05:22:11.641 DEBUG: GET 200 https://sonarcloud.io/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=32ms
05:22:11.667 INFO: Load metrics repository (done) | time=58ms
05:22:11.746 WARN: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
05:22:11.769 INFO: Project key: gitlabgimp
05:22:11.770 INFO: Project base dir: /data
05:22:11.772 DEBUG: Start recursive analysis of project modules
05:22:11.774 INFO: -------------  Scan gitlabgimp
05:22:11.846 DEBUG: Installed core extension: branch-scanner
05:22:12.201 INFO: Base dir: /data
05:22:12.202 INFO: Working dir: /data/.scannerwork
05:22:12.203 INFO: Source paths: gimp
05:22:12.203 INFO: Source encoding: UTF-8, default locale: de_DE
05:22:12.207 INFO: Load server rules
05:22:12.554 DEBUG: GET 200 https://sonarcloud.io/api/rules/list.protobuf | time=347ms
05:22:12.891 INFO: Load server rules (done) | time=683ms

I’ve read the following thread

and was still not able to get it work.

Hi,

the problem comes from a typo in one of the parameters: sonar.organization takes a Z - not a S.

you are right. Thank you! That was the problem!