Skills2026年4月10日·1 分钟阅读

Gitea — Lightweight Self-Hosted Git Service

Gitea is a painless self-hosted Git service with code hosting, review, CI/CD, package registry, and project management — a lightweight GitHub/GitLab alternative.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 29/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Stage only
信任
信任等级:Established
入口
step-1.md
安全暂存命令
npx -y tokrepo@latest install 60bf33b1-349e-11f1-9bc6-00163e2b0d79 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

TL;DR
Gitea is a lightweight, self-hosted Git service written in Go with code hosting, CI/CD, package registry, and project management in one binary.
§01

What it is

Gitea is a self-hosted Git service written in Go that provides a complete software development platform. It covers code hosting, pull requests with inline review, issue tracking, CI/CD through Gitea Actions (GitHub Actions compatible), a built-in package registry, wikis, and organization management. It ships as a single binary with minimal resource requirements.

Gitea suits teams and individuals who want GitHub-like functionality on their own infrastructure. It runs on modest hardware, making it practical for home servers, air-gapped environments, and organizations that need full control over their source code.

§02

How it saves time or tokens

Gitea replaces multiple tools with a single deployment. Code hosting, CI/CD, package registry, and project management all run from one service. The GitHub Actions compatibility layer means existing workflow YAML files work with minimal changes. Docker deployment takes one command, and the Go binary starts in seconds with no external dependencies beyond a database.

§03

How to use

  1. Run the Docker container with docker run -d --name gitea -p 3000:3000 -p 2222:22 -v gitea-data:/data gitea/gitea:latest.
  2. Open http://localhost:3000 and complete the installation wizard to configure the database and admin account.
  3. Create repositories, set up branch protection rules, and configure Gitea Actions for CI/CD pipelines.
§04

Example

# Start Gitea with Docker
docker run -d \
  --name gitea \
  -p 3000:3000 \
  -p 2222:22 \
  -v gitea-data:/data \
  gitea/gitea:latest

# Clone and push
git clone http://localhost:3000/user/repo.git
cd repo
echo '# My Project' > README.md
git add . && git commit -m 'init'
git push origin main
§05

Related on TokRepo

§06

Common pitfalls

  • Gitea Actions requires a separate runner binary (act_runner). The Gitea server alone does not execute CI/CD jobs.
  • SQLite works for small teams but PostgreSQL or MySQL is recommended for anything beyond a few concurrent users.
  • Gitea is not POSIX-compatible with GitHub API endpoints. Some third-party GitHub integrations may need adjustments to work with Gitea API paths.

常见问题

How does Gitea compare to GitLab?+

Gitea is much lighter than GitLab. It runs from a single Go binary with minimal RAM usage, while GitLab requires multiple services and significantly more resources. Gitea lacks some enterprise features like built-in container scanning, but covers core Git hosting, CI/CD, and project management.

Does Gitea support GitHub Actions workflows?+

Yes. Gitea Actions provides compatibility with GitHub Actions YAML syntax. You install the act_runner binary alongside Gitea, register it, and existing workflow files work with minimal changes. Some GitHub-specific actions may need substitution.

What databases does Gitea support?+

Gitea supports SQLite, PostgreSQL, MySQL, and MSSQL. SQLite is the simplest for small deployments. PostgreSQL is recommended for production use with multiple concurrent users.

Can Gitea mirror repositories from GitHub?+

Yes. Gitea supports repository mirroring from GitHub, GitLab, and other Git hosts. You can set up automatic pull mirroring to keep a local copy synchronized with an upstream repository.

What are the minimum system requirements for Gitea?+

Gitea runs on minimal hardware. A single-core CPU and 512MB RAM is sufficient for small teams. The Go binary is around 100MB. Storage depends on repository sizes and the package registry usage.

引用来源 (3)
  • Gitea GitHub— Gitea provides code hosting, CI/CD, package registry, and project management in …
  • Gitea Documentation— Gitea Actions provides GitHub Actions compatible CI/CD
  • Gitea Official Site— Self-hosted Git service comparison and architecture patterns
🙏

来源与感谢

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产