We are using sonar-scanner-cli in a docker container to scan our python project.
This was working until recently, and I have narrowed it down to the fact that we use sonarsource/sonar-scanner-cli
so have always been using the latest scanner.
Through experimentation I can confirm that 5.0.1 (digest 02372948eaee)
works correctly, whereas 10.0.0.1370_5.0.1 (digest 44cd601d15e9)
and later do not.
The issue that I get is strangely:
Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
The token being used IS good, since it works with the standard 5.0.1
image so I am not sure what is going on.
I have read that since version 10 the scanner now runs as a user with restricted access (rather than admin), so to rule out file permissions I am calling chmod -R 777 .
against my source directory before calling the scanner (also the error message doesn’t seem to imply that this is the problem, but more so that the key is not valid??)
I am now at a loss; the error message is regarding an auth key, but the same key is used in both cases and works with 5.0.1
but not with 10.0.0.1370_5.0.1
- any help gratefully received!
Working
Command line
sh 'sudo chmod -R 777 .'
sh 'docker run --rm --name=projectName -e SONAR_SCANNER_OPTS="-Dsonar.verbose=true" -e SONAR_HOST_URL="https://hostaddress" -e SONAR_LOGIN="<token removed>" -v "$(pwd):/usr/src" sonarsource/sonar-scanner-cli:5.0.1 -Dproject.settings=./sonar-project-frontend.properties'
Versions
10:30:22.914 INFO: SonarScanner 5.0.1.3006
10:30:22.928 INFO: Java 17.0.10 Alpine (64-bit)
10:30:22.928 INFO: Linux 3.10.0-1160.53.1.el7.x86_64 amd64
10:30:22.932 INFO: SONAR_SCANNER_OPTS=-Dsonar.verbose=true
10:30:24.916 INFO: Analyzing on SonarQube server 9.9.5.90363
10:30:25.360 DEBUG: Enterprise 9.9.5.90363
Not working
Command line
sh 'sudo chmod -R 777 .'
sh 'docker run --rm --name=projectName -e SONAR_SCANNER_OPTS="-Dsonar.verbose=true" -e SONAR_HOST_URL="https://hostaddress" -e SONAR_LOGIN="<token removed>" -v "$(pwd):/usr/src" sonarsource/sonar-scanner-cli:10.0.0.1370_5.0.1 -Dproject.settings=./sonar-project-frontend.properties'
Versions
10:38:10.053 INFO: SonarScanner 5.0.1.3006
10:38:10.066 INFO: Java 17.0.11 Alpine (64-bit)
10:38:10.066 INFO: Linux 3.10.0-1160.53.1.el7.x86_64 amd64
10:38:10.070 INFO: SONAR_SCANNER_OPTS=-Dsonar.verbose=true
10:38:11.855 INFO: Analyzing on SonarQube server 9.9.5.90363
10:38:12.239 DEBUG: Enterprise 9.9.5.90363
Logs
From the “not working” version 10 image (this is running under Jenkins, hence the formatting):
[2024-07-25T10:37:55.682Z] [Pipeline] sh
[2024-07-25T10:37:55.974Z] + sudo chmod -R 777 .
[2024-07-25T10:37:56.015Z] [Pipeline] sh
[2024-07-25T10:37:56.308Z] ++ pwd
[2024-07-25T10:37:56.308Z] + docker run --rm --name=projectName -e SONAR_SCANNER_OPTS=-Dsonar.verbose=true -e SONAR_HOST_URL=https://<hostaddress> -e SONAR_LOGIN=<tokenvalue> -v /local/path/to/code:/usr/src sonarsource/sonar-scanner-cli:10.0.0.1370_5.0.1 -Dproject.settings=./sonar-project-frontend.properties
[2024-07-25T10:37:56.308Z] Unable to find image 'sonarsource/sonar-scanner-cli:10.0.0.1370_5.0.1' locally
[2024-07-25T10:37:57.694Z] 10.0.0.1370_5.0.1: Pulling from sonarsource/sonar-scanner-cli
[2024-07-25T10:37:57.694Z] 4abcf2066143: Already exists
[2024-07-25T10:37:57.956Z] 4f4fb700ef54: Already exists
[2024-07-25T10:37:57.956Z] 4bf34e3a89c6: Pulling fs layer
[2024-07-25T10:37:57.956Z] 1242c3de7ec7: Pulling fs layer
[2024-07-25T10:37:57.956Z] 4f4fb700ef54: Pulling fs layer
[2024-07-25T10:37:58.530Z] 4f4fb700ef54: Download complete
[2024-07-25T10:37:58.530Z] 1242c3de7ec7: Verifying Checksum
[2024-07-25T10:37:58.530Z] 1242c3de7ec7: Download complete
[2024-07-25T10:38:01.096Z] 4bf34e3a89c6: Verifying Checksum
[2024-07-25T10:38:01.096Z] 4bf34e3a89c6: Download complete
[2024-07-25T10:38:07.673Z] 4bf34e3a89c6: Pull complete
[2024-07-25T10:38:07.673Z] 1242c3de7ec7: Pull complete
[2024-07-25T10:38:07.673Z] 4f4fb700ef54: Pull complete
[2024-07-25T10:38:07.673Z] Digest: sha256:44cd601d15e95701e0ab10a1eddfb9511658ffb70d325b9f5b0b4a7bbe235441
[2024-07-25T10:38:07.673Z] Status: Downloaded newer image for sonarsource/sonar-scanner-cli:10.0.0.1370_5.0.1
[2024-07-25T10:38:10.220Z] INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
[2024-07-25T10:38:10.220Z] INFO: Project root configuration file: NONE
[2024-07-25T10:38:10.220Z] 10:38:10.053 INFO: SonarScanner 5.0.1.3006
[2024-07-25T10:38:10.220Z] 10:38:10.066 INFO: Java 17.0.11 Alpine (64-bit)
[2024-07-25T10:38:10.220Z] 10:38:10.066 INFO: Linux 3.10.0-1160.53.1.el7.x86_64 amd64
[2024-07-25T10:38:10.220Z] 10:38:10.070 INFO: SONAR_SCANNER_OPTS=-Dsonar.verbose=true
[2024-07-25T10:38:10.486Z] 10:38:10.276 DEBUG: keyStore is :
[2024-07-25T10:38:10.486Z] 10:38:10.277 DEBUG: keyStore type is : pkcs12
[2024-07-25T10:38:10.486Z] 10:38:10.277 DEBUG: keyStore provider is :
[2024-07-25T10:38:10.486Z] 10:38:10.277 DEBUG: init keystore
[2024-07-25T10:38:10.486Z] 10:38:10.277 DEBUG: init keymanager of type SunX509
[2024-07-25T10:38:10.486Z] 10:38:10.414 DEBUG: Create: /opt/sonar-scanner/.sonar/cache
[2024-07-25T10:38:10.486Z] 10:38:10.415 INFO: User cache: /opt/sonar-scanner/.sonar/cache
[2024-07-25T10:38:10.486Z] 10:38:10.415 DEBUG: Create: /opt/sonar-scanner/.sonar/cache/_tmp
[2024-07-25T10:38:10.486Z] 10:38:10.418 DEBUG: Extract sonar-scanner-api-batch in temp...
[2024-07-25T10:38:10.486Z] 10:38:10.422 DEBUG: Get bootstrap index...
[2024-07-25T10:38:10.486Z] 10:38:10.423 DEBUG: Download: https://<hostaddress>/batch/index
[2024-07-25T10:38:11.060Z] 10:38:10.772 DEBUG: Get bootstrap completed
[2024-07-25T10:38:11.060Z] 10:38:10.776 DEBUG: Download https://<hostaddress>/batch/file?name=scanner-enterprise-9.9.5.90363-all.jar to /opt/sonar-scanner/.sonar/cache/_tmp/fileCache17065785102877364435.tmp
[2024-07-25T10:38:12.014Z] 10:38:11.809 DEBUG: Create isolated classloader...
[2024-07-25T10:38:12.014Z] 10:38:11.836 DEBUG: Start temp cleaning...
[2024-07-25T10:38:12.014Z] 10:38:11.839 DEBUG: Temp cleaning done
[2024-07-25T10:38:12.014Z] 10:38:11.840 DEBUG: Execution getVersion
[2024-07-25T10:38:12.014Z] 10:38:11.855 INFO: Analyzing on SonarQube server 9.9.5.90363
[2024-07-25T10:38:12.014Z] 10:38:11.855 INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
[2024-07-25T10:38:12.014Z] 10:38:11.856 DEBUG: Work directory: /usr/src/.scannerwork
[2024-07-25T10:38:12.014Z] 10:38:11.857 DEBUG: Execution execute
[2024-07-25T10:38:12.278Z] 10:38:12.239 DEBUG: Enterprise 9.9.5.90363
[2024-07-25T10:38:12.543Z] 10:38:12.527 INFO: Load global settings
[2024-07-25T10:38:12.811Z] 10:38:12.729 DEBUG: GET 401 https://<hostaddress>/api/settings/values.protobuf | time=201ms
[2024-07-25T10:38:12.811Z] 10:38:12.749 INFO: ------------------------------------------------------------------------
[2024-07-25T10:38:12.811Z] 10:38:12.749 INFO: EXECUTION FAILURE
[2024-07-25T10:38:12.811Z] 10:38:12.750 INFO: ------------------------------------------------------------------------
[2024-07-25T10:38:12.811Z] 10:38:12.750 INFO: Total time: 2.747s
[2024-07-25T10:38:12.811Z] 10:38:12.769 INFO: Final Memory: 7M/60M
[2024-07-25T10:38:12.811Z] 10:38:12.769 INFO: ------------------------------------------------------------------------
[2024-07-25T10:38:12.811Z] 10:38:12.770 ERROR: Error during SonarScanner execution
[2024-07-25T10:38:12.811Z] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20deea7f-org.sonar.scanner.bootstrap.ScannerPluginRepository': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20deea7f-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20deea7f-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'GlobalConfiguration' defined in org.sonar.scanner.bootstrap.GlobalConfigurationProvider: Unsatisfied dependency expressed through method 'provide' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GlobalServerSettings' defined in org.sonar.scanner.bootstrap.GlobalServerSettingsProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.bootstrap.GlobalServerSettings]: Factory method 'provide' threw exception; nested exception is Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
[2024-07-25T10:38:12.811Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
[2024-07-25T10:38:12.811Z] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
[2024-07-25T10:38:12.811Z] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
[2024-07-25T10:38:12.811Z] at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
[2024-07-25T10:38:12.811Z] at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
[2024-07-25T10:38:12.811Z] at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
[2024-07-25T10:38:12.811Z] at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
[2024-07-25T10:38:12.811Z] at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[2024-07-25T10:38:12.811Z] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-07-25T10:38:12.811Z] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2024-07-25T10:38:12.811Z] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2024-07-25T10:38:12.811Z] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[2024-07-25T10:38:12.811Z] at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[2024-07-25T10:38:12.811Z] at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
[2024-07-25T10:38:12.811Z] at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[2024-07-25T10:38:12.812Z] at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[2024-07-25T10:38:12.812Z] at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
[2024-07-25T10:38:12.812Z] at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
[2024-07-25T10:38:12.812Z] at org.sonarsource.scanner.cli.Main.main(Main.java:62)
[2024-07-25T10:38:12.812Z] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20deea7f-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20deea7f-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'GlobalConfiguration' defined in org.sonar.scanner.bootstrap.GlobalConfigurationProvider: Unsatisfied dependency expressed through method 'provide' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GlobalServerSettings' defined in org.sonar.scanner.bootstrap.GlobalServerSettingsProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.bootstrap.GlobalServerSettings]: Factory method 'provide' threw exception; nested exception is Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
[2024-07-25T10:38:12.812Z] ... 28 more
[2024-07-25T10:38:12.812Z] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20deea7f-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'GlobalConfiguration' defined in org.sonar.scanner.bootstrap.GlobalConfigurationProvider: Unsatisfied dependency expressed through method 'provide' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GlobalServerSettings' defined in org.sonar.scanner.bootstrap.GlobalServerSettingsProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.bootstrap.GlobalServerSettings]: Factory method 'provide' threw exception; nested exception is Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
[2024-07-25T10:38:12.812Z] ... 42 more
[2024-07-25T10:38:12.812Z] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'GlobalConfiguration' defined in org.sonar.scanner.bootstrap.GlobalConfigurationProvider: Unsatisfied dependency expressed through method 'provide' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GlobalServerSettings' defined in org.sonar.scanner.bootstrap.GlobalServerSettingsProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.bootstrap.GlobalServerSettings]: Factory method 'provide' threw exception; nested exception is Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
[2024-07-25T10:38:12.812Z] ... 56 more
[2024-07-25T10:38:12.812Z] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GlobalServerSettings' defined in org.sonar.scanner.bootstrap.GlobalServerSettingsProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.bootstrap.GlobalServerSettings]: Factory method 'provide' threw exception; nested exception is Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
[2024-07-25T10:38:12.812Z] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
[2024-07-25T10:38:12.813Z] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
[2024-07-25T10:38:12.813Z] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
[2024-07-25T10:38:12.813Z] ... 70 more
[2024-07-25T10:38:12.813Z] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.bootstrap.GlobalServerSettings]: Factory method 'provide' threw exception; nested exception is Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
[2024-07-25T10:38:12.813Z] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
[2024-07-25T10:38:12.813Z] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
[2024-07-25T10:38:12.813Z] ... 84 more
[2024-07-25T10:38:12.813Z] Caused by: Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.
[2024-07-25T10:38:12.813Z] 10:38:12.785 ERROR:
[2024-07-25T10:38:12.813Z] 10:38:12.786 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.