Gitlab不小心关闭了sign-in,无法登录web的坑。。。
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Gitlab不小心关闭了sign-in,无法登录web的坑。。。相关的知识,希望对你有一定的参考价值。
手贱一不小心用root在gitlab后台把登录功能给关了,当时我就懵逼了。
解决方法如下:
#进入数据库修改配置
[root@gitlab-server ~]# gitlab-psql gitlabhq_production could not change directory to "/root" psql (9.2.18) 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-8 | en_US.UTF-8 | postgres | gitlab-psql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | gitlab-psql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/"gitlab-psql" + | | | | | "gitlab-psql"=CTc/"gitlab-psql" template1 | gitlab-psql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/"gitlab-psql" + | | | | | "gitlab-psql"=CTc/"gitlab-psql" (4 rows)
进入client后:
命令都是可以Tab出来的,很牛B
gitlabhq_production=# UPDATE application_settings set signin_enabled=true; UPDATE 5
重启Gitlab:
这里因为启动的慢gitlab web报错出现:502 ,Whoops, GitLab is taking too much time to respond.
等待8080端口启动后,访问即可恢复:
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 7275/unicorn master
[root@gitlab-server ~]# gitlab-ctl restart ok: run: gitlab-workhorse: (pid 7220) 1s ok: run: logrotate: (pid 7226) 0s ok: run: nginx: (pid 7234) 0s ok: run: postgresql: (pid 7241) 1s ok: run: redis: (pid 7250) 0s ok: run: sidekiq: (pid 7255) 1s ok: run: unicorn: (pid 7260) 0s
以上是关于Gitlab不小心关闭了sign-in,无法登录web的坑。。。的主要内容,如果未能解决你的问题,请参考以下文章
上次登录sql server 2008后,不小心把里面windows身份验证的 账号删除了, 以后都无法用windows身份验证进