-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow all directories to be "safe" in git terms #2100
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[safe] | ||
directory = * | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,14 @@ | |
Stdlib::Absolutepath $path = '/srv/secretsgit', | ||
Array[String] $users = [], | ||
) { | ||
file { '/etc/gitconfig': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The alternative would be to set this for each repo we have, but we don't manage those. Would that be preferable? Extend the creation instructions on line 7 with a repo config. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That'd mean every time you create a repo you need someone with root permissions to edit the system config, sounds annoying to me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Don't you already need that now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't being in the secrets group be enough? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then shouldn't being in the secrets group be enough to run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Safe directory is only accepted in system and global configs, otherwise a repo could declare itself safe |
||
ensure => file, | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
content => file('secretsgit/gitconfig'), | ||
} | ||
|
||
group { $group: | ||
ensure => present, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a template and we put
$secretsgit::path
in there?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$secretgit::path
is the base, and our repos are${secretgit::path}/blah.git
etc. You need to pass full paths to those repos here, or*
, otherwise it won't work (I tried).