diff --git a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb index afac02a..4a915fd 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb @@ -38,6 +38,12 @@ directory ssh_dir do recursive true end +# If SELinux is enabled, make sure that OpenSSH thinks the .ssh directory of the +# git_user is valid. +execute "chcon -t user_home_t #{ssh_dir}" do + only_if "id -Z" +end + directory log_directory do owner git_user recursive true -- libgit2 0.21.2