Skip to content

Commit

Permalink
don't setup ldap on external gitea server
Browse files Browse the repository at this point in the history
  • Loading branch information
craddm committed Aug 2, 2024
1 parent d499684 commit 599f771
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,3 @@ until su-exec "$USER" /usr/local/bin/gitea admin user list --admin | grep "{{adm
su-exec "$USER" /usr/local/bin/gitea admin user create --admin --username "{{admin_username}}" --random-password --random-password-length 20 --email "{{admin_email}}" 2> /dev/null
sleep 1
done

# Ensure that LDAP authentication is enabled
until su-exec "$USER" /usr/local/bin/gitea admin auth list | grep "DataSafeHavenLDAP" > /dev/null 2>&1; do
echo "$(date -Iseconds) Attempting to register LDAP authentication..." | tee -a /var/log/configuration
su-exec "$USER" /usr/local/bin/gitea admin auth add-ldap \
--name DataSafeHavenLDAP \
--security-protocol "unencrypted" \
--host "{{ldap_server_hostname}}" \
--port "{{ldap_server_port}}" \
--user-search-base "{{ldap_user_search_base}}" \
--user-filter "(&{{{ldap_user_filter}}}({{ldap_username_attribute}}=%[1]s))" \
--email-attribute "mail"
sleep 1
done

0 comments on commit 599f771

Please sign in to comment.