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

Gogs — Painless Self-Hosted Git Service

Gogs is a lightweight, self-hosted Git service written in Go. It runs on minimal hardware, supports multiple platforms, and provides a GitHub-like experience with issue tracking, pull requests, and webhooks.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Gogs Overview
先审查命令
npx -y tokrepo@latest install cda70b8e-39da-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
Gogs is a single Go binary that provides a full GitHub-like Git hosting experience on minimal hardware.
§01

What it is

Gogs is a self-hosted Git service built with Go that provides a clean web interface for hosting Git repositories. It includes issue tracking, pull requests, code review, built-in wiki, webhooks, and organization management.

Gogs targets small teams and individual developers who want a private Git hosting solution that runs on minimal hardware -- even a Raspberry Pi -- without the resource overhead of GitLab or Gitea.

§02

How it saves time or tokens

Gogs is a single binary with embedded assets and templates. There is no separate web server, no Node.js build step, and no external dependencies beyond a database. Deployment takes minutes instead of hours, and the low resource footprint means it can run alongside other services on budget hardware.

§03

How to use

  1. Download and run the Gogs binary:
# Binary install
wget https://dl.gogs.io/0.13.0/gogs_0.13.0_linux_amd64.tar.gz
tar -xzf gogs_0.13.0_linux_amd64.tar.gz && cd gogs
./gogs web
  1. Or run via Docker:
docker run -d --name=gogs -p 3000:3000 -v gogs-data:/data gogs/gogs
  1. Open the web UI and complete the first-run setup wizard to configure your database and admin account.
§04

Example

# Clone a repository from your Gogs instance
git clone http://your-gogs-server:3000/username/repo.git

# Push a new repository
mkdir myproject && cd myproject
git init && git add . && git commit -m 'init'
git remote add origin http://your-gogs-server:3000/username/myproject.git
git push -u origin main
§05

Related on TokRepo

§06

Common pitfalls

  • Gogs uses XORM and supports SQLite, MySQL, PostgreSQL, and MSSQL. SQLite is simplest for single-user setups but does not handle concurrent writes well.
  • Gogs and Gitea share a common codebase origin. Gitea has more contributors and features but also higher resource usage. Pick based on your scale needs.
  • SSH key management requires the Gogs binary to have access to the authorized_keys file. Misconfigured SSH causes clone failures over SSH protocol.

常见问题

What is the difference between Gogs and Gitea?+

Gitea is a community fork of Gogs created in 2016. Gitea has more active contributors and additional features like GitHub Actions-compatible CI. Gogs focuses on simplicity and low resource usage. Both provide a GitHub-like web interface for Git hosting.

What databases does Gogs support?+

Gogs supports SQLite, MySQL, PostgreSQL, and MSSQL via the XORM ORM. SQLite requires no external database server and works well for small installations. MySQL and PostgreSQL are recommended for teams.

Can Gogs run on a Raspberry Pi?+

Yes. Gogs compiles for ARM architectures and its low memory footprint (typically under 100MB RAM) makes it suitable for Raspberry Pi and other ARM single-board computers.

Does Gogs support pull requests?+

Yes. Gogs provides pull request workflows with diff viewing, inline comments, and merge options. The feature set is simpler than GitHub but covers the core code review workflow.

How do I migrate repositories to Gogs?+

Gogs supports repository mirroring from external Git URLs. You can also use the API to create repositories and then push existing Git repos via standard git remote commands.

引用来源 (3)

讨论

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

相关资产