Docker安装gitlab后连接内置pgsql修改用户信息
进入gitlab容器
docker exec -it gitlab /bin/bash
进入postgresql
su - gitlab-psql
连接pgsql
psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
命令行直接执行SQL语句
psql -h /var/opt/gitlab/postgresql -d gitlabhq_production -c "select * from xxx;"
查询用户信息
select * from users;
select email, notification_email, commit_email from users where id = 1;
修改用户信息
update users set email='test@foxmail.com',notification_email='test@foxmail.com',commit_email='test@foxmail.com' where id = 1;