Unable to add root user to group
I tried adding root user to a group using both GUI and API but it's not working. When i add the root user through GUI, i get a message "Users were successfully added" but root user is not really added. When i execute the following command:
curl --header "PRIVATE-TOKEN: gT1Nr1MMnXRxuXXvBKxR" -X POST "http://gitlab.x.com/api/v3/groups/403/members?user_id=1&access_level=50"
...i get the following error:
{"message":"500 Internal Server Error"}
Also, the log shows this:
NoMethodError (undefined method `user' for nil:NilClass):
/opt/gitlab/embedded/service/gitlab-rails/lib/api/group_members.rb:39:in `block (2 levels) in <class:GroupMembers>'
...
...
Please note that if i try adding any user other than root, then the above command works fine. Can anyone please help?
[root@GitLab tom]# sudo gitlab-rake gitlab:env:info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.1.7p400
Gem Version: 2.2.5
Bundler Version:1.10.6
Rake Version: 10.4.2
Sidekiq Version:3.3.0
GitLab information
Version: 8.2.1
Revision: e53c0c5
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab.x.com
HTTP Clone URL: http://gitlab.x.com/some-group/some-project.git
SSH Clone URL: git@gitlab.x.com:some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 2.6.8
Repositories: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git