This commit is contained in:
2025-09-02 19:23:32 +02:00
parent 1cffd2deb6
commit 45eccbe538

View File

@@ -193,6 +193,37 @@ print_status "Installazione strumenti di sviluppo..."
sudo apt install -y git sudo apt install -y git
check_command "Git" check_command "Git"
# === CONFIGURAZIONE GIT ===
print_status "Configurazione Git..."
# Richiesta credenziali Git se non sono già impostate come variabili d'ambiente
if [ -z "$GIT_USERNAME" ]; then
read -p "Inserisci il tuo nome utente Git: " GIT_USERNAME
fi
if [ -z "$GIT_EMAIL" ]; then
read -p "Inserisci la tua email Git: " GIT_EMAIL
fi
if [ -z "$GITEA_USERNAME" ]; then
read -p "Inserisci il tuo username Gitea: " GITEA_USERNAME
fi
if [ -z "$GITEA_PASSWORD" ]; then
read -s -p "Inserisci la tua password Gitea: " GITEA_PASSWORD
echo
fi
# Configurazione globale Git
git config --global user.name "$GIT_USERNAME"
git config --global user.email "$GIT_EMAIL"
git config --global init.defaultBranch main
# Configurazione credenziali per il server Gitea
git config --global credential."https://gitbat.duckdns.org:44443".username "$GITEA_USERNAME"
print_success "Git configurato per $GIT_USERNAME ($GIT_EMAIL)"
# Python # Python
sudo apt install -y python3 sudo apt install -y python3
check_command "Python3" check_command "Python3"