5

Recently I installed the gitlab for my LAN. When my users are trying to create their accounts they are getting email confirmation message. Now my question is I want to disable whole email confirmation feature and everything. For that what file i have to configure in the gitlab configuration files how to do this? which options i have to change i am very poor in ruby please explain in detail.

4

Hi i needed recently to patch gitlab for skipping confirmation for LDAP users. I do not consider this as a good patch but it works.

vim /opt/gitlab/embedded/service/gitlab-rails/lib/api/users.rb:

  post do
    authenticated_as_admin!
    ...
                                # <patch:     
    if attrs[:extern_uid]       # skip confirmation for LDAP users
       user.skip_confirmation!  #
    end                         # >

    if user.save
      present user, with: Entities::UserFull
    else

Restart is obviously required ( gitlab-ctl restart )

Based on answer in google group: https://groups.google.com/forum/#!topic/gitlabhq/ctf8x0xpOOE

| improve this answer | |
3

Since version 7.9.0 E-Mail confirmation can be skipped by including a confirm parameter into your JSON. For example, if you want to create a user Jenkins without email confirmation you do a POST with the following payload against your local gitlab API:

POST /api/v3/users?private_token=<administrator token>
{
 "email" : "jenkins@test.com",
 "password" : "123456",
 "name" : "Jenkins CI Server",
 "username" : "jenkins",
 "confirm" : "no"
}

Parameters email, password, name and username are mandatory. The change was introduced with this commit. As you might see, the confirm parameter may also be one of false, 0 and f to disable email confirmation.

| improve this answer | |
  • the <administrator token> can be found at /profile/account – JayL Jul 14 '16 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.