I've just setup gitlab, but I'm completely lost with regards to admin user. The wiki seems silent about this topic, and google hasn't been of help either.
So, how do I setup admin users with gitlab on LDAP authentication?
I've just setup gitlab, but I'm completely lost with regards to admin user. The wiki seems silent about this topic, and google hasn't been of help either.
So, how do I setup admin users with gitlab on LDAP authentication?
This is what I did to make a LDAP (or Windows AD) user vikas as admin.
First login on GitLab portal and logout, then run the below commands.
After running the above commands, login again and now your will have admin privileges for vikas AD user.
Mine is a variant of the accepted answer but it's based on an example from the official documentation
From the command line of your gitlab server:
Open the gitlab rails console (I'm assuming here that you aren't logged in as root):
Then type the following commands:
Close the console:
Update your gitlab server:
You can also set admin permissions to a user by doing something like this in the rails console:
The file
db/fixtures/production/001_admin.rb
contains a user and password setup for administration, but you have to disable LDAP to login with it. Afterwards, if you have created a user by login in with LDAP, you can set it up to be an administrator and re-enable LDAP.Hopefully, a more rational way exists...