-Dir.new(git_directory).select { |name| name =~ /\.git$/ }.each do |repository|
- template "#{git_directory}/#{repository}/hooks/post-update" do
+directory "#{git_directory}/private" do
+ owner node[:git][:private_user]
+ group node[:git][:private_group]
+ mode "2775"
+end
+
+template "/etc/gitconfig" do
+ source "gitconfig.erb"
+ owner "root"
+ group "root"
+ mode "644"
+end
+
+Dir.glob("#{git_directory}/*/*.git").each do |repository|
+ template "#{repository}/hooks/post-update" do