How to setup admin user with gitlab with LDAP authentication?

后端 未结 5 1134
再見小時候
再見小時候 2021-02-12 11:14

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

5条回答
  •  孤街浪徒
    2021-02-12 11:49

    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):

    sudo gitlab-rails console production
    

    Then type the following commands:

     user = User.find_by(username: 'my_username')
     user.admin = true
     user.save!
    

    Close the console:

    exit
    

    Update your gitlab server:

    sudo gitlab-ctl reconfigure
    

提交回复
热议问题