The file /var/opt/gitlab/gitlab-rails/etc/gitlab.yml reflects the changes I made but I got no result. Sign-in and sign-up forms are still available on homepage and anyone can sign-up and login using them.
Did I miss something? Or, did I do something wrong?
PS: I successfully configured LDAP authentication and this is the only way I want users to sign-in.
What if, like me, both options (sign up and sign in) has been disabled by the root account, because only ldap authentification is needed but there is no ldap account that have engouht rights to set these setting back to default ?
Because once i have disabled normal sign up, i have no way to log myself back with the root account.
I did the same thing, accidentally disabled signin through the web interface with LDAP enabled and no other admins (d’oh!)
The trick is that you need to dig up the original root user’s API token, which you can do through the dbconsole on the commandline, assuming you have root access to the server (postgres query example):
# gitlab-rails dbconsole psql (9.2.17) Type "help" for help.
gitlabhq_production=> select authentication_token from users where id=1; authentication_token ---------------------- [THIS_STRING_HERE_IS_YOUR_TOKEN] (1 row)
Then reset that setting on the commandline:
# curl --header "Private-Token:YOUR_TOKEN" -X PUT http://your-gitlab-instance.com/api/v3/application/settings?signin_enabled=true
Actually it would be great if this and all the options were made available via gitlab.rb. This would make it so much easier and more reliable to automatically install GitLab using Ansible.