一、ERROR: Not authorized. Analyzing this project requires to be authenticated. Please provide the values of the properties sonar.login and sonar.password.
解决办法1:
进入sonarqube管理界面,点击【设置】、【权限】、将【Force user authentication】关闭。并刷新gitlab的流水线缓存。
解决方法2:
sonarqube-check: image: registry.xxxx.cn/maven:3.8.6-jdk-19 variables: SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task cache: key: "${CI_JOB_NAME}" paths: - .sonar/cache script: - mvn clean install - mvn verify sonar:sonar -Dsun.jnu.encoding=UTF-8 -Dsonar.login=sqp_36374d3c63c6fd8289f46be89ae008ef5179cbe -Dsonar.projectKey=ecosystem_edata-server_AYVEHWnlpBkFJxpVWDSg allow_failure: true only: - <yourbranch>
编辑 .gitlab-ci.yml,添加mvn 的参数 -Dsonar.login
二、[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project edata-parent: Malformed input or input contains unmappable characters: docs/������.md