установка GitLab на CentOS7 не удалась из-за создания на ресурсе пользователя

Я пытаюсь установить gitlab на виртуальную машину под VirtualBox с CentOS 7

Я следую следующим инструкциям:
https://about.gitlab.com/downloads (для CentOS)

Я настроил gitlab.rb содержать:

external_url "http://gitlab.localhost.com/"

и когда я запускаю sudo gitlab-ctl reconfigure
Я получаю следующие ошибки:

Starting Chef Client, version 11.12.2
Compiling Cookbooks...
Recipe: gitlab::default
  * directory[/etc/gitlab] action create (up to date)
[2014-07-11T21:15:26+02:00] WARN: Cloning resource attributes for directory[/var/opt/gitlab/gitlab-rails/etc] from prior resource (CHEF-3694)
[2014-07-11T21:15:26+02:00] WARN: Previous directory[/var/opt/gitlab/gitlab-rails/etc]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/gitlab-rails.rb:36:in `block in from_file'
[2014-07-11T21:15:26+02:00] WARN: Current  directory[/var/opt/gitlab/gitlab-rails/etc]: /opt/gitlab/embedded/cookbooks/gitlab/definitions/unicorn_config.rb:21:in `block in from_file'
[2014-07-11T21:15:26+02:00] WARN: Cloning resource attributes for service[unicorn] from prior resource (CHEF-3694)
[2014-07-11T21:15:26+02:00] WARN: Previous service[unicorn]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:58:in `block in from_file'
[2014-07-11T21:15:26+02:00] WARN: Current  service[unicorn]: /opt/gitlab/embedded/cookbooks/runit/definitions/runit_service.rb:191:in `block in from_file'
[2014-07-11T21:15:26+02:00] WARN: Cloning resource attributes for service[sidekiq] from prior resource (CHEF-3694)
[2014-07-11T21:15:26+02:00] WARN: Previous service[sidekiq]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:58:in `block in from_file'
[2014-07-11T21:15:26+02:00] WARN: Current  service[sidekiq]: /opt/gitlab/embedded/cookbooks/runit/definitions/runit_service.rb:191:in `block in from_file'
Converging 150 resources
  * directory[/etc/gitlab] action nothing (skipped due to action :nothing)
  * directory[/var/opt/gitlab] action create (up to date)
Recipe: gitlab::users
  * group[git] action create (up to date)
  * user[git] action create
================================================================================
Error executing action `create` on resource 'user[git]'
================================================================================


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 1602
---- 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/gitlab/recipes/users.rb

 29: user gitlab_username do
 30:   shell node['gitlab']['user']['shell']
 31:   home gitlab_home
 32:   uid node['gitlab']['user']['uid']
 33:   gid gitlab_group
 34: end
 35:



Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/gitlab/recipes/users.rb:29:in `from_file'

user("git") do
  action :create
  supports {:manage_home=>false, :non_unique=>false}
  retries 0
  retry_delay 2
  guard_interpreter :default
  username "git"
  gid 1000
  home "/var/opt/gitlab"
  shell "/bin/sh"
  cookbook_name :gitlab
  recipe_name "users"
end




Running handlers:
[2014-07-11T21:15:26+02:00] ERROR: Running exception handlers
Running handlers complete

[2014-07-11T21:15:26+02:00] ERROR: Exception handlers complete
[2014-07-11T21:15:26+02:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 2.105701753 seconds
[2014-07-11T21:15:27+02:00] ERROR: user[git] (gitlab::users line 29) 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 1602
---- End output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
[2014-07-11T21:15:27+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
4
задан mangusbrother
07.01.2023 16:57 Количество просмотров материала 2490
Распечатать страницу

3 ответа

у меня была та же проблема, потому что я изменил домашний путь моего пользователя Git.

cat /etc/passwd

Если вы изменили его тоже, вы можете установить его в каталог по умолчанию /var/opt/gitlab.

0
отвечен leslie.yq 2023-01-09 00:45

эта конкретная проблема была решена путем создания нового пользователя и запуска команды от имени этого пользователя. ГИТ пользователь не может выполнить его сам.

0
отвечен mangusbrother 2023-01-09 03:02

в моем случае повторный запуск команды помогли.

0
отвечен Ivan Hristov 2023-01-09 05:19

Постоянная ссылка на данную страницу: [ Скопировать ссылку | Сгенерировать QR-код ]

Ваш ответ

Опубликуйте как Гость или авторизуйтесь

Имя
Вверх