Since this happens randomly, I would look to the stuff on the network (e.g. proxy) between the analysis machine and the SonarQube server. You might also check the server logs, although I’ll say up front that I doubt you’ll find anything interesting / relevant.
Same issue, same symptoms. We are 100% sure credentials are correct and happens only randomly.
Believe it must me some random network issue which is false positively reported as a Not authorised error. Maybe it would be good in in sonar-scaner binary will be better handled network errors and it’s logging?
Welcome to the community and thanks for the suggestion! We don’t see this very often at all, but if the volume picks up enough to make the cause identifiable we’ll definitely consider it!