gitlab 将普通用户升级为管理员用户

  1. 使用root 用户登录gitlab服务器。
  2. 查看数据库配置信息 cat /var/opt/gitlab/gitlab-rails/etc/database.yml
  3. 登录用户 su - gitlab-psql
  4. 连接库 psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
  5. 查询用户 select * from users where email = ‘普通用户邮箱地址’;
  6. 更新为管理员 update users set admin=‘t’ where id = 普通用户ID;
  7. 在admin 视图中验证
    gitlab 将普通用户升级为管理员用户