Support private repo access via Gitea token in Proxmox script
The repo is private, so unauthenticated curl/git clone returns 404. Add GIT_TOKEN support for both the raw-file download and the git clone inside the container, and document it in the README. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ TEMPLATE_STORAGE="${TEMPLATE_STORAGE:-local}"
|
||||
CT_PASSWORD="${CT_PASSWORD:-}" # leer = zufällig generiert
|
||||
REPO_URL="${REPO_URL:-https://gitea.teamthiele.de/ethiele/linkvault.git}"
|
||||
APP_PORT="${APP_PORT:-8000}"
|
||||
GIT_TOKEN="${GIT_TOKEN:-}" # Gitea Access Token, falls Repo privat ist
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Vorbedingungen
|
||||
@@ -108,7 +109,11 @@ apt-get update -qq
|
||||
apt-get install -y -qq git python3 python3-venv python3-pip build-essential curl >/dev/null
|
||||
|
||||
if [ ! -d /opt/linkvault ]; then
|
||||
git clone --quiet '${REPO_URL}' /opt/linkvault
|
||||
if [ -n '${GIT_TOKEN}' ]; then
|
||||
git -c http.extraHeader=\"Authorization: token ${GIT_TOKEN}\" clone --quiet '${REPO_URL}' /opt/linkvault
|
||||
else
|
||||
git clone --quiet '${REPO_URL}' /opt/linkvault
|
||||
fi
|
||||
fi
|
||||
cd /opt/linkvault
|
||||
|
||||
|
||||
Reference in New Issue
Block a user