conf git
This commit is contained in:
@@ -193,6 +193,37 @@ print_status "Installazione strumenti di sviluppo..."
|
||||
sudo apt install -y 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
|
||||
sudo apt install -y python3
|
||||
check_command "Python3"
|
||||
|
||||
Reference in New Issue
Block a user