在 Maven 运行命令
mvn sonar:sonar -Dsonar.login=245a36074765e8d1b071cec32f1c42e4b86db291
的时候提示没有授权的错误:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project ShiftService: Not authorized. Analyzing this project requires authentication. Please provide a user token in s onar.login or other credentials in sonar.login and sonar.password. -> [Help 1]
错误的信息如上面的内容显示的。
问题和解决
上面问题的主要原因是如果你使用的是 Windows 系统的话,你可能会使用的是 PS(PowerShell)
根据已知的内容,PS 是不被支持的。
请改使用 CMD 普通的命令行来运行。