Skip to content

Commit a40772f

Browse files
fmoessbauerjan-kiszka
authored andcommitted
Revert "container: Disable git safe.directory when running without kas-container"
This reverts commit 06aae60. As we now handle the git safe dir part in kas, we no longer need the global exclusion in the entrypoint. Signed-off-by: Felix Moessbauer <[email protected]> Signed-off-by: Jan Kiszka <[email protected]>
1 parent 1b4f1b8 commit a40772f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

container-entrypoint

+2-9
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,8 @@ may also need to update the host distribution (e.g. Debian Jessie -> Stretch).
3535
EOF
3636
fi
3737

38-
if [ -z "$USER_ID" ]; then
39-
# Not a kas-container call
40-
GOSU=""
41-
42-
# Work around gitlab-runner not aligning checked out repo ownership
43-
# with our builder user
44-
sudo git config --system safe.directory "*"
45-
elif [ "$USER_ID" = 0 ]; then
46-
# We shall run everything as root
38+
if [ -z "$USER_ID" ] || [ "$USER_ID" = 0 ]; then
39+
# Not a kas-container call, or we shall run everything as root
4740
GOSU=""
4841
else
4942
GROUP_ID=${GROUP_ID:-$(id -g)}

0 commit comments

Comments
 (0)