mirror of
https://github.com/go-gitea/gitea
synced 2025-09-28 03:28:13 +00:00
- **Installation**: includes how to install Gitea and related other tools, also includes upgrade Gitea - **Administration**: includes how to configure Gitea, customize Gitea and manage Gitea instance out of Gitea admin UI - **Usage**: includes how to use Gitea's functionalities. A sub documentation is about packages, in future we could also include CI/CD and others. - **Development**: includes how to integrate with Gitea's API, how to develop new features within Gitea - **Contributing**: includes how to contribute code to Gitea repositories. After this is merged, I think we can have a sub-documentation of `Usage` part named `Actions` to describe how to use Gitea actions --------- Co-authored-by: John Olheiser <john.olheiser@gmail.com>
1.8 KiB
1.8 KiB
date, title, slug, weight, toc, draft, menu
| date | title | slug | weight | toc | draft | menu | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2017-04-08T11:34:00+02:00 | 环境变量清单 | environment-variables | 20 | false | false |
|
环境变量清单
这里是用来控制 Gitea 行为表现的的环境变量清单,您需要在执行如下 Gitea 启动命令前设置它们来确保配置生效:
GITEA_CUSTOM=/home/gitea/custom ./gitea web
Go 的配置
因为 Gitea 使用 Go 语言编写,因此它使用了一些相关的 Go 的配置参数:
GOOSGOARCHGOPATH
您可以在官方文档中查阅这些配置参数的详细信息。
Gitea 的文件目录
GITEA_WORK_DIR:工作目录的绝对路径GITEA_CUSTOM:默认情况下 Gitea 使用默认目录GITEA_WORK_DIR/custom,您可以使用这个参数来配置 custom 目录GOGS_WORK_DIR: 已废弃,请使用GITEA_WORK_DIR替代GOGS_CUSTOM: 已废弃,请使用GITEA_CUSTOM替代
操作系统配置
USER:Gitea 运行时使用的系统用户,它将作为一些 repository 的访问地址的一部分USERNAME: 如果没有配置USER, Gitea 将使用USERNAMEHOME: 用户的 home 目录,在 Windows 中会使用USERPROFILE环境变量
仅限于 Windows 的配置
USERPROFILE: 用户的主目录,如果未配置则会使用HOMEDRIVE+HOMEPATHHOMEDRIVE: 用于访问 home 目录的主驱动器路径(C盘)HOMEPATH:在指定主驱动器下的 home 目录相对路径
Miscellaneous
SKIP_MINWINSVC:如果设置为 1,在 Windows 上不会以 service 的形式运行。