Help us shape the future of Go! Take the 2026 Go Developer Survey

gitsss

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 13 Imported by: 0

README

gitsss

内网、自托管 Git 协作平台。Gitsss 以单个离线 Docker 镜像运行,包含仓库、Issue、Pull Request、Actions、Packages、Release 与 Git LFS,并保留成熟 Git 服务的兼容语义。

前置条件

  • Docker Engine 或 Docker Desktop 已启动,并可执行 docker、docker compose。
  • 离线镜像包,例如 gitsss-image.tar;也可预先执行 docker load --input gitsss-image.tar。
  • Windows 使用 PowerShell 5.1+;Linux/macOS 使用 Bash。

安装器从离线包加载镜像,且始终使用 --pull never,不会访问镜像仓库。

默认配置

项目 默认值
Web 端口 3000
SSH 端口 2222
默认地址 http://localhost:3000/
初始管理员 root
初始密码 root
最小密码长度 4
Docker 镜像 gitsss/gitsss:latest
数据卷 gitsss-data

初始管理员仅在空数据卷创建,首次登录必须修改密码。生产环境请在安装时覆盖默认凭据。

内网生产能力

  • 管理员可生成有时效、一次性账号邀请链接;邀请用户只需设置账号密码。
  • 登录失败采用账号 + 来源地址的渐进式延迟,成功登录立即恢复,不永久锁死账号。
  • 仓库页面提供 GitHub 风格主题、商业版 Git 导航布局和可折叠宽屏侧栏;窄屏自动切换为可关闭抽屉。侧栏覆盖代码、Issue、PR、Actions、Packages、任务看板、Release、Wiki、外部链接与设置,并支持拖拽/键盘指派成员与本地 WIP 限制。
  • 服务进程默认内置 Actions Runner;管理员可在 Actions → Runners 查看、启动、停止、重启或禁用,外部 Runner 仍兼容。
  • 首页提供 Actions Worker 运营面板:运行中任务固定置顶,排队任务可搜索,已完成任务隐藏,并保留最近一次成功/失败结果与 24 小时统计。
  • 游戏仓库支持 Git LFS、3D 模型、常见图片/音视频、Unity/Godot 文本资产,以及 TGA/DDS 纹理预览;无法安全解码的格式保留原始资产入口。

安装

Windows PowerShell

在仓库根目录运行。将 192.168.110.42 换成用户可访问此服务的服务器 IP 或域名。

.\install\install.ps1 `
  -ImageArchive .\gitsss-image.tar `
  -InstallDir C:\gitsss `
  -Port 3000 `
  -RootUrl http://192.168.110.42:3000/ `
  -InitialAdminUser root `
  -InitialAdminPassword 'change-this-password'

安装完成后访问 RootUrl。脚本创建 C:\gitsss\.env、启动容器,并设置隐藏的登录自启动任务。

Linux / macOS Shell
./install/install.sh \
  --image-archive ./gitsss-image.tar \
  --install-dir /opt/gitsss \
  --port 3000 \
  --root-url http://192.168.110.42:3000/ \
  --initial-admin-user root \
  --initial-admin-password 'change-this-password'

Linux 默认安装并启用 systemd 服务;macOS 默认安装用户级 launchd Agent。无自启动需求时,追加 --no-autostart;仅写入安装文件、不启动服务时,追加 --no-start。

日常操作

安装目录内保存 compose.yaml、.env 与日志。将以下 INSTALL_DIR 换成实际安装路径。

查看状态与日志
docker compose --project-directory INSTALL_DIR ps
docker compose --project-directory INSTALL_DIR logs --follow

PowerShell:

docker compose --project-directory C:\gitsss ps
docker compose --project-directory C:\gitsss logs --follow
更新

更新不会迁移或删除 gitsss-data;必须复用原安装目录和数据卷。获得新版离线镜像包后,以原参数重跑安装器。它会加载镜像、更新安装目录文件、重建容器,并保留数据。

.\install\install.ps1 `
  -ImageArchive .\gitsss-image-new.tar `
  -InstallDir C:\gitsss `
  -DataVolume gitsss-data `
  -Port 3000 `
  -RootUrl http://192.168.110.42:3000/
./install/install.sh \
  --image-archive ./gitsss-image-new.tar \
  --install-dir /opt/gitsss \
  --data-volume gitsss-data \
  --port 3000 \
  --root-url http://192.168.110.42:3000/

不要在已有数据卷的更新命令中传入新的管理员凭据;现有账户密码不会被重置。

修改端口

同样重跑安装器,保持 InstallDir / --install-dir 和数据卷不变,仅修改端口与外部地址。示例:改为 3001。

.\install\install.ps1 -InstallDir C:\gitsss -DataVolume gitsss-data -Port 3001 -RootUrl http://192.168.110.42:3001/
./install/install.sh --install-dir /opt/gitsss --data-volume gitsss-data --port 3001 --root-url http://192.168.110.42:3001/
卸载

先停止并移除容器。下列命令保留 gitsss-data,可供重新安装或备份恢复。

docker compose --project-directory C:\gitsss down
Unregister-ScheduledTask -TaskName 'GitSSS Background' -Confirm:$false -ErrorAction SilentlyContinue
Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\GitSSS Background.vbs" -Force -ErrorAction SilentlyContinue
docker compose --project-directory /opt/gitsss down
# Linux:sudo systemctl disable --now gitsss.service && sudo rm /etc/systemd/system/gitsss.service && sudo systemctl daemon-reload
# macOS:launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/com.gitsss.autostart.plist"; rm -f "$HOME/Library/LaunchAgents/com.gitsss.autostart.plist"

若要永久删除所有仓库、用户、Issue 与 Actions 数据,先确认备份可用,再执行:

docker volume rm gitsss-data

此操作不可恢复。使用非默认数据卷时,将命令中的 gitsss-data 替换成实际名称。

开发

pnpm install --frozen-lockfile
task help
task fmt
task lint:go
task lint:js
task test

相关文档

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd provides subcommands to the gitsss binary - such as "web" or "admin".
Package cmd provides subcommands to the gitsss binary - such as "web" or "admin".
contrib
backport command
db
git
modules
csv
git
giteahttpmigration
Package giteahttpmigration migrates selected Git repositories and their account/RBAC data through HTTP only.
Package giteahttpmigration migrates selected Git repositories and their account/RBAC data through HTTP only.
lfs
log
Package log provides logging capabilities for Gitea.
Package log provides logging capabilities for Gitea.
queue
Package queue implements a specialized concurrent queue system for Gitea.
Package queue implements a specialized concurrent queue system for Gitea.
ssh
svg
uri
web
zstd
Package zstd provides a high-level API for reading and writing zstd-compressed data.
Package zstd provides a high-level API for reading and writing zstd-compressed data.
packages
migration-sdk module
api/v1
Package v1 Gitea API
Package v1 Gitea API
private
Package private contains all internal routes.
Package private contains all internal routes.
web
runner module
services
contexttest
Package contexttest provides utilities for testing Web/API contexts with models.
Package contexttest provides utilities for testing Web/API contexts with models.
git
lfs
org
tools
gitsss-vet module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL