Skip to content

git: Allow Gitaly config to override Git configuration

Patrick Steinhardt requested to merge pks-git-config-overrides into master

Since a4390b0d (config: Allow injection of git config via Gitaly's config, 2021-03-18), it is possible for administrators to set Git configuration via Gitaly's configuration file. While this feature allows them to inject configuration which isn't otherwise overridden by Gitaly itself, it doesn't allow for changing Gitaly defaults. While this makes it a lot harder for administrators to misconfigure Git in such a way that data integrity or security gets sacrificed, it doesn't allow them to disable mechanisms which are causing problems for them.

Change the order in which Git configuration gets applied to fix this issue. As a result, the administrator's configuration will always override Gitaly's configuration. This is potentially dangerous given that Gitaly now runs with an unknown environment, but that has been the case previously already as the admin can override configuration that isn't otherwise touched by Gitaly.

Merge request reports

Loading