手贱一不小心用root在gitlab后台把登录功能给关了,当时我就懵逼了。

解决方法如下:

#进入数据库修改配置
[root@gitlab-server ~]# gitlab-psql gitlabhq_production
could not change directory to "/root"
psql (9.2.)
Type "help" for help. gitlabhq_production=#

若想查看资料库列表:

[root@gitlab-server ~]# gitlab-psql -l
could not change directory to "/root"
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
---------------------+-------------+----------+-------------+-------------+---------------------------------
gitlabhq_production | gitlab | UTF8 | en_US.UTF- | en_US.UTF- |
postgres | gitlab-psql | UTF8 | en_US.UTF- | en_US.UTF- |
template0 | gitlab-psql | UTF8 | en_US.UTF- | en_US.UTF- | =c/"gitlab-psql" +
| | | | | "gitlab-psql"=CTc/"gitlab-psql"
template1 | gitlab-psql | UTF8 | en_US.UTF- | en_US.UTF- | =c/"gitlab-psql" +
| | | | | "gitlab-psql"=CTc/"gitlab-psql"
( rows)

进入client后:

命令都是可以Tab出来的,很牛B
gitlabhq_production=# UPDATE application_settings set signin_enabled=true;
UPDATE

重启Gitlab:

这里因为启动的慢gitlab web报错出现:502 ,Whoops, GitLab is taking too much time to respond.

等待8080端口启动后,访问即可恢复:

tcp               127.0.0.1:          0.0.0.0:*               LISTEN      /unicorn master 
[root@gitlab-server ~]# gitlab-ctl restart
ok: run: gitlab-workhorse: (pid ) 1s
ok: run: logrotate: (pid ) 0s
ok: run: nginx: (pid ) 0s
ok: run: postgresql: (pid ) 1s
ok: run: redis: (pid ) 0s
ok: run: sidekiq: (pid ) 1s
ok: run: unicorn: (pid ) 0s

  

最新文章

  1. 如何让我们的PHP在Jexus中跑起来
  2. vue.js 第四课
  3. 使用Word发布文章到 WordPress 博客
  4. JAVA - 多线程 两种方法的比较
  5. Ninject 学习杂记
  6. 微信的redirect_uri参数错误原因分析
  7. Centos7.2 Systemd 方式编译 Mysql5.7.11
  8. Android开发-API指南-<activity-alias>
  9. 【Android】cocos2d-x-3.1.1环境搭建与创建工程( Win7 32位系统)
  10. c++(单向链表)
  11. mybatis中有趣的符号#与$
  12. 3.6 html报告乱码问题优化
  13. 【Linux高级驱动】触摸屏工作原理与工作流程
  14. Redis Cluster 简单安装配置
  15. ASP.NET Forms身份验证概述
  16. uoj407 【IOI2018】狼人
  17. Javascript执行效率总结
  18. 使用mybatisplus实现动态路由
  19. 搞懂.NET Framework 历史版本(2017年)
  20. TeamTalk源码分析(十一) —— pc客户端源码分析

热门文章

  1. 暴搜 - Codeforces Round #327 (Div. 2) E. Three States
  2. vconsole h5应用ajax请求抓包
  3. UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 120: illegal multibyte sequence
  4. Code First use dotConnect for MySQL
  5. Windows系统下Eclipse上搭建Python开发环境
  6. SQLserver查看索引使用情况
  7. PHP依赖注入
  8. plsql 粘贴
  9. MVC控制器详解
  10. jenkins 修改工作目录