How does your configuration look in /etc/gitlab/gitlab.rb. This is my working keycloak configuration that I use:
gitlab_rails['omniauth_providers'] = [
{
name: "openid_connect",
label: "Keycloak",
args: {
name: "openid_connect",
scope: ["openid", "profile", "email"],
response_type: "code",
issuer: "https://keycloak.example.com:8443/realms/myrealm",
client_auth_method: "query",
discovery: true,
uid_field: "preferred_username",
pkce: true,
client_options: {
identifier: "gitlab.example.com",
secret: "mysecret"
redirect_uri: "https://gitlab.example.com/users/auth/openid_connect/callback"
}
}
}
]