Update repository access to use username and token for Gitea

Modify deploy script to use username and token for HTTPS Git access, aligning with Gitea's authentication requirements instead of GitLab's OAuth2.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/Z1LDqzu
This commit is contained in:
marco370 2025-10-17 06:52:30 +00:00
parent aae6a56a86
commit 7fb5f35138

6
deploy-to-gitlab.sh Executable file → Normal file
View File

@ -194,9 +194,9 @@ log_info "Configuro repository GitLab..."
# Costruisci URL con autenticazione # Costruisci URL con autenticazione
if [[ "$GITLAB_REPO" == https://* ]]; then if [[ "$GITLAB_REPO" == https://* ]]; then
# HTTPS: GitLab richiede "oauth2" come username con Personal Access Token # HTTPS: Gitea richiede username:token (token fa da password)
# Formato: https://oauth2:TOKEN@gitlab.com/username/repo.git # Formato: https://USERNAME:TOKEN@gitea-url/owner/repo.git
REPO_WITH_AUTH=$(echo "$GITLAB_REPO" | sed "s|https://|https://oauth2:${GITLAB_TOKEN}@|") REPO_WITH_AUTH=$(echo "$GITLAB_REPO" | sed "s|https://|https://${GITLAB_USER}:${GITLAB_TOKEN}@|")
elif [[ "$GITLAB_REPO" == git@* ]]; then elif [[ "$GITLAB_REPO" == git@* ]]; then
# SSH: usa direttamente # SSH: usa direttamente
REPO_WITH_AUTH="$GITLAB_REPO" REPO_WITH_AUTH="$GITLAB_REPO"