43 lines
1.6 KiB
Markdown
43 lines
1.6 KiB
Markdown
# CLI di Gitea
|
|
|
|
Eseguire nel container come utente `git` (mai root):
|
|
|
|
```bash
|
|
docker exec -u git gitea gitea <comando>
|
|
# se non trova la config:
|
|
docker exec -u git gitea gitea -c /data/gitea/conf/app.ini <comando>
|
|
```
|
|
Opzioni globali: `--config/-c`, `--custom-path/-C`, `--work-path/-w`.
|
|
|
|
## Utenti
|
|
```bash
|
|
gitea admin user create --username U --password P --email E [--admin] [--must-change-password] [--random-password] [--access-token]
|
|
gitea admin user list [--admin]
|
|
gitea admin user change-password -u U -p NUOVA [--must-change-password]
|
|
gitea admin user delete --id N | --username U | --email E
|
|
gitea admin user generate-access-token -u U -t NOME --scopes ...
|
|
```
|
|
## Manutenzione
|
|
```bash
|
|
gitea admin regenerate hooks # dopo restore/spostamento directory
|
|
gitea admin regenerate keys # rigenera authorized_keys
|
|
gitea doctor check --list # elenco controlli
|
|
gitea doctor check --all [--fix] # diagnosi/riparazione
|
|
gitea doctor recreate-table # backup DB prima!
|
|
gitea doctor convert # utf8 → utf8mb4 (MySQL)
|
|
gitea migrate # migrazioni DB (idempotente)
|
|
gitea generate secret SECRET_KEY|INTERNAL_TOKEN|JWT_SECRET
|
|
gitea cert --host your-domain.com
|
|
```
|
|
## Autenticazione esterna
|
|
`gitea admin auth list|delete --id|add-oauth|add-smtp|add-ldap|add-ldap-simple|update-*`
|
|
|
|
## Server in esecuzione
|
|
`gitea manager shutdown|restart|flush-queues|logging|processes [--stacktraces --cancel PID]`
|
|
|
|
## Backup
|
|
`gitea dump` (vedi [backup-restore.md](backup-restore.md)), `dump-repo`/`restore-repo` per singoli repo.
|
|
|
|
## Actions
|
|
`gitea actions generate-runner-token [--scope owner[/repo]]`
|