Skip to content

Commit

Permalink
Revert "container: Disable git safe.directory when running without ka…
Browse files Browse the repository at this point in the history
…s-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]>
  • Loading branch information
fmoessbauer committed Feb 13, 2025
1 parent 171bbb7 commit 7a5dc11
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions container-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,8 @@ may also need to update the host distribution (e.g. Debian Jessie -> Stretch).
EOF
fi

if [ -z "$USER_ID" ]; then
# Not a kas-container call
GOSU=""

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

0 comments on commit 7a5dc11

Please sign in to comment.