Set LDAP via configuration file


We are trying to add LDAP authentication source. I know it can be done via Admin Panel but was wondering if it possible to do it via configuration file as well?

What I do to set my LDAP authentication source during setup(from an ansible playbook)… is to utilize the gitea admin command… ie:

gitea admin auth add-ldap --name --security-protocol LDAPS --host --port --bind-dn --bind-password --user-search-base <ie: “DC=company,DC=int” --user-filter --admin-filter --username-attribute

You can get the list of all of the options… as well as the two different LDAP options that are available(whether to do bind, etc…) in the gitea documentation

1 Like