1. 程式人生 > >Gitlab遷移之數據庫報錯解決

Gitlab遷移之數據庫報錯解決

再次 restart pro post 授權 onf superuser cal 添加

Gitlab遷移需同版本遷移,恢復過程會出現如下提示:

WARNING: no privileges were granted for "public"

解決方法:

1. 編輯/var/opt/gitlab/postgresql/data/postgresql.conf

找到 listen_addresses = ‘‘

修改為 listen_addresses = ‘*‘

2. 編輯/var/opt/gitlab/postgresql/data/pg_hba.conf

在文件末尾添加如下兩行:

local all all trust

host all all 127.0.0.1/32 trust

3. 重啟gitlab

gitlab-ctl restart

4. 連入postgresql授權gitlab用戶

cd /opt/gitlab/embedded/bin

su gitlab-psql

./psql -h 127.0.0.1 gitlabhq_production

ALTER USER gitlab WITH SUPERUSER;

\q

5. 再次執行gitlab恢復操作即可

Gitlab遷移之數據庫報錯解決