Enable 2FA on the admin account (TOTP, or WebAuthn with a security key/passkey)
Bot accounts: Gitea's bot type has no password, so the token is the only credential. 2FA doesn't apply, and "Prohibit sign-in" must stay off because it also blocks token access (tested: API returns 403)
Review every access token (user and bot): remove unused ones, keep scopes minimal
Review repo collaborators and their permission level
Gitea tokens don't expire, so write a short rotation routine (for example every 6 months) and note it in the README
All human accounts with write access use 2FA, and every token has a known purpose and the smallest scope that works.
Anyone who can log in and push can run code on the runners, so account security is the outer wall of the whole pipeline.
**Enterprise practice:** SSO with MFA, least-privilege service accounts, regular access reviews.
## Steps
- [x] Self-registration disabled (`DISABLE_REGISTRATION = true`)
- [x] Enable 2FA on the admin account (TOTP, or WebAuthn with a security key/passkey)
- [x] Bot accounts: Gitea's bot type has no password, so the token is the only credential. 2FA doesn't apply, and "Prohibit sign-in" must stay off because it also blocks token access (tested: API returns 403)
- [x] Review every access token (user and bot): remove unused ones, keep scopes minimal
- [x] Review repo collaborators and their permission level
- [ ] Gitea tokens don't expire, so write a short rotation routine (for example every 6 months) and note it in the README
## Tools
Gitea built-in (2FA, token scopes, collaborator settings).
## Done when
All human accounts with write access use 2FA, and every token has a known purpose and the smallest scope that works.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Anyone who can log in and push can run code on the runners, so account security is the outer wall of the whole pipeline.
Enterprise practice: SSO with MFA, least-privilege service accounts, regular access reviews.
Steps
DISABLE_REGISTRATION = true)Tools
Gitea built-in (2FA, token scopes, collaborator settings).
Done when
All human accounts with write access use 2FA, and every token has a known purpose and the smallest scope that works.