Update GitLab deployment to use correct authentication format

Modify `deploy-to-gitlab.sh` to use `oauth2` as the username with a Personal Access Token for HTTPS Gitlab repository authentication.

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:46:44 +00:00
parent 5b27943029
commit d36b45d724

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

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