Gitlab auth failing

Hi all

I’ve just set up SonarQube 10 Community Edition (Docker) and can’t seem to get auth working with my self-hosted Gitlab install.

Gitlab seems to be redirecting me correctly after I’ve clicked “Login with Gitlab”:

But I end up with this screen (and no users are created):

These are my settings:

I’ve checked the web logs and I’m seeing this:

2023.05.07 09:31:14 WARN  web[AYf1OA2ls/Yx6h/IAAKu][o.s.s.a.AuthenticationError] Fail to callback authentication with 'gitlab'
com.github.scribejava.core.model.OAuth2AccessTokenErrorResponse: {"error":"invalid_client","error_description":"Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."}

My Sonarqube install is running behind a NGINX reverse proxy (proxying to 127.0.0.1:9000). Although I can’t see how that would be a problem because everything works fine when I log in with a username and password.

I’ve looked through all the existing threads but can’t find a solution. Any help would be appreciated!

Also, my Sonar base url is set to https://sonar.mydomain.dev (no trailing slash) and these are my Gitlab app settings:

Weird, it works with gitlab.com (identical settings). Just not with the self-hosted install. I’ve got many other apps authorizing against my Gitlab instance with no problems though

Hey there.

Sorry for the delay. Are you still facing an issue? What version of self-managed Gitlab are you using?

1 Like

@Colin Hi Colin. Yeah, I managed to get it working in the end. For some reason using sonarqube.mydomain.com worked nut sonar.mydomain.com didn’t. The DNS and config settings were definitely correct in both cases so not sure why the sonar subdomain was causing problems. All good now though.

1 Like

3 posts were split to a new topic: GitHub Auth Issue