diff --git a/files/gitlab-cookbooks/gitlab/attributes/default.rb b/files/gitlab-cookbooks/gitlab/attributes/default.rb index b7ae760..0c7becb 100644 --- a/files/gitlab-cookbooks/gitlab/attributes/default.rb +++ b/files/gitlab-cookbooks/gitlab/attributes/default.rb @@ -22,6 +22,7 @@ default['gitlab']['bootstrap']['enable'] = true #### # The username for the chef services user default['gitlab']['user']['username'] = "git" +default['gitlab']['user']['group'] = "git" # The shell for the chef services user default['gitlab']['user']['shell'] = "/bin/sh" # The home directory for the chef services user diff --git a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb index f18e678..78e539d 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb @@ -1,4 +1,5 @@ git_user = node['gitlab']['user']['username'] +git_group = node['gitlab']['user']['group'] gitlab_shell_dir = "/opt/gitlab/embedded/service/gitlab-shell" repositories_path = node['gitlab']['gitlab-core']['repositories_path'] ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh") @@ -6,16 +7,19 @@ ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh") # Create directories because the git_user does not own its home directory directory repositories_path do owner git_user + group git_group end directory ssh_dir do owner git_user + group git_group mode "0700" end template File.join(gitlab_shell_dir, "config.yml") do source "gitlab-shell-config.yml.erb" owner git_user + group git_group variables( :user => git_user, :api_url => node['gitlab']['gitlab-core']['internal_api_url'], @@ -30,5 +34,6 @@ end execute "bin/install" do cwd gitlab_shell_dir user git_user + group git_group action :nothing end -- libgit2 0.21.2