lhb6540
lhb6540

Reputation: 15

Gitlab Invalid credentials for <user email>

Gitllab Info

Self-managed GitLab information Version: 17.6.2-ee Revision: 6ff444aad3a

Problem

When login in webui by ldap,It shows "Invalid credentials for <user email>" and no user be created in gitlab.

Configuration

/etc/gitlab/gitlab.rb

gitlab_rails['ldap_servers'] = {
'main' => {
  'label' => 'ldap',
  'host' =>  'ldap.<mydomain>.com',
  'port' => 389, # I am sured that is right
  'uid' => 'uid',
  'active_directory' => false,
  'bind_dn' => 'cn=admin,dc=<my dc>,dc=cn',
  'password' => '<mypassword>',
  'allow_username_or_email_login' => true,
  'block_auto_created_users' => false,
  'encryption' => 'plain', # I am sured that is right
  'base' => 'ou=People,dc=<my dc>,dc=cn',
  'lowercase_usernames' => false,
  'external_groups' => [],
  'sync_ssh_keys' => false,
  }
}

ldap's admin and users looks like

enter image description here

What I Have Done

Follow this page https://docs.gitlab.com/administration/auth/ldap/ldap-troubleshooting/#invalid-credentials-on-sign-in sudo gitlab-rake gitlab:ldap:check enter image description here

ldapsearch -D "cn=admin,dc=<my dc>,dc=cn"   -w OpenLDAP   -p 389   -h ldap.<my dc>.com   -b "ou=People,dc=<my dc>,dc=cn"  "(cn=amsystem)"

![image|690x336](upload://90kibfO0U1cjxEfWhUHo9zSNbDd.jpeg)

Upvotes: 0

Views: 30

Answers (0)

Related Questions