Remove extra checks for the owner creation when configuring git credentials
@@ -59,9 +59,10 @@ chmod 600 "$git_credentials_file_root" "$git_config_file_root"
# Copy the credentials file to the $OWNER space (if it exists)
# We cannot reuse the same file (root's). According to https://git-scm.com/docs/git-credential-store#_options:
# "...The file will have its filesystem permissions set to prevent other users on the system from reading it..."
-if [ "$OWNER" ] && [ "$OWNER_HOME" ] && [ "$OWNER_CONFIGURED" -ne 0 ]; then
+if [ "$OWNER" ] && [ "$OWNER_HOME" ]; then
git_credentials_file_owner="$OWNER_HOME/.git-credentials"
git_config_file_owner="$OWNER_HOME/.gitconfig"
+ mkdir -p "$OWNER_HOME"
\cp "$git_credentials_file_root" "$git_credentials_file_owner"
\cp "$git_config_file_root" "$git_config_file_owner"
chown "${OWNER}:${OWNER}" "$git_credentials_file_owner" "$git_config_file_owner"
