AD修改组织架构后导致Gitlab Access denied for your LDAP account

update @2018/01/16
当在AD修改组织架构后,导致ldap账户无法登录:
Access denied for your LDAP account
原因在于, gitlab会在用户登录web时更新用户信息, 而平时使用命令行执行git pull/push
不会触发这个行为.
因此当组织架构更新后, 用户又没有登录过web, 就会因为账户信息不一致而被拒绝.
比较缓和的方式就是告知用户登录一次web;
比较简单粗暴的方法是, 登录都gitlab服务器, 清空postgresql的用户表.
下面记录一下粗暴方式
sudo -u gitlab-psql -i bash
#gitlab 7.10
/opt/gitlab/embedded/bin/psql -d gitlabhq_production
#gitlab 8.7
/opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
gitlabhq_production=# \d
gitlabhq_production=# \d table
gitlabhq_production-# select * from identities ;
#删除某个用户
gitlabhq_production-# DELETE FROM identities WHERE id=211;
#清空整个表
gitlabhq_production-# TRUNCATE TABLE identities;
gitlabhq_production=# \q
参考