系統 :centos7
gitlab版本:gitlab-ce-11.6.2-ce.0.el7.x86_64
安裝方式: yum install gitlab-ce-11.6.2-ce.0.el7.x86_64 -y
需求:用gitlab api python方式導入大量用戶須要郵箱驗證比較麻煩 ,因此,去掉新建用戶的郵件驗證,還能切斷外網,內網使用gitlab。html
[root@k8s_gitlab ~]# vim /opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb
devise :lockable, :recoverable, :rememberable, :trackable,
:validatable, :omniauthable, :registerablepython
vim /opt/gitlab/embedded/service/gitlab-rails/app/controllers/admin/users_controller.rb
def confirm
if user.confirm!
redirect_to :back, notice: "Successfully confirmed"
else
redirect_to :back, alert: "Error occurred. User was not confirmed"
end
endgit
刪掉!!!!vim
vim /opt/gitlab/embedded/service/gitlab-rails/app/views/admin/users/show.html.hamlcentos
刪掉
掛掉以上三個文件api
gitlab-ctl restartapp