I am trying to use SAML authentication with GitLab. In the gitlab.rb I specified
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = false
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_providers'] = [
{
"name" => "saml",
args: {
assertion_consumer_service_url: 'https://git.mycompany.com/users/auth/saml/callback',
idp_cert_fingerprint: 'XX:YY:ZZ',
idp_sso_target_url: 'https://myidentity.com/SAAS/auth/federation/sso',
issuer: 'https://git.mycompany.com',
name_identifier_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'
}
}
]
Now when I try to login using SAML I get the error
Signing in using your Saml account without a pre-existing GitLab account is not allowed. Create a GitLab account first, and then connect it to your Saml account.
I have already created a Git User named [email protected]
How do I fix this error ?
Changing these parameters got it fixed.
gitlab_rails['omniauth_allow_single_sign_on'] = true
gitlab_rails['omniauth_block_auto_created_users'] = false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With