From 9a0b205f3493fa0a6bebbdf8a6d970263edc7b84 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Apr 2026 13:19:52 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20fix:=20edge=20entrypoint=20clones=20disi?= =?UTF-8?q?nto=20repo=20without=20auth=20=E2=80=94=20fails=20when=20Forgej?= =?UTF-8?q?o=20requires=20authentication=20(#353)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- docker/edge/entrypoint-edge.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/edge/entrypoint-edge.sh b/docker/edge/entrypoint-edge.sh index 26ae442..4b9d5bd 100755 --- a/docker/edge/entrypoint-edge.sh +++ b/docker/edge/entrypoint-edge.sh @@ -5,11 +5,13 @@ set -euo pipefail export USER="${USER:-root}" DISINTO_VERSION="${DISINTO_VERSION:-main}" -DISINTO_REPO="${FORGE_URL:-http://forgejo:3000}/${FORGE_REPO:-disinto-admin/disinto}.git" +FORGE_URL="${FORGE_URL:-http://forgejo:3000}" +FORGE_REPO="${FORGE_REPO:-disinto-admin/disinto}" -# Shallow clone at the pinned version +# Shallow clone at the pinned version (inject token to support auth-required Forgejo) if [ ! -d /opt/disinto/.git ]; then - git clone --depth 1 --branch "$DISINTO_VERSION" "$DISINTO_REPO" /opt/disinto + _auth_url=$(printf '%s' "$FORGE_URL" | sed "s|://|://token:${FORGE_TOKEN}@|") + git clone --depth 1 --branch "$DISINTO_VERSION" "${_auth_url}/${FORGE_REPO}.git" /opt/disinto fi # Start dispatcher in background