搭建git 服务器出现 Error executing action `create` on resource 'user[GitLab user and group]'
错误:
================================================================================
Error executing action `create` on resource 'account[GitLab user and group]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
linux_user[GitLab user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '8'
---- Begin output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
STDOUT:
STDERR: usermod: user git is currently used by process 15309
---- End output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/users.rb
28: account "GitLab user and group" do
29: username gitlab_username
30: uid node['gitlab']['user']['uid']
31: ugid gitlab_group
32: groupname gitlab_group
33: gid node['gitlab']['user']['gid']
34: shell node['gitlab']['user']['shell']
35: home gitlab_home
36: manage node['gitlab']['manage-accounts']['enable']
37: end
38:
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/users.rb:28:in `from_file'
account("GitLab user and group") do
action [:create]
default_guard_interpreter :default
declared_type :account
cookbook_name "gitlab"
recipe_name "users"
username "git"
uid nil
ugid "git"
groupname "git"
gid nil
shell "/bin/sh"
home "/var/opt/gitlab"
manage true
end
System Info:
------------
chef_version=13.6.4
platform=ubuntu
platform_version=18.04
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Running handlers:
There was an error running gitlab-ctl reconfigure:
account[GitLab user and group] (gitlab::users line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: linux_user[GitLab user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '8'
---- Begin output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
STDOUT:
STDERR: usermod: user git is currently used by process 15309
---- End output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
解决方案