Skip to content

Commit

Permalink
allow all directories to be "safe" in git terms
Browse files Browse the repository at this point in the history
Git in EL9+ only allows to clone repositories that one is the owner of.
This obviously doesn't work for shared repositories like we have them
for secretsgit.

Disable that feature alltogether on systems that serve as secretsgit
sources.

Sadly a more specific wildcard is not supported [1] and given Puppet
doesn't know which stores we have, I've opted to completely disabling
this feature.

[1] https://git-scm.com/docs/git-config/2.45.0#Documentation/git-config.txt-safedirectory
  • Loading branch information
evgeni authored and ekohl committed Jul 8, 2024
1 parent 3601e41 commit 7ffbbaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions puppet/modules/secretsgit/files/gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[safe]
directory = *
8 changes: 8 additions & 0 deletions puppet/modules/secretsgit/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
Stdlib::Absolutepath $path = '/srv/secretsgit',
Array[String] $users = [],
) {
file { '/etc/gitconfig':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => file('secretsgit/gitconfig'),
}

group { $group:
ensure => present,
}
Expand Down

0 comments on commit 7ffbbaa

Please sign in to comment.