mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-09-24 09:31:52 +02:00
* feat(auth): API keys for programmatic access Adds the @better-auth/api-key plugin so scripts and CI pipelines can call the existing endpoints with an x-api-key header instead of a session cookie. Keys are owned by a user, hashed at rest, prefixed gm_, never expire unless an expiry is chosen, and are not rate limited. A small guard plugin refuses key management calls that arrive with a key, so a leaked key cannot mint or revoke keys. New API Keys section on the Authentication tab with create, show once, copy and revoke. Migration 0017 adds the api_keys table with the validator fixture. docs/API.md documents the header and the calls automation needs. An e2e spec covers create, use, refuse and revoke over HTTP. bun.nix regenerated for the new package. Closes #314 Claude-Session: https://claude.ai/code/session_01Tp9pmi65a8k5jLMQFLf4JX * fix(e2e): send Origin on cookie-authenticated key management calls Better Auth rejects a cookie-authenticated POST without an Origin header (403 MISSING_OR_NULL_ORIGIN). Browsers always send one, the Playwright request context does not, so the spec sets it on the create and delete calls. Also asserts the guard's 403 code and documents the Origin requirement for scripts that manage keys with a session. Claude-Session: https://claude.ai/code/session_01Tp9pmi65a8k5jLMQFLf4JX
2.3 KiB
2.3 KiB
Gitea Mirror Documentation
This folder contains engineering and operations references for the open-source Gitea Mirror project. Each guide focuses on the parts of the system that still require bespoke explanation beyond the in-app help and the main README.md.
Available Guides
Core workflow
- DEVELOPMENT_WORKFLOW.md – Set up a local environment, run scripts, and understand the repo layout (app + marketing site).
- ENVIRONMENT_VARIABLES.md – Complete reference for every configuration flag supported by the app and Docker images.
- NIX_DEPLOYMENT.md – User-facing deployment guide for Nix and NixOS.
- NIX_DISTRIBUTION.md – Maintainer notes for packaging, releases, and distribution strategy.
Reliability & recovery
- GRACEFUL_SHUTDOWN.md – How signal handling, shutdown coordination, and job persistence work in v3.
- RECOVERY_IMPROVEMENTS.md – Deep dive into the startup recovery workflow and supporting scripts.
Authentication
- SSO-OIDC-SETUP.md – Configure OIDC/SSO providers through the admin UI.
- SSO_TESTING.md – Recipes for local and staging SSO testing (Google, Keycloak, mock providers).
- API.md – Create API keys and call the app from scripts, CI pipelines and workflow tools.
If you are looking for customer-facing playbooks, see the MDX use cases under www/src/pages/use-cases/.
Quick start for local development
git clone https://github.com/RayLabsHQ/gitea-mirror.git
cd gitea-mirror
bun run setup # installs deps and seeds the SQLite DB
bun run dev # starts the Astro/Bun app on http://localhost:4321
The first user you create locally becomes the administrator. All other configuration—GitHub owners, Gitea targets, scheduling, cleanup—is done through the Configuration screen in the UI.
Contributing & support
- 🎯 Contribution guide: ../CONTRIBUTING.md
- 🐞 Issues & feature requests: https://github.com/RayLabsHQ/gitea-mirror/issues
- 💬 Discussions: https://github.com/RayLabsHQ/gitea-mirror/discussions
- 🔐 Security policy & advisories: https://github.com/RayLabsHQ/gitea-mirror/security