|
1 | | -# Gitea |
| 1 | +# Hanzo Git |
2 | 2 |
|
3 | | -[](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly") |
4 | | -[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea") |
5 | | -[](https://goreportcard.com/report/gitea.dev "Go Report Card") |
6 | | -[](https://pkg.go.dev/gitea.dev "GoDoc") |
7 | | -[](https://github.com/go-gitea/gitea/releases/latest "GitHub release") |
8 | | -[](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source") |
9 | | -[](https://opencollective.com/gitea "Become a backer/sponsor of gitea") |
10 | | -[](https://opensource.org/licenses/MIT "License: MIT") |
11 | | -[](https://translate.gitea.com "Crowdin") |
| 3 | +[](https://opensource.org/licenses/MIT "License: MIT") |
12 | 4 |
|
13 | | -[English](./README.md) | [繁體中文](./README.zh-tw.md) |
| 5 | +Hanzo 自托管的 Git 平台 — Git 托管、代码审查、问题跟踪、包仓库,以及兼容于 |
| 6 | +GitHub Actions 的 CI/CD,并通过 hanzo.id OIDC 原生集成 IAM。服务位于 |
| 7 | +[git.hanzo.ai](https://git.hanzo.ai)。 |
14 | 8 |
|
15 | | -## 目的 |
| 9 | +本项目是 [Gitea](https://gitea.com)(MIT)的白牌分支。上游版权与许可完整保留于 |
| 10 | +[LICENSE](LICENSE);身份验证改接 Hanzo IAM 而非本地账号,产品品牌为 Hanzo Git。 |
16 | 11 |
|
17 | | -这个项目的目标是提供最简单、最快速、最无痛的方式来设置自托管的 Git 服务。 |
| 12 | +## 构建与部署 |
18 | 13 |
|
19 | | -由于 Gitea 是用 Go 语言编写的,它可以在 Go 支持的所有平台和架构上运行,包括 Linux、macOS 和 Windows 的 x86、amd64、ARM 和 PowerPC 架构。这个项目自 2016 年 11 月从 [Gogs](https://gogs.io) [分叉](https://blog.gitea.com/welcome-to-gitea/) 而来,但已经有了很多变化。 |
| 14 | +如同每个 Hanzo 仓库,只有一种方式:根目录的 `hanzo.yml` 声明镜像与测试; |
| 15 | +约七行的 `.github/workflows/cicd.yml` 导入 `hanzoai/ci`,在 arc pool 构建并推送 |
| 16 | +`ghcr.io/hanzoai/git`。切勿在本地构建镜像。 |
20 | 17 |
|
21 | | -在线演示可以访问 [demo.gitea.com](https://demo.gitea.com)。 |
| 18 | +运行中的服务定义于 `hanzoai/universe`(`git` operator App CR):单写入者 SQLite |
| 19 | +部署,配置经由 `GIT__<section>__<KEY>` 环境变量契约注入,OIDC 登录对接 hanzo.id。 |
22 | 20 |
|
23 | | -要访问免费的 Gitea 服务(有一定数量的仓库限制),可以访问 [gitea.com](https://gitea.com/user/login)。 |
| 21 | +## 开发 |
24 | 22 |
|
25 | | -要快速部署您自己的专用 Gitea 实例,可以在 [cloud.gitea.com](https://cloud.gitea.com) 开始免费试用。 |
26 | | - |
27 | | -## 文件 |
28 | | - |
29 | | -您可以在我们的官方 [文件网站](https://docs.gitea.com/) 上找到全面的文件。 |
30 | | - |
31 | | -它包括安装、管理、使用、开发、贡献指南等,帮助您快速入门并有效地探索所有功能。 |
32 | | - |
33 | | -如果您有任何建议或想要贡献,可以访问 [文件仓库](https://gitea.com/gitea/docs) |
34 | | - |
35 | | -## 构建 |
36 | | - |
37 | | -从源代码树的根目录运行: |
38 | | - |
39 | | - TAGS="bindata" make build |
40 | | - |
41 | | -`build` 目标分为两个子目标: |
42 | | - |
43 | | -- `make backend` 需要 [Go Stable](https://go.dev/dl/),所需版本在 [go.mod](/go.mod) 中定义。 |
44 | | -- `make frontend` 需要 [Node.js LTS](https://nodejs.org/en/download/) 或更高版本以及 [pnpm](https://pnpm.io/installation)。 |
45 | | - |
46 | | -需要互联网连接来下载 go 和 npm 模块。从包含预构建前端文件的官方源代码压缩包构建时,不会触发 `frontend` 目标,因此可以在没有 Node.js 的情况下构建。 |
47 | | - |
48 | | -更多信息:https://docs.gitea.com/installation/install-from-source |
49 | | - |
50 | | -## 使用 |
51 | | - |
52 | | -构建后,默认情况下会在源代码树的根目录生成一个名为 `gitea` 的二进制文件。要运行它,请使用: |
53 | | - |
54 | | - ./gitea web |
55 | | - |
56 | | -> [!注意] |
57 | | -> 如果您对使用我们的 API 感兴趣,我们提供了实验性支持,并附有 [文件](https://docs.gitea.com/api)。 |
58 | | -
|
59 | | -## 贡献 |
60 | | - |
61 | | -预期的工作流程是:Fork -> Patch -> Push -> Pull Request |
62 | | - |
63 | | -> [!注意] |
64 | | -> |
65 | | -> 1. **在开始进行 Pull Request 之前,您必须阅读 [贡献者指南](CONTRIBUTING.md)。** |
66 | | -> 2. 如果您在项目中发现了漏洞,请私下写信给 **security@gitea.io**。谢谢! |
67 | | -
|
68 | | -## 翻译 |
69 | | - |
70 | | -[](https://translate.gitea.com) |
71 | | - |
72 | | -翻译通过 [Crowdin](https://translate.gitea.com) 进行。如果您想翻译成新的语言,请在 Crowdin 项目中请求管理员添加新语言。 |
73 | | - |
74 | | -您也可以创建一个 issue 来添加语言,或者在 discord 的 #translation 频道上询问。如果您需要上下文或发现一些翻译问题,可以在字符串上留言或在 Discord 上询问。对于一般的翻译问题,文档中有一个部分。目前有点空,但我们希望随着问题的出现而填充它。 |
75 | | - |
76 | | -更多信息请参阅 [文件](https://docs.gitea.com/contributing/localization)。 |
77 | | - |
78 | | -## 官方和第三方项目 |
79 | | - |
80 | | -我们提供了一个官方的 [go-sdk](https://gitea.com/gitea/go-sdk),一个名为 [tea](https://gitea.com/gitea/tea) 的 CLI 工具和一个 Gitea Action 的 [action runner](https://gitea.com/gitea/act_runner)。 |
81 | | - |
82 | | -我们在 [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea) 维护了一个 Gitea 相关项目的列表,您可以在那里发现更多的第三方项目,包括 SDK、插件、主题等。 |
83 | | - |
84 | | -## 通讯 |
85 | | - |
86 | | -[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea") |
87 | | - |
88 | | -如果您有任何文件未涵盖的问题,可以在我们的 [Discord 服务器](https://discord.gg/Gitea) 上与我们联系,或者在 [discourse 论坛](https://forum.gitea.com/) 上创建帖子。 |
89 | | - |
90 | | -## 作者 |
91 | | - |
92 | | -- [维护者](https://github.com/orgs/go-gitea/people) |
93 | | -- [贡献者](https://github.com/go-gitea/gitea/graphs/contributors) |
94 | | -- [翻译者](options/locale/TRANSLATORS) |
95 | | - |
96 | | -## 支持者 |
97 | | - |
98 | | -感谢所有支持者! 🙏 [[成为支持者](https://opencollective.com/gitea#backer)] |
99 | | - |
100 | | -<a href="https://opencollective.com/gitea#backers" target="_blank"><img src="https://opencollective.com/gitea/backers.svg?width=890"></a> |
101 | | - |
102 | | -## 赞助商 |
103 | | - |
104 | | -通过成为赞助商来支持这个项目。您的标志将显示在这里,并带有链接到您的网站。 [[成为赞助商](https://opencollective.com/gitea#sponsor)] |
105 | | - |
106 | | -<a href="https://opencollective.com/gitea/sponsor/0/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/0/avatar.svg"></a> |
107 | | -<a href="https://opencollective.com/gitea/sponsor/1/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/1/avatar.svg"></a> |
108 | | -<a href="https://opencollective.com/gitea/sponsor/2/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/2/avatar.svg"></a> |
109 | | -<a href="https://opencollective.com/gitea/sponsor/3/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/3/avatar.svg"></a> |
110 | | -<a href="https://opencollective.com/gitea/sponsor/4/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/4/avatar.svg"></a> |
111 | | -<a href="https://opencollective.com/gitea/sponsor/5/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/5/avatar.svg"></a> |
112 | | -<a href="https://opencollective.com/gitea/sponsor/6/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/6/avatar.svg"></a> |
113 | | -<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a> |
114 | | -<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a> |
115 | | -<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a> |
116 | | - |
117 | | -## 常见问题 |
118 | | - |
119 | | -**Gitea 怎么发音?** |
120 | | - |
121 | | -Gitea 的发音是 [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY),就像 "gi-tea" 一样,g 是硬音。 |
122 | | - |
123 | | -**为什么这个项目没有托管在 Gitea 实例上?** |
124 | | - |
125 | | -我们正在 [努力](https://github.com/go-gitea/gitea/issues/1029)。 |
126 | | - |
127 | | -**在哪里可以找到安全补丁?** |
128 | | - |
129 | | -在 [发布日志](https://github.com/go-gitea/gitea/releases) 或 [变更日志](https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md) 中,搜索关键词 `SECURITY` 以找到安全补丁。 |
130 | | - |
131 | | -## 许可证 |
132 | | - |
133 | | -这个项目是根据 MIT 许可证授权的。 |
134 | | -请参阅 [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) 文件以获取完整的许可证文本。 |
135 | | - |
136 | | -## 进一步信息 |
137 | | - |
138 | | -<details> |
139 | | -<summary>寻找界面概述?查看这里!</summary> |
140 | | - |
141 | | -### 登录/注册页面 |
142 | | - |
143 | | - |
144 | | - |
145 | | - |
146 | | -### 用户仪表板 |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | | - |
152 | | - |
153 | | -### 用户资料 |
154 | | - |
155 | | - |
156 | | - |
157 | | -### 探索 |
158 | | - |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | | -### 仓库 |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | | - |
172 | | - |
173 | | -#### 仓库问题 |
174 | | - |
175 | | - |
176 | | - |
177 | | - |
178 | | -#### 仓库拉取请求 |
179 | | - |
180 | | - |
181 | | - |
182 | | - |
183 | | - |
184 | | - |
185 | | -#### 仓库操作 |
186 | | - |
187 | | - |
188 | | - |
189 | | - |
190 | | -#### 仓库活动 |
191 | | - |
192 | | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | -### 组织 |
198 | | - |
199 | | - |
200 | | - |
201 | | -</details> |
| 23 | +本地环境请见 [docs/development.md](docs/development.md)。构建完成后,运行 |
| 24 | +`./gitea web` 启动服务器,或 `./gitea help` 查看所有命令。 |
0 commit comments