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

 

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM