I want to connect my IntelliJ SonarLint to a SonarQube instance.
After I enter my token in the second screen, I immediately get an error:
Failed to connect to the server. Please check the configuration. Cause: Cannot invoke “java.net.PasswordAuthentication.getUserName()” because “auth” is null
- Operating system: macOS Sonoma 14.1.1
- SonarLint plugin version: 10.0.1.77000
- Programming language you’re coding in: Java
- Is connected mode used:
- Connected to SonarQube Enterprise EditionVersion 9.9.1 (build 69595)
This error comes from the proxy configuration defined in your IntelliJ IDE. Do you use a proxy? If yes, can you make sure it is correctly set?
This is the proxy configuration page in IntelliJ:
Additionally, you can set IntelliJ’s proxy to debug mode by going to Help → Diagnostic Tools → Debug Log Settings… and adding the value
com.intellij.util.proxy.CommonProxy in the dialog. Once this is done, repeat the action for connecting to SonarQube, and check the log file Help → Open Log in Editor and see if there are any errors in the logs when you try to connect.
Hi Nicolas ,
thanks for the response.
I don’t use a proxy, and there are no CommonProxy exceptions in the logfile after following your instructions.
Any other idea?
PS: I can see that CommonAuthenticator.getPasswordAuthentication is called. However, I’m using a Toke, not Login/Password
Sorry for the late reply. We have just released a new version of SonarLint for IntelliJ, version 10.1. Could you please update your SonarLint and see if the behavior changed?
From a technical point of view, it seems that a proxy was somehow found, but IntelliJ does not have any way of authenticating, which is causing the issue on our side. We changed the way SonarLint behaves in that matter so it does not fail if the proxy has no credentials.
If it still fails, please share the SonarLint logs with us.
Thanks Nicolas, updating SonarLint seems to have removed the issue.
I still can’t connect, but now I receive a 401 which I can reproduce with Insomnia, so there seems to be an issue in the SonarQube configuration, or the SSO that is protecting the instance → that is something I need to check with the responsible IT team.