From 84bc4f138dae4d0050393faeba53e7d26ee169fe Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 19 Feb 2026 19:02:58 +0000 Subject: [PATCH 001/217] Add `actions.WORKFLOW_DIRS` setting to config cheat sheet (#347) Add documentation for the new `actions.WORKFLOW_DIRS` setting introduced in https://github.com/go-gitea/gitea/pull/36619 for v1.26. Reviewed-on: https://gitea.com/gitea/docs/pulls/347 Reviewed-by: Lunny Xiao Co-authored-by: silverwind Co-committed-by: silverwind --- docs/administration/config-cheat-sheet.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 34adcf95..9a77cbf0 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -1594,6 +1594,7 @@ PROXY_HOSTS = *.github.com - `ENDLESS_TASK_TIMEOUT`: **3h**: Timeout to stop the tasks which have running status and continuous updates, but don't end for a long time - `ABANDONED_JOB_TIMEOUT`: **24h**: Timeout to cancel the jobs which have waiting status, but haven't been picked by a runner for a long time - `SKIP_WORKFLOW_STRINGS`: **[skip ci],[ci skip],[no ci],[skip actions],[actions skip]**: Strings committers can place inside a commit message or PR title to skip executing the corresponding actions workflow +- `WORKFLOW_DIRS`: **.gitea/workflows,.github/workflows**: Comma-separated list of workflow directories, the first one to exist in a repo is used to find Actions workflow files. `DEFAULT_ACTIONS_URL` indicates where the Gitea Actions runners should find the actions with relative path. For example, `uses: actions/checkout@v4` means `https://github.com/actions/checkout@v4` since the value of `DEFAULT_ACTIONS_URL` is `github`. From d26bbc9794607c4b68b6e242de69341c2727f915 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 22 Feb 2026 07:39:17 +0000 Subject: [PATCH 002/217] add new config options for releases (#348) https://github.com/go-gitea/gitea/pull/36697 Reviewed-on: https://gitea.com/gitea/docs/pulls/348 Reviewed-by: wxiaoguang Reviewed-by: silverwind Co-authored-by: TheFox0x7 Co-committed-by: TheFox0x7 --- docs/administration/config-cheat-sheet.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 9a77cbf0..695c0ef7 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -161,7 +161,9 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build - `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. - `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface -- For settings related to file attachments on releases, see the `attachment` section. +- `FILE_MAX_SIZE`: **2048**: Max filesize limit for release attachments (MB) +- `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once for a release. +- For other settings related to file attachments on releases, see the `attachment` section. ### Repository - Signing (`repository.signing`) @@ -924,7 +926,7 @@ Default templates for project board view: - `ENABLED`: **true**: Whether issue and pull request attachments are enabled. - `ALLOWED_TYPES`: **.avif,.cpuprofile,.csv,.dmp,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.json,.jsonc,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.webp,.xls,.xlsx,.zip**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. -- `MAX_SIZE`: **2048**: Maximum size (MB). +- `MAX_SIZE`: **100**: Max size of each file in MB. - `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once. - `STORAGE_TYPE`: **local**: Storage type for attachments, it could be ``, `local`, `minio`, `azureblob` or `xxx` which defined in another section with `[storage.xxx]`. From 44c6a0fa206461c20692c00f96f891f6e89723e1 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 22 Feb 2026 20:27:19 +0000 Subject: [PATCH 003/217] Move `X_FRAME_OPTIONS` from `cors` to `security` section (#349) ## Summary - Move `X_FRAME_OPTIONS` setting from `[cors]` to `[security]` section in the config cheat sheet - Document the new `unset` value option and clarify the header applies to web responses only Ref: https://github.com/go-gitea/gitea/pull/30256 Reviewed-on: https://gitea.com/gitea/docs/pulls/349 Reviewed-by: Lunny Xiao Co-authored-by: silverwind Co-committed-by: silverwind --- docs/administration/config-cheat-sheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 695c0ef7..8a90d64e 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -211,7 +211,6 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `MAX_AGE`: **10m**: max time to cache response - `ALLOW_CREDENTIALS`: **false**: allow request with credentials - `HEADERS`: **Content-Type,User-Agent**: additional headers that are permitted in requests -- `X_FRAME_OPTIONS`: **SAMEORIGIN**: Set the `X-Frame-Options` header value. ## UI (`ui`) @@ -586,6 +585,7 @@ And the following unique queues: - `REVERSE_PROXY_LIMIT`: **1**: Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request. Number of trusted proxy count. Set to zero to not use these headers. - `REVERSE_PROXY_TRUSTED_PROXIES`: **127.0.0.0/8,::1/128**: List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all. +- `X_FRAME_OPTIONS`: **SAMEORIGIN**: Set the `X-Frame-Options` header value for web responses. Set to `unset` to not send the header. Previously located in `[cors]`. - `DISABLE_GIT_HOOKS`: **true**: Set to `false` to enable users with Git Hook privilege to create custom Git Hooks. :::warning From d6bd3c6fb987721847b39e2f57c09a3c52061601 Mon Sep 17 00:00:00 2001 From: iqre8 Date: Wed, 25 Feb 2026 20:20:32 +0000 Subject: [PATCH 004/217] Update docs/installation/with-docker.md (#352) Removed version, and changed the command from `docker-compose` to `docker compose` and changed the tool `docker-compose` to the docker `compose`-plugin Reviewed-on: https://gitea.com/gitea/docs/pulls/352 Reviewed-by: Lunny Xiao Reviewed-by: silverwind Co-authored-by: iqre8 Co-committed-by: iqre8 --- docs/installation/with-docker.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/docs/installation/with-docker.md b/docs/installation/with-docker.md index 530b381b..db312425 100644 --- a/docs/installation/with-docker.md +++ b/docs/installation/with-docker.md @@ -12,8 +12,8 @@ Gitea provides automatically updated Docker images within its Docker Hub organiz possible to always use the latest stable tag or to use another service that handles updating Docker images. -This reference setup guides users through the setup based on `docker-compose`, but the installation -of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow +This reference setup guides users through the setup based on docker `compose`-plugin, but the installation +of the docker `compose`-plugin is out of scope of this documentation. To install the docker `compose`-plugin itself, follow the official [install instructions](https://docs.docker.com/compose/install/). ## Basics @@ -26,8 +26,6 @@ If you don't give the volume correct permissions, the container may not start. For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`) ```yaml -version: "3" - networks: gitea: external: false @@ -58,8 +56,6 @@ the port section. It's common to just change the host port and keep the ports wi the container like they are. ```diff -version: "3" - networks: gitea: external: false @@ -93,8 +89,6 @@ To start Gitea in combination with a MySQL database, apply these changes to the `docker-compose.yml` file created above. ```diff -version: "3" - networks: gitea: external: false @@ -144,8 +138,6 @@ To start Gitea in combination with a PostgreSQL database, apply these changes to the `docker-compose.yml` file created above. ```diff -version: "3" - networks: gitea: external: false @@ -196,8 +188,6 @@ create the required volume. You don't need to worry about permissions with named volumes; Docker will deal with that automatically. ```diff -version: "3" - networks: gitea: external: false @@ -233,11 +223,11 @@ From July 2023 Compose V1 stopped receiving updates. It's also no longer availab Compose V2 is included with all currently supported versions of Docker Desktop. Please use V2 to do below operations. ::: -To start this setup based on `docker-compose`, execute `docker-compose up -d`, -to launch Gitea in the background. Using `docker-compose ps` will show if Gitea -started properly. Logs can be viewed with `docker-compose logs`. +To start this setup based on the docker `compose`-plugin, execute `docker compose up -d`, +to launch Gitea in the background. Using `docker compose ps` will show if Gitea +started properly. Logs can be viewed with `docker compose logs`. -To shut down the setup, execute `docker-compose down`. This will stop +To shut down the setup, execute `docker compose down`. This will stop and kill the containers. The volumes will still exist. :::note @@ -247,9 +237,9 @@ If using a non-3000 port on http, change app.ini to match ## Installation -After starting the Docker setup via `docker-compose`, Gitea should be available using a +After starting the Docker setup via the docker `compose`-plugin, Gitea should be available using a favorite browser to finalize the installation. Visit http://server-ip:3000 and follow the -installation wizard. If the database was started with the `docker-compose` setup as +installation wizard. If the database was started with the docker `compose`-plugin setup as documented above, please note that `db` must be used as the database hostname. ## Configure the user inside Gitea using environment variables @@ -279,9 +269,9 @@ To upgrade your installation to the latest release: ```bash # Edit `docker-compose.yml` to update the version, if you have one specified # Pull new images -docker-compose pull +docker compose pull # Start a new container, automatically removes old one -docker-compose up -d +docker compose up -d ``` ## Managing Deployments With Environment Variables From dc136aa31b4dc561118c343daf2229cc3bdb6331 Mon Sep 17 00:00:00 2001 From: Zettat123 Date: Sun, 1 Mar 2026 19:00:35 +0000 Subject: [PATCH 005/217] Add `never` option to `PUBLIC_URL_DETECTION` configuration (#353) https://github.com/go-gitea/gitea/pull/36785 Reviewed-on: https://gitea.com/gitea/docs/pulls/353 Reviewed-by: Lunny Xiao Co-authored-by: Zettat123 Co-committed-by: Zettat123 --- docs/administration/config-cheat-sheet.md | 1 + .../current/administration/config-cheat-sheet.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 8a90d64e..35097674 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -316,6 +316,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a especially when the Gitea instance needs to be accessed in a container network. - "legacy": generate the public URL by "Host" header if "X-Forwarded-Proto" header exists, otherwise use "ROOT_URL". - "auto": always use "Host" header, and also use "X-Forwarded-Proto" header if it exists. If no "Host" header, use "ROOT_URL". + - "never": always use "ROOT_URL", never detect from request headers. - `STATIC_URL_PREFIX`: **_empty_**: Overwrite this option to request static resources from a different URL. This includes CSS files, images, JS files and web fonts. diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/config-cheat-sheet.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/config-cheat-sheet.md index ce3e64bd..f8606820 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/config-cheat-sheet.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/config-cheat-sheet.md @@ -292,6 +292,7 @@ aliases: 虽然它的默认值是 "legacy"(避免影响老的用户),大多数实例都应当使用 "auto" 行为,尤其是 Gitea 实例需要在容器网络中被访问的场景。 - "legacy": 当 "X-Forwarded-Proto" 请求头存在的时候,使用 "Host" 请求头生成公共 URL,否则使用 "ROOT_URL"。 - "auto": 总是使用 "Host" 请求头生成公共 URL,如果 "X-Forwarded-Proto" 请求头存在也会使用它。如果没有 "Host" 请求头则使用 "ROOT_URL"。 + - "never": 总是使用 "ROOT_URL" 生成公共 URL,不从请求头进行检测。 - `STATIC_URL_PREFIX`: **_empty_**: 覆盖此选项以从不同的 URL 请求静态资源。 这包括 CSS 文件、图片、JS 文件和 Web 字体。 From 9aac00df185c9309bb6677dcd760cb92662a94ab Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 8 Mar 2026 15:30:58 +0000 Subject: [PATCH 006/217] chore(deps): update dependency @easyops-cn/docusaurus-search-local to v0.55.1 (#354) Reviewed-on: https://gitea.com/gitea/docs/pulls/354 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- pnpm-lock.yaml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d41967e..4b076075 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: version: 3.9.2(@algolia/client-search@5.44.0)(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3) '@easyops-cn/docusaurus-search-local': specifier: ^0.55.0 - version: 0.55.0(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@docusaurus/theme-common@3.9.2(@docusaurus/plugin-content-docs@3.9.2(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(open-ask-ai@0.7.3(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + version: 0.55.1(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@docusaurus/theme-common@3.9.2(@docusaurus/plugin-content-docs@3.9.2(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(open-ask-ai@0.7.3(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@emotion/react': specifier: ^11.11.3 version: 11.14.0(@types/react@18.2.46)(react@19.2.4) @@ -1184,8 +1184,8 @@ packages: '@easyops-cn/autocomplete.js@0.38.1': resolution: {integrity: sha512-drg76jS6syilOUmVNkyo1c7ZEBPcPuK+aJA7AksM5ZIIbV57DMHCywiCr+uHyv8BE5jUTU98j/H7gVrkHrWW3Q==} - '@easyops-cn/docusaurus-search-local@0.55.0': - resolution: {integrity: sha512-pmyG+e9KZmo4wrufsneeoE2KG2zH9tbRGi0crJFY0kPxOTGSLeuU5w058Qzgpz8vZNui6i59lKjrlQtnXNBgog==} + '@easyops-cn/docusaurus-search-local@0.55.1': + resolution: {integrity: sha512-jmBKj1J+tajqNrCvECwKCQYTWwHVZDGApy8lLOYEPe+Dm0/f3Ccdw8BP5/OHNpltr7WDNY2roQXn+TWn2f1kig==} engines: {node: '>=12'} peerDependencies: '@docusaurus/theme-common': ^2 || ^3 @@ -4206,8 +4206,8 @@ packages: mdast-util-from-markdown@2.0.0: resolution: {integrity: sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==} - mdast-util-from-markdown@2.0.2: - resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} + mdast-util-from-markdown@2.0.3: + resolution: {integrity: sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==} mdast-util-frontmatter@2.0.1: resolution: {integrity: sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==} @@ -6044,8 +6044,8 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici@7.21.0: - resolution: {integrity: sha512-Hn2tCQpoDt1wv23a68Ctc8Cr/BHpUSfaPYrkajTXOS9IKpxVRx/X5m1K2YkbK2ipgZgxXSgsUinl3x+2YdSSfg==} + undici@7.22.0: + resolution: {integrity: sha512-RqslV2Us5BrllB+JeiZnK4peryVTndy9Dnqq62S3yYRRTj0tFQCwEniUy2167skdGOy3vqRzEvl1Dm4sV2ReDg==} engines: {node: '>=20.18.1'} unicode-canonical-property-names-ecmascript@2.0.1: @@ -8325,7 +8325,7 @@ snapshots: cssesc: 3.0.0 immediate: 3.3.0 - '@easyops-cn/docusaurus-search-local@0.55.0(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@docusaurus/theme-common@3.9.2(@docusaurus/plugin-content-docs@3.9.2(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(open-ask-ai@0.7.3(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@easyops-cn/docusaurus-search-local@0.55.1(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@docusaurus/theme-common@3.9.2(@docusaurus/plugin-content-docs@3.9.2(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(open-ask-ai@0.7.3(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: '@docusaurus/plugin-content-docs': 3.9.2(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(debug@4.4.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@docusaurus/theme-common': 3.9.2(@docusaurus/plugin-content-docs@3.9.2(@docusaurus/faster@3.9.2(@docusaurus/types@3.9.2(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)))(@mdx-js/react@3.1.1(@types/react@18.2.46)(react@19.2.4))(@rspack/core@1.5.0)(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@swc/core@1.10.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) @@ -8369,17 +8369,17 @@ snapshots: '@emnapi/core@1.8.1': dependencies: '@emnapi/wasi-threads': 1.1.0 - tslib: 2.8.1 + tslib: 2.6.2 optional: true '@emnapi/runtime@1.8.1': dependencies: - tslib: 2.8.1 + tslib: 2.6.2 optional: true '@emnapi/wasi-threads@1.1.0': dependencies: - tslib: 2.8.1 + tslib: 2.6.2 optional: true '@emotion/babel-plugin@11.13.5': @@ -9293,7 +9293,7 @@ snapshots: '@tybys/wasm-util@0.10.1': dependencies: - tslib: 2.8.1 + tslib: 2.6.2 optional: true '@types/acorn@4.0.6': @@ -9947,7 +9947,7 @@ snapshots: parse5: 7.3.0 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 - undici: 7.21.0 + undici: 7.22.0 whatwg-mimetype: 4.0.0 chokidar@3.6.0: @@ -11573,7 +11573,7 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-from-markdown@2.0.2: + mdast-util-from-markdown@2.0.3: dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 @@ -11633,7 +11633,7 @@ snapshots: dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2 + mdast-util-from-markdown: 2.0.3 mdast-util-to-markdown: 2.1.2 micromark-util-normalize-identifier: 2.0.1 transitivePeerDependencies: @@ -11681,7 +11681,7 @@ snapshots: mdast-util-gfm@3.1.0: dependencies: - mdast-util-from-markdown: 2.0.2 + mdast-util-from-markdown: 2.0.3 mdast-util-gfm-autolink-literal: 2.0.1 mdast-util-gfm-footnote: 2.1.0 mdast-util-gfm-strikethrough: 2.0.0 @@ -11709,7 +11709,7 @@ snapshots: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2 + mdast-util-from-markdown: 2.0.3 mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color @@ -11741,7 +11741,7 @@ snapshots: '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.2 + mdast-util-from-markdown: 2.0.3 mdast-util-to-markdown: 2.1.2 parse-entities: 4.0.2 stringify-entities: 4.0.4 @@ -13410,7 +13410,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.28.6 + '@babel/runtime': 7.28.4 regexpu-core@6.2.0: dependencies: @@ -14077,7 +14077,7 @@ snapshots: undici-types@5.26.5: {} - undici@7.21.0: {} + undici@7.22.0: {} unicode-canonical-property-names-ecmascript@2.0.1: {} From 4ca96900ee7fc47b7b54b0dbb0f53d989b2bd4d3 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 8 Mar 2026 15:31:11 +0000 Subject: [PATCH 007/217] chore(deps): update pnpm to v10.31.0 (#345) Reviewed-on: https://gitea.com/gitea/docs/pulls/345 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 00e9b15f..f517df9e 100644 --- a/package.json +++ b/package.json @@ -51,5 +51,5 @@ "engines": { "node": ">=18" }, - "packageManager": "pnpm@10.29.3" + "packageManager": "pnpm@10.31.0" } From 8809db41d8085d10c1355d101c4afd58148418bb Mon Sep 17 00:00:00 2001 From: silverwind <2021+silverwind@noreply.gitea.com> Date: Sun, 8 Mar 2026 18:20:51 +0000 Subject: [PATCH 008/217] Fix signed pushes documentation (#351) Now actually tested and working. All that's needed is the nonce in the gitea config. Reviewed-on: https://gitea.com/gitea/docs/pulls/351 Reviewed-by: Lunny Xiao --- docs/administration/customizing-gitea.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/administration/customizing-gitea.md b/docs/administration/customizing-gitea.md index 3439febd..100a570a 100644 --- a/docs/administration/customizing-gitea.md +++ b/docs/administration/customizing-gitea.md @@ -394,15 +394,16 @@ Starting with Gitea 1.20, you can customize the git configuration via the `git.c ### Enabling signed git pushes -To enable signed git pushes, set these two options: +[Signed pushes](https://git-scm.com/docs/git-push#Documentation/git-push.txt---signedtruefalseif-asked) allow clients to cryptographically sign the push operation itself (not just individual commits). To enable signed pushes, add the following to `app.ini`: ```ini [git.config] -receive.advertisePushOptions = true receive.certNonceSeed = ``` -`certNonceSeed` should be set to a random string and be kept secret. +`certNonceSeed` should be set to a random string and be kept secret. It is used to generate anti-replay nonces. Gitea already sets `receive.advertisePushOptions = true` by default, so no additional configuration is needed. Note that Gitea does not read `/etc/gitconfig`, so this option must be set via `app.ini` as shown above. + +On the client side, pushes can be signed via `git push --signed` or enabled permanently using `git config --global push.gpgSign if-asked`. ### Labels From 6cd29ccce002f25d78a322e74b89a49487cd69a4 Mon Sep 17 00:00:00 2001 From: crrdean <183013+crrdean@noreply.gitea.com> Date: Tue, 10 Mar 2026 20:00:25 +0000 Subject: [PATCH 009/217] Fixed pull_request action name (#359) synchronize should be synchronized Reviewed-on: https://gitea.com/gitea/docs/pulls/359 Reviewed-by: techknowlogick <9+techknowlogick@noreply.gitea.com> Co-authored-by: crrdean <183013+crrdean@noreply.gitea.com> Co-committed-by: crrdean <183013+crrdean@noreply.gitea.com> --- docs/usage/actions/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/actions/faq.md b/docs/usage/actions/faq.md index d6b59be7..b4975ceb 100644 --- a/docs/usage/actions/faq.md +++ b/docs/usage/actions/faq.md @@ -158,7 +158,7 @@ For events supported only by GitHub, see GitHub's [documentation](https://docs.g | push | not applicable | | issues | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `milestoned`, `demilestoned`, `labeled`, `unlabeled` | | issue_comment | `created`, `edited`, `deleted` | -| pull_request | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `synchronize`, `labeled`, `unlabeled` | +| pull_request | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `synchronized`, `labeled`, `unlabeled` | | pull_request_review | `submitted`, `edited` | | pull_request_review_comment | `created`, `edited` | | release | `published`, `edited` | From 29908bd89a31268ec6e803649cd563de80424294 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 10 Mar 2026 20:00:36 +0000 Subject: [PATCH 010/217] chore(deps): update pnpm to v10.32.0 (#358) Reviewed-on: https://gitea.com/gitea/docs/pulls/358 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f517df9e..94a2e12b 100644 --- a/package.json +++ b/package.json @@ -51,5 +51,5 @@ "engines": { "node": ">=18" }, - "packageManager": "pnpm@10.31.0" + "packageManager": "pnpm@10.32.0" } From 22834c60c8f571b45db0292c683aa98f8fb1d930 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 10 Mar 2026 20:00:46 +0000 Subject: [PATCH 011/217] chore(deps): update dependency @mui/material to v7.3.9 (#356) Reviewed-on: https://gitea.com/gitea/docs/pulls/356 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- pnpm-lock.yaml | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b076075..95bee366 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,7 +34,7 @@ importers: version: 3.1.1(@types/react@18.2.46)(react@19.2.4) '@mui/material': specifier: ^7.0.0 - version: 7.3.8(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + version: 7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) clsx: specifier: ^2.1.1 version: 2.1.1 @@ -1375,16 +1375,16 @@ packages: '@module-federation/webpack-bundler-runtime@0.18.0': resolution: {integrity: sha512-TEvErbF+YQ+6IFimhUYKK3a5wapD90d90sLsNpcu2kB3QGT7t4nIluE25duXuZDVUKLz86tEPrza/oaaCWTpvQ==} - '@mui/core-downloads-tracker@7.3.8': - resolution: {integrity: sha512-s9UHZo7QJVly7gNArEZkbbsimHqJZhElgBpXIJdehZ4OWXt+CCr0SBDgUCDJnQrqpd1dWK2dLq5rmO4mCBmI3w==} + '@mui/core-downloads-tracker@7.3.9': + resolution: {integrity: sha512-MOkOCTfbMJwLshlBCKJ59V2F/uaLYfmKnN76kksj6jlGUVdI25A9Hzs08m+zjBRdLv+sK7Rqdsefe8X7h/6PCw==} - '@mui/material@7.3.8': - resolution: {integrity: sha512-QKd1RhDXE1hf2sQDNayA9ic9jGkEgvZOf0tTkJxlBPG8ns8aS4rS8WwYURw2x5y3739p0HauUXX9WbH7UufFLw==} + '@mui/material@7.3.9': + resolution: {integrity: sha512-I8yO3t4T0y7bvDiR1qhIN6iBWZOTBfVOnmLlM7K6h3dx5YX2a7rnkuXzc2UkZaqhxY9NgTnEbdPlokR1RxCNRQ==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 '@emotion/styled': ^11.3.0 - '@mui/material-pigment-css': ^7.3.8 + '@mui/material-pigment-css': ^7.3.9 '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1398,8 +1398,8 @@ packages: '@types/react': optional: true - '@mui/private-theming@7.3.8': - resolution: {integrity: sha512-du5dlPZ9XL3xW2apHoGDXBI+QLtyVJGrXNCfcNYfP/ojkz1RQ0rRV6VG9Rkm1DqEFRG8mjjTL7zmE1Bvn1eR4A==} + '@mui/private-theming@7.3.9': + resolution: {integrity: sha512-ErIyRQvsiQEq7Yvcvfw9UDHngaqjMy9P3JDPnRAaKG5qhpl2C4tX/W1S4zJvpu+feihmZJStjIyvnv6KDbIrlw==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1408,8 +1408,8 @@ packages: '@types/react': optional: true - '@mui/styled-engine@7.3.8': - resolution: {integrity: sha512-JHAeXQzS0tJ+Fq3C6J4TVDsW+yKhO4uuxuiLaopNStJeQYBIUCXpKYyUCcgXym4AmhbznQnv9RlHywSH6b0FOg==} + '@mui/styled-engine@7.3.9': + resolution: {integrity: sha512-JqujWt5bX4okjUPGpVof/7pvgClqh7HvIbsIBIOOlCh2u3wG/Bwp4+E1bc1dXSwkrkp9WUAoNdI5HEC+5HKvMw==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.4.1 @@ -1421,8 +1421,8 @@ packages: '@emotion/styled': optional: true - '@mui/system@7.3.8': - resolution: {integrity: sha512-hoFRj4Zw2Km8DPWZp/nKG+ao5Jw5LSk2m/e4EGc6M3RRwXKEkMSG4TgtfVJg7dS2homRwtdXSMW+iRO0ZJ4+IA==} + '@mui/system@7.3.9': + resolution: {integrity: sha512-aL1q9am8XpRrSabv9qWf5RHhJICJql34wnrc1nz0MuOglPRYF/liN+c8VqZdTvUn9qg+ZjRVbKf4sJVFfIDtmg==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -1437,16 +1437,16 @@ packages: '@types/react': optional: true - '@mui/types@7.4.11': - resolution: {integrity: sha512-fZ2xO9D08IKOxO2oUBi1nnVKH6oJUD+64cnv4YAaFoC0E5+i1+S5AHbNqqvZlYYsbPEQ6qEVwuBqY3jl5W4G+Q==} + '@mui/types@7.4.12': + resolution: {integrity: sha512-iKNAF2u9PzSIj40CjvKJWxFXJo122jXVdrmdh0hMYd+FR+NuJMkr/L88XwWLCRiJ5P1j+uyac25+Kp6YC4hu6w==} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: '@types/react': optional: true - '@mui/utils@7.3.8': - resolution: {integrity: sha512-kZRcE2620CBGr+XI8YMmwPj6WIPwSF7uMJjvSfqd8zXVvlz0MCJbzRRUGNf8NgflCLthdji2DdS643TeyJ3+nA==} + '@mui/utils@7.3.9': + resolution: {integrity: sha512-U6SdZaGbfb65fqTsH3V5oJdFj9uYwyLE2WVuNvmbggTSDBb8QHrFsqY8BN3taK9t3yJ8/BPHD/kNvLNyjwM7Yw==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -8615,15 +8615,15 @@ snapshots: '@module-federation/runtime': 0.18.0 '@module-federation/sdk': 0.18.0 - '@mui/core-downloads-tracker@7.3.8': {} + '@mui/core-downloads-tracker@7.3.9': {} - '@mui/material@7.3.8(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@mui/material@7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: '@babel/runtime': 7.28.6 - '@mui/core-downloads-tracker': 7.3.8 - '@mui/system': 7.3.8(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) - '@mui/types': 7.4.11(@types/react@18.2.46) - '@mui/utils': 7.3.8(@types/react@18.2.46)(react@19.2.4) + '@mui/core-downloads-tracker': 7.3.9 + '@mui/system': 7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) + '@mui/types': 7.4.12(@types/react@18.2.46) + '@mui/utils': 7.3.9(@types/react@18.2.46)(react@19.2.4) '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.12(@types/react@18.2.46) clsx: 2.1.1 @@ -8638,16 +8638,16 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) '@types/react': 18.2.46 - '@mui/private-theming@7.3.8(@types/react@18.2.46)(react@19.2.4)': + '@mui/private-theming@7.3.9(@types/react@18.2.46)(react@19.2.4)': dependencies: '@babel/runtime': 7.28.6 - '@mui/utils': 7.3.8(@types/react@18.2.46)(react@19.2.4) + '@mui/utils': 7.3.9(@types/react@18.2.46)(react@19.2.4) prop-types: 15.8.1 react: 19.2.4 optionalDependencies: '@types/react': 18.2.46 - '@mui/styled-engine@7.3.8(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4)': + '@mui/styled-engine@7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4)': dependencies: '@babel/runtime': 7.28.6 '@emotion/cache': 11.14.0 @@ -8660,13 +8660,13 @@ snapshots: '@emotion/react': 11.14.0(@types/react@18.2.46)(react@19.2.4) '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) - '@mui/system@7.3.8(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4)': + '@mui/system@7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4)': dependencies: '@babel/runtime': 7.28.6 - '@mui/private-theming': 7.3.8(@types/react@18.2.46)(react@19.2.4) - '@mui/styled-engine': 7.3.8(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4) - '@mui/types': 7.4.11(@types/react@18.2.46) - '@mui/utils': 7.3.8(@types/react@18.2.46)(react@19.2.4) + '@mui/private-theming': 7.3.9(@types/react@18.2.46)(react@19.2.4) + '@mui/styled-engine': 7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4) + '@mui/types': 7.4.12(@types/react@18.2.46) + '@mui/utils': 7.3.9(@types/react@18.2.46)(react@19.2.4) clsx: 2.1.1 csstype: 3.2.3 prop-types: 15.8.1 @@ -8676,16 +8676,16 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) '@types/react': 18.2.46 - '@mui/types@7.4.11(@types/react@18.2.46)': + '@mui/types@7.4.12(@types/react@18.2.46)': dependencies: '@babel/runtime': 7.28.6 optionalDependencies: '@types/react': 18.2.46 - '@mui/utils@7.3.8(@types/react@18.2.46)(react@19.2.4)': + '@mui/utils@7.3.9(@types/react@18.2.46)(react@19.2.4)': dependencies: '@babel/runtime': 7.28.6 - '@mui/types': 7.4.11(@types/react@18.2.46) + '@mui/types': 7.4.12(@types/react@18.2.46) '@types/prop-types': 15.7.15 clsx: 2.1.1 prop-types: 15.8.1 From 243178ce699771fa3e0886905b112822ac619cea Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 12 Mar 2026 14:52:51 +0000 Subject: [PATCH 012/217] chore(deps): update pnpm to v10.32.1 (#363) Reviewed-on: https://gitea.com/gitea/docs/pulls/363 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 94a2e12b..4d509188 100644 --- a/package.json +++ b/package.json @@ -51,5 +51,5 @@ "engines": { "node": ">=18" }, - "packageManager": "pnpm@10.32.0" + "packageManager": "pnpm@10.32.1" } From 51d28e66ebe9e2158004415122201371a8ae5948 Mon Sep 17 00:00:00 2001 From: acrewgame <183300+acrewgame@noreply.gitea.com> Date: Fri, 13 Mar 2026 16:43:56 +0000 Subject: [PATCH 013/217] Relaxed requirements for mirroring to GitHub (#362) I just tried mirroring a repo from the Gitea demo instance to a GitHub repo with a completely different name and commit history, and it succeeded. --------- Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/gitea/docs/pulls/362 Reviewed-by: Lunny Xiao Co-authored-by: acrewgame <183300+acrewgame@noreply.gitea.com> Co-committed-by: acrewgame <183300+acrewgame@noreply.gitea.com> --- .../version-1.25/usage/repository/repo-mirror.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/versioned_docs/version-1.25/usage/repository/repo-mirror.md b/versioned_docs/version-1.25/usage/repository/repo-mirror.md index 9902fa54..1af9bfe7 100644 --- a/versioned_docs/version-1.25/usage/repository/repo-mirror.md +++ b/versioned_docs/version-1.25/usage/repository/repo-mirror.md @@ -54,11 +54,10 @@ The repository now gets mirrored periodically to the remote repository. You can To set up a mirror from Gitea to GitHub, you need to follow these steps: 1. Create a [GitHub personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the *public_repo* box checked. Also check the **workflow** checkbox in case your repo uses GitHub Actions for continuous integration. -2. Create a repository with that name on GitHub. Unlike Gitea, GitHub does not support creating repositories by pushing to the remote. You can also use an existing remote repo if it has the same commit history as your Gitea repo. -3. In the settings of your Gitea repo, fill in the **Git Remote Repository URL**: `https://github.com//.git`. -4. Fill in the **Authorization** fields with your GitHub username and the personal access token as **Password**. -5. (Optional, available on Gitea 1.18+) Select `Sync when new commits are pushed` so that the mirror will be updated as well as soon as there are changes. You can also disable the periodic sync if you like. -6. Select **Add Push Mirror** to save the configuration. +2. In the settings of your Gitea repo, fill in the **Git Remote Repository URL**: `https://github.com//.git`. +3. Fill in the **Authorization** fields with your GitHub username and the personal access token as **Password**. +4. (Optional, available on Gitea 1.18+) Select `Sync when new commits are pushed` so that the mirror will be updated as well as soon as there are changes. You can also disable the periodic sync if you like. +5. Select **Add Push Mirror** to save the configuration. The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button. From e7ddef6ed3f07640f6c7045687af6d6baa92ddf7 Mon Sep 17 00:00:00 2001 From: brlin Date: Fri, 13 Mar 2026 22:10:47 +0000 Subject: [PATCH 014/217] docs(usage/packages/storage): Fix grammar in the Deduplication section (#360) Refer to the content diff for the change. Reviewed-on: https://gitea.com/gitea/docs/pulls/360 Reviewed-by: Lunny Xiao Co-authored-by: brlin Co-committed-by: brlin --- versioned_docs/version-1.25/usage/packages/storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioned_docs/version-1.25/usage/packages/storage.md b/versioned_docs/version-1.25/usage/packages/storage.md index 508cdb13..d015835e 100644 --- a/versioned_docs/version-1.25/usage/packages/storage.md +++ b/versioned_docs/version-1.25/usage/packages/storage.md @@ -16,7 +16,7 @@ This ensures no space is wasted for duplicated files. If two packages are uploaded with identical files, both packages will display the same size but on the filesystem they require only half of the size. Whenever a package gets deleted, only the references to the underlying blobs are removed. -The blobs get not removed at this moment, so they still require space on the filesystem. +The blobs are not removed at this moment, so they still require space on the filesystem. When a new package gets uploaded the existing blobs may get referenced again. These unreferenced blobs get deleted by a [clean up job](../../administration/config-cheat-sheet.md#cron---cleanup-expired-packages-croncleanup_packages). From 162127170beaab001bbe8ff0f385e811f797a307 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 16 Mar 2026 17:06:04 -0700 Subject: [PATCH 015/217] upgrade to 1.25.5 --- docusaurus.config.js | 8 ++++---- static/swagger-25.json | 2 +- update_api_docs.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index cccb40cc..efba8cef 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -78,11 +78,11 @@ const globalVariables = { goVersion: "1.25", minGoVersion: "1.25", minNodeVersion: "22", - version: "1.25.4", + version: "1.25.5", sourceVersion: "v1.25.0", sourceBranch: "release/v1.25", - dockerVersion: "1.25.4", - displayVersion: "1.25.4", + dockerVersion: "1.25.5", + displayVersion: "1.25.5", }, "1.24": { goVersion: "1.24", @@ -396,7 +396,7 @@ const config = { position: "right", items: [ { to: "/api/next/", label: "1.26-dev" }, - { to: "/api/1.25/", label: "1.25.4" }, + { to: "/api/1.25/", label: "1.25.5" }, { to: "/api/1.24/", label: "1.24.7" }, { to: "/api/1.23/", label: "1.23.8" }, { to: "/api/1.22/", label: "1.22.6" }, diff --git a/static/swagger-25.json b/static/swagger-25.json index 0679c81a..491a21d5 100644 --- a/static/swagger-25.json +++ b/static/swagger-25.json @@ -19,7 +19,7 @@ "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, - "version": "1.25.4" + "version": "1.25.5" }, "basePath": "https://gitea.com/api/v1", "paths": { diff --git a/update_api_docs.sh b/update_api_docs.sh index 44c8e63e..83a700ab 100755 --- a/update_api_docs.sh +++ b/update_api_docs.sh @@ -25,7 +25,7 @@ inplace_sed 's|"version": "{{.SwaggerAppVer}}"|"version": "dev"|' v1_json.tmpl inplace_sed 's|"basePath": "{{.SwaggerAppSubUrl}}/api/v1"|"basePath": "https://gitea.com/api/v1"|' v1_json.tmpl mv v1_json.tmpl static/swagger-latest.json -for ver in '1.25.4' '1.24.7' '1.23.8' '1.22.6'; do +for ver in '1.25.5' '1.24.7' '1.23.8' '1.22.6'; do curl --silent --output v1_json.tmpl https://raw.githubusercontent.com/go-gitea/gitea/refs/tags/v${ver}/templates/swagger/v1_json.tmpl inplace_sed "s|\"version\": \"{{.SwaggerAppVer}}\"|\"version\": \"${ver}\"|" v1_json.tmpl inplace_sed 's|"basePath": "{{.SwaggerAppSubUrl}}/api/v1"|"basePath": "https://gitea.com/api/v1"|' v1_json.tmpl From eb8ade10c72f697dcc05628b9bd8b1a185f5a4c5 Mon Sep 17 00:00:00 2001 From: silverwind <2021+silverwind@noreply.gitea.com> Date: Tue, 17 Mar 2026 18:19:18 +0000 Subject: [PATCH 016/217] Update environment variable docs, remove environment-to-ini references (#355) The standalone `environment-to-ini` tool was removed in https://github.com/go-gitea/gitea/pull/35735 and its functionality is now built into the Gitea binary. This PR: - Removes outdated links to the removed `contrib/environment-to-ini` directory - Updates the "Use environment variables to setup Gitea" section in the config cheat sheet - Adds examples showing how env vars map to `app.ini` settings and the `__FILE` suffix for secrets *This PR was authored by Claude.* Reviewed-on: https://gitea.com/gitea/docs/pulls/355 Reviewed-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com> Reviewed-by: TheFox0x7 <95654+thefox0x7@noreply.gitea.com> --- docs/administration/config-cheat-sheet.md | 30 +++++++++++++++++++++-- docs/installation/with-docker-rootless.md | 3 +-- docs/installation/with-docker.md | 3 +-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 35097674..23db55dd 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -34,8 +34,34 @@ A full restart is required for Gitea configuration changes to take effect. ## Use environment variables to setup Gitea -There is [environment-to-ini](https://github.com/go-gitea/gitea/blob/main/docker/root/usr/local/bin/environment-to-ini) to help to -generate Gitea's `app.ini` from environment variables. +Gitea supports setting `app.ini` values via environment variables of the form `GITEA__
__`. These require running `gitea config edit-ini --in-place --apply-env` before starting Gitea to write them into `app.ini`. The official Docker images do this automatically on container startup. + +For example, to configure the database connection via environment variables: + +``` +GITEA__database__DB_TYPE=postgres +GITEA__database__HOST=127.0.0.1:5432 +GITEA__database__NAME=gitea +GITEA__database__USER=gitea +GITEA__database__PASSWD=secret +``` + +This is equivalent to the following `app.ini` configuration: + +```ini +[database] +DB_TYPE = postgres +HOST = 127.0.0.1:5432 +NAME = gitea +USER = gitea +PASSWD = secret +``` + +You can also load values from files by appending `__FILE` to the variable name. This is useful for Docker secrets: + +``` +GITEA__database__PASSWD__FILE=/run/secrets/db_password +``` ## Default Internal Variables (non-`app.ini` configuration) diff --git a/docs/installation/with-docker-rootless.md b/docs/installation/with-docker-rootless.md index 3aa67178..9b0621e8 100644 --- a/docs/installation/with-docker-rootless.md +++ b/docs/installation/with-docker-rootless.md @@ -288,9 +288,8 @@ docker-compose up -d ## Managing Deployments With Environment Variables In addition to the environment variables above, any settings in `app.ini` can be set -or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. +or overridden with an environment variable of the form: `GITEA__
__`. These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. -Full information [here](https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini). These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable a smtp mail server if the required env variables diff --git a/docs/installation/with-docker.md b/docs/installation/with-docker.md index db312425..b77921db 100644 --- a/docs/installation/with-docker.md +++ b/docs/installation/with-docker.md @@ -277,9 +277,8 @@ docker compose up -d ## Managing Deployments With Environment Variables In addition to the environment variables above, any settings in `app.ini` can be set -or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. +or overridden with an environment variable of the form: `GITEA__
__`. These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. -Full information [here](https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini). These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable an smtp mail server if the required env variables From 47ef41da3b3c55d2781d3eef5097c1a5cea30057 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 23 Mar 2026 19:12:49 +0000 Subject: [PATCH 017/217] Add `DEFAULT_DELETE_BRANCH_AFTER_MERGE` to config cheat sheet (#367) Add documentation for the new `[repository.pull-request]` `DEFAULT_DELETE_BRANCH_AFTER_MERGE` config option added in https://github.com/go-gitea/gitea/pull/36917. *This comment was written by Claude.* Reviewed-on: https://gitea.com/gitea/docs/pulls/367 Reviewed-by: TheFox0x7 <95654+thefox0x7@noreply.gitea.com> Co-authored-by: silverwind Co-committed-by: silverwind --- docs/administration/config-cheat-sheet.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 23db55dd..dbfbd0f2 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -169,6 +169,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build - `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author. - `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`: **false**: PR patches are tested using a three-way merge method to discover if there are conflicts. If this setting is set to **true**, conflicting patches will be retested using `git apply` - This was the previous behaviour in 1.18 (and earlier) but is somewhat inefficient. Please report if you find that this setting is required. - `RETARGET_CHILDREN_ON_MERGE`: **true**: Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo. +- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: Set the default value for "Delete pull request branch after merge by default" for new repositories. ### Repository - Issue (`repository.issue`) From 74c1904736a30af9ea53afa51871946ec33b34af Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 24 Mar 2026 11:11:06 +0000 Subject: [PATCH 018/217] chore(deps): update pnpm/action-setup action to v5 (#365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [pnpm/action-setup](https://github.com/pnpm/action-setup) | action | major | `v4` → `v5` | --- ### Release Notes
pnpm/action-setup (pnpm/action-setup) ### [`v5`](https://github.com/pnpm/action-setup/compare/v4...v5) [Compare Source](https://github.com/pnpm/action-setup/compare/v4...v5)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). --------- Co-authored-by: silverwind <2021+silverwind@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/docs/pulls/365 Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com> Reviewed-by: Nicolas <173651+bircni@noreply.gitea.com> Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- .gitea/workflows/build-and-publish.yaml | 2 +- .gitea/workflows/test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index 1814fbb9..854316af 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - - uses: pnpm/action-setup@v4 + - uses: pnpm/action-setup@v5 - uses: actions/setup-node@v6 with: node-version: 24 diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index baf25dbf..627e44e1 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: pnpm/action-setup@v4 + - uses: pnpm/action-setup@v5 - uses: actions/setup-node@v6 with: node-version: 24 From 0c17ed264dcde85b2837aee9c96255f867087884 Mon Sep 17 00:00:00 2001 From: Excellencedev Date: Tue, 24 Mar 2026 11:11:25 +0000 Subject: [PATCH 019/217] Add docs for configurable permissions for Actions automatic tokens (#366) Docs for https://github.com/go-gitea/gitea/pull/36173 Reviewed-on: https://gitea.com/gitea/docs/pulls/366 Reviewed-by: Lunny Xiao Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com> Reviewed-by: Nicolas <173651+bircni@noreply.gitea.com> Co-authored-by: Excellencedev Co-committed-by: Excellencedev --- docs/usage/actions/comparison.md | 15 ++-- docs/usage/actions/token-permissions.md | 115 ++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 6 deletions(-) create mode 100644 docs/usage/actions/token-permissions.md diff --git a/docs/usage/actions/comparison.md b/docs/usage/actions/comparison.md index 59f27faf..d7d1d73a 100644 --- a/docs/usage/actions/comparison.md +++ b/docs/usage/actions/comparison.md @@ -33,12 +33,6 @@ See [Using concurrency](https://docs.github.com/en/actions/using-jobs/using-conc It's ignored by Gitea Actions now. -### `permissions` and `jobs..permissions` - -See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions). - -It's ignored by Gitea Actions now. - ### `jobs..timeout-minutes` See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes). @@ -108,6 +102,15 @@ This means that newly-triggered workflows will pre-empt runs already in progress See [PR #25716](https://github.com/go-gitea/gitea/pull/25716) for additional details. +### Job token permissions (`permissions`) + +Gitea supports `permissions` and `jobs..permissions` to control the default `GITEA_TOKEN` permissions. + +The effective permissions are clamped by the repository/owner settings and are further restricted for fork pull requests and cross-repository access. +GitHub-only scopes such as `statuses`, `checks`, `deployments`, `id-token`, `security-events`, and `pages` are not supported, while Gitea-specific scopes such as `code`, `releases`, `wiki`, and `projects` are available. + +See [Actions job token permissions](token-permissions.md). + ### Downloading actions Previously (Pre 1.21.0), `[actions].DEFAULT_ACTIONS_URL` defaulted to `https://gitea.com`. diff --git a/docs/usage/actions/token-permissions.md b/docs/usage/actions/token-permissions.md new file mode 100644 index 00000000..ccb0029e --- /dev/null +++ b/docs/usage/actions/token-permissions.md @@ -0,0 +1,115 @@ +--- +date: "2026-03-19T00:00:00+01:00" +slug: "token-permissions" +sidebar_position: 30 +--- + +# Actions job token permissions (`GITEA_TOKEN`) + +Every Actions job receives a built-in token (`GITEA_TOKEN`) which can be used to access Gitea (Git over HTTP(S), API requests, etc.). +This page documents how Gitea decides what the token is allowed to do. + +In workflows, it is available as `${{ secrets.GITEA_TOKEN }}`. These settings and `permissions:` only affect `GITEA_TOKEN` (not other secrets like personal access tokens). For API calls, see [API authentication](../../development/api-usage.md#authentication). + +## Where permissions come from + +Gitea determines the job token permissions in this order: + +1. Job-level `permissions:` (`jobs..permissions`) +2. Workflow-level `permissions:` (top-level) +3. Default permissions from settings (owner or repository) + +The result is then **clamped** by the configured maximum token permissions (see below). + +## Supported workflow syntax + +Gitea supports the GitHub Actions-compatible `permissions:` keyword. + +### Scalar values + +```yaml +permissions: read-all # or: write-all +``` + +### Scoped mapping + +```yaml +permissions: + contents: read + issues: write + pull-requests: none +``` + +Valid access mode values for each scope are `read`, `write`, and `none`. + +### Supported scopes + +- `contents` (applies to `code` and `releases`) +- `code` +- `releases` +- `issues` +- `pull-requests` +- `actions` +- `wiki` +- `projects` +- `packages` (if supported by the target feature) + +If you specify both `contents` and a more granular scope (like `code` or `releases`), the granular scope wins for that unit. + +### Compatibility notes + +Gitea supports a subset of GitHub Actions permission scopes. +GitHub-only scopes such as `statuses`, `checks`, `deployments`, `id-token`, `security-events`, and `pages` are not currently supported by Gitea Actions. + +Gitea also exposes repository-unit scopes that do not exist as separate scopes in GitHub Actions: + +- `code` +- `releases` +- `wiki` +- `projects` + +## Default permission mode + +If neither the workflow nor the job defines `permissions:`, Gitea uses the configured default mode: + +- **Permissive**: read and write permissions for most units in the job's repository (backwards-compatible default). +- **Restricted**: read-only permissions for `code`, `releases`, and `packages` in the job's repository, and no access to other units by default. + +## Maximum token permissions (clamping) + +You can configure a maximum permission per repository unit. +The job's effective permissions are computed as: + +`effective = min(requested, maximum)` + +This means workflows can reduce permissions for a job, but cannot exceed your configured maximum. +If you don't configure a maximum, the maximum defaults to `write` for all scopes. + +## Where to configure + +You can configure defaults and maximums at: + +- **User / Organization**: `Settings` → `Actions` → `General` +- **Repository**: `Settings` → `Actions` → `General` + - For repositories in an organization, the repository can follow the owner-level configuration, or opt out with **Override owner-level configuration**. + +Note: Repository-level token permission settings are only shown once **Repository Actions** are enabled. + +## Fork pull requests + +For security reasons, workflows triggered by pull requests from forks are always restricted to read-only permissions for repository contents, regardless of workflow `permissions:` or settings. + +## Cross-repository access + +By default, `GITEA_TOKEN` only has access to: + +- The job's repository (according to the computed permissions) +- Public repositories (read-only) + +Access to other private repositories is denied by default. +A user or organization can allow read-only access to selected private repositories via **Settings → Actions → General → Cross-Repository Access**. + +Private repositories can also allow selected collaborative owners via **Settings → Actions → General**. +This allows the private repositories of those owners to read the current private repository for Actions use, such as private actions and reusable workflows. + +Fork pull request workflows never gain cross-repository access to private repositories, even if those repositories are listed. From 9a00f8ea0cf9ed56b3335d90753bfe11b6697cde Mon Sep 17 00:00:00 2001 From: wxiaoguang <29147+wxiaoguang@noreply.gitea.com> Date: Tue, 24 Mar 2026 15:44:11 +0000 Subject: [PATCH 020/217] Sync docs/administration/config-cheat-sheet.md (#368) Reviewed-on: https://gitea.com/gitea/docs/pulls/368 Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com> Co-authored-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com> Co-committed-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com> --- docs/administration/config-cheat-sheet.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index dbfbd0f2..5803b692 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -167,7 +167,6 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build - `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: In default merge messages only include approvers who are officially allowed to review. - `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request. - `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author. -- `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`: **false**: PR patches are tested using a three-way merge method to discover if there are conflicts. If this setting is set to **true**, conflicting patches will be retested using `git apply` - This was the previous behaviour in 1.18 (and earlier) but is somewhat inefficient. Please report if you find that this setting is required. - `RETARGET_CHILDREN_ON_MERGE`: **true**: Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo. - `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: Set the default value for "Delete pull request branch after merge by default" for new repositories. @@ -338,8 +337,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `ROOT_URL`: **`{PROTOCOL}://{DOMAIN}:{HTTP_PORT}/`**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. behind a reverse proxy). -- `PUBLIC_URL_DETECTION`: **`legacy`**: Controls how to generate the public URL. - Although it defaults to "legacy" (to avoid breaking existing users), most instances should use the "auto" behavior, +- `PUBLIC_URL_DETECTION`: **`auto`**: Controls how to generate the public URL. Most instances should use the "auto" behavior, especially when the Gitea instance needs to be accessed in a container network. - "legacy": generate the public URL by "Host" header if "X-Forwarded-Proto" header exists, otherwise use "ROOT_URL". - "auto": always use "Host" header, and also use "X-Forwarded-Proto" header if it exists. If no "Host" header, use "ROOT_URL". From c39f423da6e78e1ff3d8e731dea3470d97bdd209 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 26 Mar 2026 21:37:00 +0000 Subject: [PATCH 021/217] chore(deps): update pnpm to v10.33.0 (#370) Reviewed-on: https://gitea.com/gitea/docs/pulls/370 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4d509188..7f0b3cda 100644 --- a/package.json +++ b/package.json @@ -51,5 +51,5 @@ "engines": { "node": ">=18" }, - "packageManager": "pnpm@10.32.1" + "packageManager": "pnpm@10.33.0" } From 8660c68d8c9f3aa4bc086e9dfad4c68e0ade98a4 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Fri, 27 Mar 2026 23:38:53 +0000 Subject: [PATCH 022/217] add actions cron tasks (#371) fixes: https://github.com/go-gitea/gitea/issues/37009 for docs Reviewed-on: https://gitea.com/gitea/docs/pulls/371 Reviewed-by: Nicolas <173651+bircni@noreply.gitea.com> Co-authored-by: TheFox0x7 Co-committed-by: TheFox0x7 --- docs/administration/config-cheat-sheet.md | 53 ++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 5803b692..79438ed1 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -1125,6 +1125,13 @@ Synchronize external user data (only LDAP user synchronization is supported) - `SCHEDULE`: **@midnight**: Cron syntax for scheduling deleted branches cleanup. - `OLDER_THAN`: **24h**: Branches deleted OLDER_THAN ago will be cleaned up. +#### Cron - Synchronize repository licenses (`cron.sync_repo_licenses`) + +- `ENABLED`: **false**: Enable deleted branches cleanup. +- `RUN_AT_START`: **false**: Run job at start time (if ENABLED). +- `NOTICE_ON_SUCCESS`: **false**: Set to true to log a success message. +- `SCHEDULE`: **@annually*: Cron syntax for scheduling synchronization of repository licenses + ### Extended cron tasks #### Cron - Delete all repository archives (`cron.delete_repo_archives`) @@ -1148,7 +1155,14 @@ Synchronize external user data (only LDAP user synchronization is supported) - `ENABLED`: **false**: Enable service. - `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED). - `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices. -- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. +- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling synchronization of gitea ssh keys, e.g. `@every 1h`. + +#### Cron - Update the '.ssh/authorized_principals' file (`cron.resync_all_sshprincipals`) + +- `ENABLED`: **false**: Enable service. +- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED). +- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices. +- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling update of authorized_principals, e.g. `@every 1h`. #### Cron - Resynchronize pre-receive, update and post-receive hooks of all repositories (`cron.resync_all_hooks`) @@ -1212,6 +1226,43 @@ Synchronize external user data (only LDAP user synchronization is supported) - `NUMBER_TO_CHECK_PER_REPO`: **100**: Minimum number of stale LFSMetaObjects to check per repo. Set to `0` to always check all. - `PROPORTION_TO_CHECK_PER_REPO`: **0.6**: Check at least this proportion of LFSMetaObjects per repo. (This may cause all stale LFSMetaObjects to be checked.) +### Actions cron tasks + +#### Cron - Rebuild issue index (`cron.rebuild_issue_indexer`) + +- `ENABLED`: **true**: Enable service. +- `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED). +- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. +- `SCHEDULE`: **@annually**: Cron syntax to set how often to rebuild + +#### Cron - Stop running tasks which haven't been updated for a long time (`cron.stop_zombie_tasks`) + +- `ENABLED`: **true**: Enable service. +- `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED). +- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. +- `SCHEDULE`: **@every 5m**: Cron syntax to set how often tasks to run the check + +#### Cron - Stop running tasks which have running status and continuous updates but don't end for a long time (`cron.stop_endless_tasks`) + +- `ENABLED`: **true**: Enable service. +- `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED). +- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. +- `SCHEDULE`: **@every 30m**: Cron syntax to set how often to run the check. + +#### Cron - Cancel jobs which haven't been picked up for a long time (`cron.cancel_abandoned_jobs`) + +- `ENABLED`: **true**: Enable service. +- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED). +- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. +- `SCHEDULE`: **@every 6h**: Cron syntax to set how often to run the check. + +#### Cron - Start cron based actions (`cron.start_schedule_tasks`) + +- `ENABLED`: **true**: Enable service. +- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED). +- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. +- `SCHEDULE`: **@every 1m**: Cron syntax to set how often to schedule tasks + ## Git (`git`) - `PATH`: **""**: The path of Git executable. If empty, Gitea searches through the PATH environment. From 25dce1df626938e9d3b6b8f80541bb0451c9959e Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 28 Mar 2026 09:27:06 +0000 Subject: [PATCH 023/217] Add pre-defined variables reference to Actions docs (#369) Add comprehensive reference tables for pre-defined variables available in Gitea Actions workflows, derived from the Gitea and act_runner source code. ## Context variables (`${{ gitea. }}`) All context variables with their `github.*` aliases and descriptions, sourced from `services/actions/context.go`. ## Environment variables - **Standard**: `CI`, `GITEA_ACTIONS`, `GITEA_ACTIONS_RUNNER_VERSION`, `GITHUB_*`, and the 5 `GITEA_*` aliases for workflow file commands (`GITEA_ENV`, `GITEA_OUTPUT`, `GITEA_PATH`, `GITEA_STATE`, `GITEA_STEP_SUMMARY`) - **Runner**: `RUNNER_OS`, `RUNNER_ARCH`, `RUNNER_TEMP`, `RUNNER_TOOL_CACHE` - **Internal**: `ACTIONS_CACHE_URL`, `ACTIONS_RUNTIME_*`, etc. Closes https://gitea.com/gitea/docs/issues/350 Reviewed-on: https://gitea.com/gitea/docs/pulls/369 Reviewed-by: Lunny Xiao Co-authored-by: silverwind Co-committed-by: silverwind --- docs/usage/actions/variables.md | 114 +++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 3 deletions(-) diff --git a/docs/usage/actions/variables.md b/docs/usage/actions/variables.md index c389f570..677727e0 100644 --- a/docs/usage/actions/variables.md +++ b/docs/usage/actions/variables.md @@ -6,11 +6,13 @@ sidebar_position: 25 # Variables +## User-defined variables + You can create configuration variables on the user, organization and repository level. The level of the variable depends on where you created it. When creating a variable, the key will be converted to uppercase. You need use uppercase on the yaml file. -## Naming conventions +### Naming conventions The following rules apply to variable names: @@ -21,12 +23,118 @@ The following rules apply to variable names: - Variable names must be unique at the level they are created at. - Variable names must not start with `CI`. -## Using variable +### Using variables After creating configuration variables, they will be automatically filled in the `vars` context. They can be accessed through expressions like `${{ vars.VARIABLE_NAME }}` in the workflow. -## Precedence +### Precedence If a variable with the same name exists at multiple levels, the variable at the lowest level takes precedence: A repository variable will always be chosen over an organization/user variable. + +## Pre-defined context variables + +These variables are available in workflow expressions via `${{ gitea. }}`. For compatibility, `${{ github. }}` works as an alias. + +| Name | Description | Example | +|---|---|---| +| `gitea.action`
`github.action` | The name of the action currently running, or the `id` of a step. | `__run` | +| `gitea.action_path`
`github.action_path` | The path where an action is located. Only supported in composite actions. | `/home/runner/work/_actions/actions/checkout/v4` | +| `gitea.action_ref`
`github.action_ref` | The ref of the action being executed. | `v4` | +| `gitea.action_repository`
`github.action_repository` | The owner and repository name of the action. | `actions/checkout` | +| `gitea.action_status`
`github.action_status` | The current result of a composite action. | `success` | +| `gitea.actor`
`github.actor` | The username of the user that triggered the initial workflow run. | `silverwind` | +| `gitea.api_url`
`github.api_url` | The URL of the REST API. | `https://gitea.com/api/v1` | +| `gitea.base_ref`
`github.base_ref` | The target branch of a pull request. Only set for `pull_request` and `pull_request_target` events. | `main` | +| `gitea.env`
`github.env` | Path on the runner to the file that sets environment variables from workflow commands. Unique to each step. | `/home/runner/work/_temp/_runner_file_commands/set_env_***` | +| `gitea.event`
`github.event` | The full event webhook payload as an object. | `{...}` | +| `gitea.event_name`
`github.event_name` | The name of the event that triggered the workflow run. | `push` | +| `gitea.event_path`
`github.event_path` | Path on the runner to the file containing the full event webhook payload. | `/home/runner/work/_temp/_github_workflow/event.json` | +| `gitea.head_ref`
`github.head_ref` | The source branch of a pull request. Only set for `pull_request` and `pull_request_target` events. | `feature-branch` | +| `gitea.job`
`github.job` | The `job_id` of the current job. | `build` | +| `gitea.ref`
`github.ref` | The fully-formed ref that triggered the workflow. | `refs/heads/main` | +| `gitea.ref_name`
`github.ref_name` | The short ref name. | `main` | +| `gitea.ref_protected`
`github.ref_protected` | `true` if branch protections are configured for the ref that triggered the workflow run. | `true` | +| `gitea.ref_type`
`github.ref_type` | The type of ref: `branch` or `tag`. | `branch` | +| `gitea.path`
`github.path` | Path on the runner to the file that sets system `PATH` variables from workflow commands. Unique to each step. | `/home/runner/work/_temp/_runner_file_commands/add_path_***` | +| `gitea.repository`
`github.repository` | The owner and repository name. | `gitea/docs` | +| `gitea.repository_owner`
`github.repository_owner` | The repository owner's username. | `gitea` | +| `gitea.repositoryUrl`
`github.repositoryUrl` | The HTML URL to the repository. | `https://gitea.com/gitea/docs` | +| `gitea.retention_days`
`github.retention_days` | The number of days that workflow run logs and artifacts are kept. | `90` | +| `gitea.run_id`
`github.run_id` | A unique number for each workflow run within a repository. Does not change on re-run. | `1234` | +| `gitea.run_number`
`github.run_number` | A unique number for each run of a particular workflow. Starts at 1 and increments with each new run. | `42` | +| `gitea.run_attempt`
`github.run_attempt` | A unique number for each re-run attempt. Starts at 1 and increments with each re-run. | `1` | +| `gitea.secret_source`
`github.secret_source` | The source of a secret used in a workflow. Always `Actions` in Gitea. | `Actions` | +| `gitea.server_url`
`github.server_url` | The URL of the Gitea instance. | `https://gitea.com` | +| `gitea.sha`
`github.sha` | The commit SHA that triggered the workflow. | `a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2` | +| `gitea.token`
`github.token` | A token to authenticate on behalf of the Gitea App installed on the repository. See [Token permissions](token-permissions.md). | `ghs_***` | +| `gitea.triggering_actor`
`github.triggering_actor` | The username of the user that initiated the workflow run. May differ from `actor` on re-runs. | `silverwind` | +| `gitea.workflow`
`github.workflow` | The name of the workflow. If unnamed, the full path of the workflow file. | `CI` | +| `gitea.workspace`
`github.workspace` | The default working directory on the runner and the default location of your repository when using the `checkout` action. | `/workspace/gitea/docs` | +| `gitea.gitea_default_actions_url` | The default URL for downloading actions. Gitea-specific. | `https://github.com` | + +## Pre-defined environment variables + +These environment variables are set automatically in every workflow run and can be accessed directly (e.g. `$CI` in shell scripts). + +### Standard environment variables + +| Name | Description | Example | +|---|---|---| +| `CI` | Always set to `true`. | `true` | +| `GITEA_ACTIONS` | Always set to `true`. Useful to distinguish Gitea Actions from other CI systems. | `true` | +| `GITEA_ACTIONS_RUNNER_VERSION` | The version of the act runner executing the workflow. | `0.2.11` | +| `GITEA_ENV`
`GITHUB_ENV` | Path to the file that sets environment variables for subsequent steps. | `/home/runner/work/_temp/_runner_file_commands/set_env_***` | +| `GITEA_OUTPUT`
`GITHUB_OUTPUT` | Path to the file that sets step output parameters. | `/home/runner/work/_temp/_runner_file_commands/set_output_***` | +| `GITEA_PATH`
`GITHUB_PATH` | Path to the file that adds system `PATH` entries for subsequent steps. | `/home/runner/work/_temp/_runner_file_commands/add_path_***` | +| `GITEA_STATE`
`GITHUB_STATE` | Path to the file that sets step state variables. | `/home/runner/work/_temp/_runner_file_commands/save_state_***` | +| `GITEA_STEP_SUMMARY`
`GITHUB_STEP_SUMMARY` | Path to the file for writing job summaries. | `/home/runner/work/_temp/_runner_file_commands/step_summary_***` | +| `GITHUB_ACTIONS` | Always set to `true`. | `true` | +| `GITHUB_ACTION` | The name of the action currently running, or the step `id`. | `__run` | +| `GITHUB_ACTION_PATH` | The path where the action is located. | `/home/runner/work/_actions/actions/checkout/v4` | +| `GITHUB_ACTION_REF` | The ref of the action being executed. | `v4` | +| `GITHUB_ACTION_REPOSITORY` | The owner and repository of the action. | `actions/checkout` | +| `GITHUB_ACTOR` | The username of the user that triggered the workflow. | `silverwind` | +| `GITHUB_API_URL` | The URL of the REST API. | `https://gitea.com/api/v1` | +| `GITHUB_BASE_REF` | The target branch of a pull request. | `main` | +| `GITHUB_EVENT_NAME` | The name of the event that triggered the workflow. | `push` | +| `GITHUB_EVENT_PATH` | Path to the file containing the event webhook payload. | `/home/runner/work/_temp/_github_workflow/event.json` | +| `GITHUB_GRAPHQL_URL` | Empty in Gitea (GraphQL is not supported). | _(empty)_ | +| `GITHUB_HEAD_REF` | The source branch of a pull request. | `feature-branch` | +| `GITHUB_JOB` | The `job_id` of the current job. | `build` | +| `GITHUB_REF` | The fully-formed ref that triggered the workflow. | `refs/heads/main` | +| `GITHUB_REF_NAME` | The short ref name. | `main` | +| `GITHUB_REF_TYPE` | The type of ref: `branch` or `tag`. | `branch` | +| `GITHUB_REPOSITORY` | The owner and repository name. | `gitea/docs` | +| `GITHUB_REPOSITORY_OWNER` | The repository owner's username. | `gitea` | +| `GITHUB_RETENTION_DAYS` | The number of days that workflow run logs and artifacts are kept. | `90` | +| `GITHUB_RUN_ATTEMPT` | The attempt number of the workflow run. | `1` | +| `GITHUB_RUN_ID` | A unique number for each workflow run. | `1234` | +| `GITHUB_RUN_NUMBER` | A unique number for each run of a particular workflow. | `42` | +| `GITHUB_SERVER_URL` | The URL of the Gitea instance. | `https://gitea.com` | +| `GITHUB_SHA` | The commit SHA that triggered the workflow. | `a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2` | +| `GITHUB_WORKFLOW` | The name of the workflow. | `CI` | +| `GITHUB_WORKSPACE` | The default working directory on the runner. | `/workspace/gitea/docs` | + +### Runner environment variables + +| Name | Description | Example | +|---|---|---| +| `RUNNER_ARCH` | The architecture of the runner. | `X64` | +| `RUNNER_OS` | The operating system of the runner. | `Linux` | +| `RUNNER_TEMP` | Path to a temporary directory on the runner. | `/tmp` | +| `RUNNER_TOOL_CACHE` | Path to the tool cache directory on the runner. | `/opt/hostedtoolcache` | + +### Internal environment variables + +These are used internally by the runner and actions. They are typically not needed in workflows directly. + +| Name | Description | Example | +|---|---|---| +| `ACTIONS_CACHE_URL` | URL for the actions cache service. | `http://192.168.1.10:8088/` | +| `ACTIONS_ID_TOKEN_REQUEST_TOKEN` | Token for OIDC requests. Only set when configured. | `***` | +| `ACTIONS_ID_TOKEN_REQUEST_URL` | URL to request OIDC tokens. Only set when configured. | `https://gitea.com/login/oauth/access_token` | +| `ACTIONS_RESULTS_URL` | URL for storing artifacts. | `https://gitea.com` | +| `ACTIONS_RUNTIME_TOKEN` | Authentication token for the Actions pipeline API. | `***` | +| `ACTIONS_RUNTIME_URL` | URL for the Gitea Actions pipeline API. | `https://gitea.com/api/actions_pipeline/` | From efa6607558798c45d703cc3188f384001f76ca5c Mon Sep 17 00:00:00 2001 From: wxiaoguang <29147+wxiaoguang@noreply.gitea.com> Date: Fri, 3 Apr 2026 18:25:12 +0000 Subject: [PATCH 024/217] GitHub-like theme-based image display (#372) --- docs/usage/repository/markdown.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/usage/repository/markdown.md b/docs/usage/repository/markdown.md index b3db34d7..89cd05c0 100644 --- a/docs/usage/repository/markdown.md +++ b/docs/usage/repository/markdown.md @@ -76,6 +76,33 @@ It will be rendered with issue titles to: * the other issue title (#456) ``` +## Theme-based image display + +Gitea supports the GitHub-like theme-based image display. Supported syntax: + +* Use Markdown image + +``` +![My-Light](my-light.png#gh-light-mode-only)![My-Dark](my-dark.png#gh-dark-mode-only) +``` + +* Use `` HTML tag + +``` + + +``` + +* Use `` with `` (only works for themes with "auto" color preference) + +``` + + + + + +``` + ## Math expressions Gitea supports GitHub-like math expression formatting. From 1568bfa1e903a3e6d23cbfd171a0888ceeb71f9a Mon Sep 17 00:00:00 2001 From: TheFox0x7 <95654+thefox0x7@noreply.gitea.com> Date: Mon, 6 Apr 2026 20:41:42 +0000 Subject: [PATCH 025/217] terraform state registry docs (#357) https://github.com/go-gitea/gitea/pull/36710 Reviewed-on: https://gitea.com/gitea/docs/pulls/357 Reviewed-by: Nicolas <173651+bircni@noreply.gitea.com> Co-authored-by: TheFox0x7 <95654+thefox0x7@noreply.gitea.com> Co-committed-by: TheFox0x7 <95654+thefox0x7@noreply.gitea.com> --- docs/administration/config-cheat-sheet.md | 1 + docs/usage/packages/overview.md | 1 + docs/usage/packages/terraform.md | 99 +++++++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 docs/usage/packages/terraform.md diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index 79438ed1..c89ebaad 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -1454,6 +1454,7 @@ in this mapping or the filetype using heuristics. - `LIMIT_SIZE_RUBYGEMS`: **-1**: Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) - `LIMIT_SIZE_SWIFT`: **-1**: Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) - `LIMIT_SIZE_VAGRANT`: **-1**: Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) +- `LIMIT_SIZE_TERRAFORM_STATE``: **-1**: Maximum size of a Terraform state upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) ## Mirror (`mirror`) diff --git a/docs/usage/packages/overview.md b/docs/usage/packages/overview.md index 9cb9b11d..125c0f95 100644 --- a/docs/usage/packages/overview.md +++ b/docs/usage/packages/overview.md @@ -35,6 +35,7 @@ The following package managers are currently supported: | [RPM](usage/packages/rpm.md) | - | `yum`, `dnf`, `zypper` | | [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` | | [Swift](usage/packages/swift.md) | Swift | `swift` | +| [Terraform](usage/packages/terraform.md) | - | `terraform` | | [Vagrant](usage/packages/vagrant.md) | - | `vagrant` | **The following paragraphs only apply if Packages are not globally disabled!** diff --git a/docs/usage/packages/terraform.md b/docs/usage/packages/terraform.md new file mode 100644 index 00000000..0cc68bcd --- /dev/null +++ b/docs/usage/packages/terraform.md @@ -0,0 +1,99 @@ +--- +date: "2026-03-04T00:00:00+00:00" +slug: "terraform" +sidebar_position: 118 +--- + +# Terraform State Registry + +Publish terraform states to sync it between multiple users or CI system. + +## Requirements + +To work with the Terraform State registry, you need to use [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/). + +## Configuring the package registry + +To use the Gitea Terraform State registry, you need to configure the `http` backend in your Terraform configuration. + +```hcl +terraform { + backend "http" { + address = "https://gitea.example.com/api/packages/{owner}/terraform/state/{name}" + lock_address = "https://gitea.example.com/api/packages/{owner}/terraform/state/{name}/lock" + unlock_address = "https://gitea.example.com/api/packages/{owner}/terraform/state/{name}/lock" + lock_method = "POST" + unlock_method = "DELETE" + username = "{username}" + password = "{password_or_token}" + } +} +``` + +| Placeholder | Description | +| ----------- | ----------- | +| `owner` | The owner of the state (user or organization). | +| `name` | The name of the state. | +| `username` | Your Gitea username. | +| `password` | Your Gitea password or [personal access token](development/api-usage.md#authentication). | + +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. + +## Initialize the backend + +After configuring the backend, you can initialize it with: + +```shell +terraform init +``` + +Terraform will prompt you to migrate your state if you already have one locally. + +## State Locking + +Gitea supports state locking to prevent concurrent modifications. The `lock_address` and `unlock_address` should point to the `/lock` sub-route of your state URL. + +- **Locking**: Performed via a `POST` request to `{address}/lock`. +- **Unlocking**: Performed via a `DELETE` request to `{address}/lock`. + +Terraform handles these requests automatically when configured as shown above. + +## Encrypted state + +The state registry supports [encrypted state](https://opentofu.org/docs/language/state/encryption/). + +## State Versions and Management + +Gitea keeps track of your Terraform state versions. You can use the API to retrieve or delete specific versions. + +### Fetch state + +To fetch the latest version of a state: + +```shell +curl --user {username}:{password_or_token} \ + https://gitea.example.com/api/packages/{owner}/terraform/state/{name} +``` + +To fetch a specific version by its serial number: + +```shell +curl --user {username}:{password_or_token} \ + https://gitea.example.com/api/packages/{owner}/terraform/state/{name}/versions/{serial} +``` + +### Delete state + +To delete the entire state and all its versions: + +```shell +curl --user {username}:{password_or_token} -X DELETE \ + https://gitea.example.com/api/packages/{owner}/terraform/state/{name} +``` + +To delete a specific version by its serial number: + +```shell +curl --user {username}:{password_or_token} -X DELETE \ + https://gitea.example.com/api/packages/{owner}/terraform/state/{name}/versions/{serial} +``` From 9cc5cfd388d359b31359e94b50b3f3871232ad55 Mon Sep 17 00:00:00 2001 From: kmanwar89 <139654+kmanwar89@noreply.gitea.com> Date: Tue, 7 Apr 2026 09:24:36 +0000 Subject: [PATCH 026/217] Updated various docker compose commands & references (#361) Co-authored-by: wxiaoguang Co-authored-by: kmanwar89 <139654+kmanwar89@noreply.gitea.com> Co-committed-by: kmanwar89 <139654+kmanwar89@noreply.gitea.com> --- docs/installation/with-docker-rootless.md | 229 ++--------------- docs/installation/with-docker.md | 34 +-- .../installation/with-docker-rootless.md | 230 ++---------------- .../version-1.25/installation/with-docker.md | 55 ++--- 4 files changed, 79 insertions(+), 469 deletions(-) diff --git a/docs/installation/with-docker-rootless.md b/docs/installation/with-docker-rootless.md index 9b0621e8..d2bfc0e6 100644 --- a/docs/installation/with-docker-rootless.md +++ b/docs/installation/with-docker-rootless.md @@ -8,15 +8,19 @@ aliases: # Installation with Docker (rootless) -Gitea provides automatically updated Docker images within its Docker Hub organization. It is -possible to always use the latest stable tag or to use another service that handles updating -Docker images. +## Relation to rootful image -The rootless image uses Gitea internal SSH to provide Git protocol and doesn't support OpenSSH. +* Rootless image doesn't require "root" privilege on the host, while it may have stricter UID/GID requirement. +* Rootless image must use its bulitin SSH server, while the rootful one must its managed standalone OpenSSH server. +* The volume mapping and directory layout is different between them. -This reference setup guides users through the setup based on `docker-compose`, but the installation -of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow -the official [install instructions](https://docs.docker.com/compose/install/). +Except the differences above, the rootless image shares the same mechanism with rootful image, +including: port mapping, custimzation, upgrading, environment variables, etc. +Read more in "[Installation with Docker (rootful)](./with-docker.md)" + +ATTENTION: the rootful/rootless images are not compatible with the other. +If you have chosen one, you should always use the same one, +don't switch to the other one by changing the compose file's `image` value. ## Basics @@ -34,8 +38,6 @@ touch docker-compose.yml Then paste the following content into a file named `docker-compose.yml`: ```yaml -version: "2" - services: server: image: docker.gitea.com/gitea:@dockerVersion@-rootless @@ -56,116 +58,16 @@ Note that the volume should be owned by the user/group with the UID/GID specifie sudo chown 1000:1000 config/ data/ ``` -> If you don't give the volume correct permissions, the container may not start. +> If you don't give the volume correct permissions, the container may present the following errors in the logs: + +```sh +server-1 | 2026-03-11T12:57:50.794102045Z mkdir: can't create directory '/var/lib/gitea/git': Permission denied +server-1 | 2026-03-11T12:57:50.796198843Z /var/lib/gitea/git is not writable +server-1 | 2026-03-11T12:57:50.796235667Z docker setup failed +``` For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@dockerVersion@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`) -## Custom port - -To bind the integrated ssh and the webserver on a different port, adjust -the port section. It's common to just change the host port and keep the ports within -the container like they are. - -```diff -version: "2" - -services: - server: - image: docker.gitea.com/gitea:@dockerVersion@-rootless - restart: always - volumes: - - ./data:/var/lib/gitea - - ./config:/etc/gitea - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: -- - "3000:3000" -- - "2222:2222" -+ - "80:3000" -+ - "22:2222" -``` - -## MySQL database - -To start Gitea in combination with a MySQL database, apply these changes to the -`docker-compose.yml` file created above. - -```diff -version: "2" - -services: - server: - image: docker.gitea.com/gitea:@dockerVersion@-rootless -+ environment: -+ - GITEA__database__DB_TYPE=mysql -+ - GITEA__database__HOST=db:3306 -+ - GITEA__database__NAME=gitea -+ - GITEA__database__USER=gitea -+ - GITEA__database__PASSWD=gitea - restart: always - volumes: - - ./data:/var/lib/gitea - - ./config:/etc/gitea - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: - - "3000:3000" - - "2222:2222" -+ depends_on: -+ - db -+ -+ db: -+ image: docker.io/library/mysql:8 -+ restart: always -+ environment: -+ - MYSQL_ROOT_PASSWORD=gitea -+ - MYSQL_USER=gitea -+ - MYSQL_PASSWORD=gitea -+ - MYSQL_DATABASE=gitea -+ volumes: -+ - ./mysql:/var/lib/mysql -``` - -## PostgreSQL database - -To start Gitea in combination with a PostgreSQL database, apply these changes to -the `docker-compose.yml` file created above. - -```diff -version: "2" - -services: - server: - image: docker.gitea.com/gitea:@dockerVersion@-rootless - environment: -+ - GITEA__database__DB_TYPE=postgres -+ - GITEA__database__HOST=db:5432 -+ - GITEA__database__NAME=gitea -+ - GITEA__database__USER=gitea -+ - GITEA__database__PASSWD=gitea - restart: always - volumes: - - ./data:/var/lib/gitea - - ./config:/etc/gitea - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: - - "3000:3000" - - "2222:2222" -+ depends_on: -+ - db -+ -+ db: -+ image: docker.io/library/postgres:14 -+ restart: always -+ environment: -+ - POSTGRES_USER=gitea -+ - POSTGRES_PASSWORD=gitea -+ - POSTGRES_DB=gitea -+ volumes: -+ - ./postgres:/var/lib/postgresql/data -``` - ## Named volumes To use named volumes instead of host volumes, define and use the named volume @@ -174,8 +76,6 @@ create the required volume. You don't need to worry about permissions with named volumes; Docker will deal with that automatically. ```diff -version: "2" - +volumes: + gitea-data: + driver: local @@ -207,8 +107,6 @@ As an example to clone the host user `git` definition use the command `id -u git Please make sure that the mounted folders are writable by the user. ```diff -version: "2" - services: server: image: docker.gitea.com/gitea:@dockerVersion@-rootless @@ -223,94 +121,3 @@ services: - "3000:3000" - "2222:2222" ``` - -## Startup - -:::note -From July 2023 Compose V1 stopped receiving updates. It's also no longer available in new releases of Docker Desktop. - -Compose V2 is included with all currently supported versions of Docker Desktop. Please use V2 to do below operations. -::: - -To start this setup based on `docker-compose`, execute `docker-compose up -d`, -to launch Gitea in the background. Using `docker-compose ps` will show if Gitea -started properly. Logs can be viewed with `docker-compose logs`. - -To shut down the setup, execute `docker-compose down`. This will stop -and kill the containers. The volumes will still exist. - -:::note -If using a non-3000 port on http, change app.ini to match -`LOCAL_ROOT_URL = http://localhost:3000/`. -::: - -## Install - -After starting the Docker setup via `docker-compose`, Gitea should be available using a -favorite browser to finalize the installation. Visit http://server-ip:3000 and follow the -installation wizard. If the database was started with the `docker-compose` setup as -documented above, please note that `db` must be used as the database hostname. - -## Customization - -Customization files described [here](../administration/customizing-gitea.md) should -be placed in `/var/lib/gitea/custom` directory. If using host volumes, it's quite easy to access these -files; for named volumes, this is done through another container or by direct access at -`/var/lib/docker/volumes/gitea_gitea/_/var_lib_gitea`. The configuration file will be saved at -`/etc/gitea/app.ini` after the installation. - -## Upgrading - -:::warning -:exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation: -::: - -To upgrade your installation to the latest release: - -```bash -# Edit `docker-compose.yml` to update the version, if you have one specified -# Pull new images -docker-compose pull -# Start a new container, automatically removes old one -docker-compose up -d -``` - -## Upgrading from standard image - -- Backup your setup -- Change volume mountpoint from /data to /var/lib/gitea -- If you used a custom app.ini move it to a new volume mounted to /etc/gitea -- Rename folder (inside volume) gitea to custom -- Edit app.ini if needed - - Set START_SSH_SERVER = true -- Use image docker.gitea.com/gitea:@dockerVersion@-rootless - -## Managing Deployments With Environment Variables - -In addition to the environment variables above, any settings in `app.ini` can be set -or overridden with an environment variable of the form: `GITEA__
__`. -These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. - -These environment variables can be passed to the docker container in `docker-compose.yml`. -The following example will enable a smtp mail server if the required env variables -`GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host -or in a `.env` file in the same directory as `docker-compose.yml`. - -The settings can be also set or overridden with the content of a file by defining an environment variable of the form: -`GITEA__section_name__KEY_NAME__FILE` that points to a file. - -```bash -... -services: - server: - environment: - - GITEA__mailer__ENABLED=true - - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__PROTOCOL=smtp - - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - - GITEA__mailer__IS_TLS_ENABLED=true - - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} - - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" -``` - -To set required TOKEN and SECRET values, consider using Gitea's built-in [generate utility functions](../administration/command-line.md#generate). diff --git a/docs/installation/with-docker.md b/docs/installation/with-docker.md index b77921db..78821415 100644 --- a/docs/installation/with-docker.md +++ b/docs/installation/with-docker.md @@ -6,15 +6,22 @@ aliases: - /en-us/install-with-docker --- -# Installation with Docker +# Installation with Docker (rootful) Gitea provides automatically updated Docker images within its Docker Hub organization. It is possible to always use the latest stable tag or to use another service that handles updating Docker images. -This reference setup guides users through the setup based on docker `compose`-plugin, but the installation -of the docker `compose`-plugin is out of scope of this documentation. To install the docker `compose`-plugin itself, follow -the official [install instructions](https://docs.docker.com/compose/install/). +This reference setup guides users through the setup based on `docker compose`. +Docker compose has been included in the Docker Engine since the shift to Compose v2. +If, for some reason, compose is not available on your system, follow the official [install instructions](https://docs.docker.com/compose/install/). + +This document targets for the default rootful image. For the rootless image, +see "[Installation with Docker (rootless)](./with-docker-rootless.md)" + +ATTENTION: the rootful/rootless images are not compatible with the other. +If you have chosen one, you should always use the same one, +don't switch to the other one by changing the compose file's `image` value. ## Basics @@ -217,13 +224,7 @@ MySQL or PostgreSQL containers will need to be created separately. ## Startup -:::note -From July 2023 Compose V1 stopped receiving updates. It's also no longer available in new releases of Docker Desktop. - -Compose V2 is included with all currently supported versions of Docker Desktop. Please use V2 to do below operations. -::: - -To start this setup based on the docker `compose`-plugin, execute `docker compose up -d`, +To start this setup based on `docker compose`, execute `docker compose up -d`, to launch Gitea in the background. Using `docker compose ps` will show if Gitea started properly. Logs can be viewed with `docker compose logs`. @@ -237,9 +238,9 @@ If using a non-3000 port on http, change app.ini to match ## Installation -After starting the Docker setup via the docker `compose`-plugin, Gitea should be available using a +After starting the Docker setup via `docker compose`, Gitea should be available using a favorite browser to finalize the installation. Visit http://server-ip:3000 and follow the -installation wizard. If the database was started with the docker `compose`-plugin setup as +installation wizard. If the database was started with the `docker compose` setup as documented above, please note that `db` must be used as the database hostname. ## Configure the user inside Gitea using environment variables @@ -277,8 +278,10 @@ docker compose up -d ## Managing Deployments With Environment Variables In addition to the environment variables above, any settings in `app.ini` can be set -or overridden with an environment variable of the form: `GITEA__
__`. -These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. +or overridden with an environment variable of the form: `GITEA__section_name__KEY_NAME=value`. +These settings are applied each time the docker container starts by `environment-to-ini` command +(a warpper of `gitea config edit-ini`), and won't be passed into Gitea's sub-processes. +See `./gitea config edit-ini --help` for more details. These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable an smtp mail server if the required env variables @@ -321,5 +324,6 @@ services: ``` ### SSH with multiple IP addresses + This assumes that the host machine has more than one reachable IP address: `192.168.1.1` (host) `192.168.1.2` (gitea) On the host machine, configure SSHD in `/etc/ssh/sshd_config` to listen on one IP address `ListenAddress 192.168.1.1`. In the compose file the SSH port forwarding then needs to be changed to `"192.168.1.2:22:22"`. The port forwarding needs to be adjusted similarily for all other forwarded ports to avoid problems with DNS. diff --git a/versioned_docs/version-1.25/installation/with-docker-rootless.md b/versioned_docs/version-1.25/installation/with-docker-rootless.md index 3aa67178..d2bfc0e6 100644 --- a/versioned_docs/version-1.25/installation/with-docker-rootless.md +++ b/versioned_docs/version-1.25/installation/with-docker-rootless.md @@ -8,15 +8,19 @@ aliases: # Installation with Docker (rootless) -Gitea provides automatically updated Docker images within its Docker Hub organization. It is -possible to always use the latest stable tag or to use another service that handles updating -Docker images. +## Relation to rootful image -The rootless image uses Gitea internal SSH to provide Git protocol and doesn't support OpenSSH. +* Rootless image doesn't require "root" privilege on the host, while it may have stricter UID/GID requirement. +* Rootless image must use its bulitin SSH server, while the rootful one must its managed standalone OpenSSH server. +* The volume mapping and directory layout is different between them. -This reference setup guides users through the setup based on `docker-compose`, but the installation -of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow -the official [install instructions](https://docs.docker.com/compose/install/). +Except the differences above, the rootless image shares the same mechanism with rootful image, +including: port mapping, custimzation, upgrading, environment variables, etc. +Read more in "[Installation with Docker (rootful)](./with-docker.md)" + +ATTENTION: the rootful/rootless images are not compatible with the other. +If you have chosen one, you should always use the same one, +don't switch to the other one by changing the compose file's `image` value. ## Basics @@ -34,8 +38,6 @@ touch docker-compose.yml Then paste the following content into a file named `docker-compose.yml`: ```yaml -version: "2" - services: server: image: docker.gitea.com/gitea:@dockerVersion@-rootless @@ -56,116 +58,16 @@ Note that the volume should be owned by the user/group with the UID/GID specifie sudo chown 1000:1000 config/ data/ ``` -> If you don't give the volume correct permissions, the container may not start. +> If you don't give the volume correct permissions, the container may present the following errors in the logs: + +```sh +server-1 | 2026-03-11T12:57:50.794102045Z mkdir: can't create directory '/var/lib/gitea/git': Permission denied +server-1 | 2026-03-11T12:57:50.796198843Z /var/lib/gitea/git is not writable +server-1 | 2026-03-11T12:57:50.796235667Z docker setup failed +``` For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@dockerVersion@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`) -## Custom port - -To bind the integrated ssh and the webserver on a different port, adjust -the port section. It's common to just change the host port and keep the ports within -the container like they are. - -```diff -version: "2" - -services: - server: - image: docker.gitea.com/gitea:@dockerVersion@-rootless - restart: always - volumes: - - ./data:/var/lib/gitea - - ./config:/etc/gitea - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: -- - "3000:3000" -- - "2222:2222" -+ - "80:3000" -+ - "22:2222" -``` - -## MySQL database - -To start Gitea in combination with a MySQL database, apply these changes to the -`docker-compose.yml` file created above. - -```diff -version: "2" - -services: - server: - image: docker.gitea.com/gitea:@dockerVersion@-rootless -+ environment: -+ - GITEA__database__DB_TYPE=mysql -+ - GITEA__database__HOST=db:3306 -+ - GITEA__database__NAME=gitea -+ - GITEA__database__USER=gitea -+ - GITEA__database__PASSWD=gitea - restart: always - volumes: - - ./data:/var/lib/gitea - - ./config:/etc/gitea - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: - - "3000:3000" - - "2222:2222" -+ depends_on: -+ - db -+ -+ db: -+ image: docker.io/library/mysql:8 -+ restart: always -+ environment: -+ - MYSQL_ROOT_PASSWORD=gitea -+ - MYSQL_USER=gitea -+ - MYSQL_PASSWORD=gitea -+ - MYSQL_DATABASE=gitea -+ volumes: -+ - ./mysql:/var/lib/mysql -``` - -## PostgreSQL database - -To start Gitea in combination with a PostgreSQL database, apply these changes to -the `docker-compose.yml` file created above. - -```diff -version: "2" - -services: - server: - image: docker.gitea.com/gitea:@dockerVersion@-rootless - environment: -+ - GITEA__database__DB_TYPE=postgres -+ - GITEA__database__HOST=db:5432 -+ - GITEA__database__NAME=gitea -+ - GITEA__database__USER=gitea -+ - GITEA__database__PASSWD=gitea - restart: always - volumes: - - ./data:/var/lib/gitea - - ./config:/etc/gitea - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: - - "3000:3000" - - "2222:2222" -+ depends_on: -+ - db -+ -+ db: -+ image: docker.io/library/postgres:14 -+ restart: always -+ environment: -+ - POSTGRES_USER=gitea -+ - POSTGRES_PASSWORD=gitea -+ - POSTGRES_DB=gitea -+ volumes: -+ - ./postgres:/var/lib/postgresql/data -``` - ## Named volumes To use named volumes instead of host volumes, define and use the named volume @@ -174,8 +76,6 @@ create the required volume. You don't need to worry about permissions with named volumes; Docker will deal with that automatically. ```diff -version: "2" - +volumes: + gitea-data: + driver: local @@ -207,8 +107,6 @@ As an example to clone the host user `git` definition use the command `id -u git Please make sure that the mounted folders are writable by the user. ```diff -version: "2" - services: server: image: docker.gitea.com/gitea:@dockerVersion@-rootless @@ -223,95 +121,3 @@ services: - "3000:3000" - "2222:2222" ``` - -## Startup - -:::note -From July 2023 Compose V1 stopped receiving updates. It's also no longer available in new releases of Docker Desktop. - -Compose V2 is included with all currently supported versions of Docker Desktop. Please use V2 to do below operations. -::: - -To start this setup based on `docker-compose`, execute `docker-compose up -d`, -to launch Gitea in the background. Using `docker-compose ps` will show if Gitea -started properly. Logs can be viewed with `docker-compose logs`. - -To shut down the setup, execute `docker-compose down`. This will stop -and kill the containers. The volumes will still exist. - -:::note -If using a non-3000 port on http, change app.ini to match -`LOCAL_ROOT_URL = http://localhost:3000/`. -::: - -## Install - -After starting the Docker setup via `docker-compose`, Gitea should be available using a -favorite browser to finalize the installation. Visit http://server-ip:3000 and follow the -installation wizard. If the database was started with the `docker-compose` setup as -documented above, please note that `db` must be used as the database hostname. - -## Customization - -Customization files described [here](../administration/customizing-gitea.md) should -be placed in `/var/lib/gitea/custom` directory. If using host volumes, it's quite easy to access these -files; for named volumes, this is done through another container or by direct access at -`/var/lib/docker/volumes/gitea_gitea/_/var_lib_gitea`. The configuration file will be saved at -`/etc/gitea/app.ini` after the installation. - -## Upgrading - -:::warning -:exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation: -::: - -To upgrade your installation to the latest release: - -```bash -# Edit `docker-compose.yml` to update the version, if you have one specified -# Pull new images -docker-compose pull -# Start a new container, automatically removes old one -docker-compose up -d -``` - -## Upgrading from standard image - -- Backup your setup -- Change volume mountpoint from /data to /var/lib/gitea -- If you used a custom app.ini move it to a new volume mounted to /etc/gitea -- Rename folder (inside volume) gitea to custom -- Edit app.ini if needed - - Set START_SSH_SERVER = true -- Use image docker.gitea.com/gitea:@dockerVersion@-rootless - -## Managing Deployments With Environment Variables - -In addition to the environment variables above, any settings in `app.ini` can be set -or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. -These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. -Full information [here](https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini). - -These environment variables can be passed to the docker container in `docker-compose.yml`. -The following example will enable a smtp mail server if the required env variables -`GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host -or in a `.env` file in the same directory as `docker-compose.yml`. - -The settings can be also set or overridden with the content of a file by defining an environment variable of the form: -`GITEA__section_name__KEY_NAME__FILE` that points to a file. - -```bash -... -services: - server: - environment: - - GITEA__mailer__ENABLED=true - - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__PROTOCOL=smtp - - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - - GITEA__mailer__IS_TLS_ENABLED=true - - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} - - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" -``` - -To set required TOKEN and SECRET values, consider using Gitea's built-in [generate utility functions](../administration/command-line.md#generate). diff --git a/versioned_docs/version-1.25/installation/with-docker.md b/versioned_docs/version-1.25/installation/with-docker.md index 82925f5b..78821415 100644 --- a/versioned_docs/version-1.25/installation/with-docker.md +++ b/versioned_docs/version-1.25/installation/with-docker.md @@ -6,15 +6,22 @@ aliases: - /en-us/install-with-docker --- -# Installation with Docker +# Installation with Docker (rootful) Gitea provides automatically updated Docker images within its Docker Hub organization. It is possible to always use the latest stable tag or to use another service that handles updating Docker images. -This reference setup guides users through the setup based on `docker-compose`, but the installation -of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow -the official [install instructions](https://docs.docker.com/compose/install/). +This reference setup guides users through the setup based on `docker compose`. +Docker compose has been included in the Docker Engine since the shift to Compose v2. +If, for some reason, compose is not available on your system, follow the official [install instructions](https://docs.docker.com/compose/install/). + +This document targets for the default rootful image. For the rootless image, +see "[Installation with Docker (rootless)](./with-docker-rootless.md)" + +ATTENTION: the rootful/rootless images are not compatible with the other. +If you have chosen one, you should always use the same one, +don't switch to the other one by changing the compose file's `image` value. ## Basics @@ -26,8 +33,6 @@ If you don't give the volume correct permissions, the container may not start. For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`) ```yaml -version: "3" - networks: gitea: external: false @@ -58,8 +63,6 @@ the port section. It's common to just change the host port and keep the ports wi the container like they are. ```diff -version: "3" - networks: gitea: external: false @@ -93,8 +96,6 @@ To start Gitea in combination with a MySQL database, apply these changes to the `docker-compose.yml` file created above. ```diff -version: "3" - networks: gitea: external: false @@ -144,8 +145,6 @@ To start Gitea in combination with a PostgreSQL database, apply these changes to the `docker-compose.yml` file created above. ```diff -version: "3" - networks: gitea: external: false @@ -196,8 +195,6 @@ create the required volume. You don't need to worry about permissions with named volumes; Docker will deal with that automatically. ```diff -version: "3" - networks: gitea: external: false @@ -227,17 +224,11 @@ MySQL or PostgreSQL containers will need to be created separately. ## Startup -:::note -From July 2023 Compose V1 stopped receiving updates. It's also no longer available in new releases of Docker Desktop. +To start this setup based on `docker compose`, execute `docker compose up -d`, +to launch Gitea in the background. Using `docker compose ps` will show if Gitea +started properly. Logs can be viewed with `docker compose logs`. -Compose V2 is included with all currently supported versions of Docker Desktop. Please use V2 to do below operations. -::: - -To start this setup based on `docker-compose`, execute `docker-compose up -d`, -to launch Gitea in the background. Using `docker-compose ps` will show if Gitea -started properly. Logs can be viewed with `docker-compose logs`. - -To shut down the setup, execute `docker-compose down`. This will stop +To shut down the setup, execute `docker compose down`. This will stop and kill the containers. The volumes will still exist. :::note @@ -247,9 +238,9 @@ If using a non-3000 port on http, change app.ini to match ## Installation -After starting the Docker setup via `docker-compose`, Gitea should be available using a +After starting the Docker setup via `docker compose`, Gitea should be available using a favorite browser to finalize the installation. Visit http://server-ip:3000 and follow the -installation wizard. If the database was started with the `docker-compose` setup as +installation wizard. If the database was started with the `docker compose` setup as documented above, please note that `db` must be used as the database hostname. ## Configure the user inside Gitea using environment variables @@ -279,17 +270,18 @@ To upgrade your installation to the latest release: ```bash # Edit `docker-compose.yml` to update the version, if you have one specified # Pull new images -docker-compose pull +docker compose pull # Start a new container, automatically removes old one -docker-compose up -d +docker compose up -d ``` ## Managing Deployments With Environment Variables In addition to the environment variables above, any settings in `app.ini` can be set -or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. -These settings are applied each time the docker container starts, and won't be passed into Gitea's sub-processes. -Full information [here](https://github.com/go-gitea/gitea/blob/0d740a6a7231b254306d0b1513ff27e32646cd5e/contrib/environment-to-ini/README). +or overridden with an environment variable of the form: `GITEA__section_name__KEY_NAME=value`. +These settings are applied each time the docker container starts by `environment-to-ini` command +(a warpper of `gitea config edit-ini`), and won't be passed into Gitea's sub-processes. +See `./gitea config edit-ini --help` for more details. These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable an smtp mail server if the required env variables @@ -332,5 +324,6 @@ services: ``` ### SSH with multiple IP addresses + This assumes that the host machine has more than one reachable IP address: `192.168.1.1` (host) `192.168.1.2` (gitea) On the host machine, configure SSHD in `/etc/ssh/sshd_config` to listen on one IP address `ListenAddress 192.168.1.1`. In the compose file the SSH port forwarding then needs to be changed to `"192.168.1.2:22:22"`. The port forwarding needs to be adjusted similarily for all other forwarded ports to avoid problems with DNS. From 57fc84f0034d4189f583bf46ffcbb0eceb7ca0e5 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 7 Apr 2026 17:33:41 +0800 Subject: [PATCH 027/217] remove "rootful" from title --- docs/installation/with-docker.md | 2 +- versioned_docs/version-1.25/installation/with-docker.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation/with-docker.md b/docs/installation/with-docker.md index 78821415..3bf86067 100644 --- a/docs/installation/with-docker.md +++ b/docs/installation/with-docker.md @@ -6,7 +6,7 @@ aliases: - /en-us/install-with-docker --- -# Installation with Docker (rootful) +# Installation with Docker Gitea provides automatically updated Docker images within its Docker Hub organization. It is possible to always use the latest stable tag or to use another service that handles updating diff --git a/versioned_docs/version-1.25/installation/with-docker.md b/versioned_docs/version-1.25/installation/with-docker.md index 78821415..3bf86067 100644 --- a/versioned_docs/version-1.25/installation/with-docker.md +++ b/versioned_docs/version-1.25/installation/with-docker.md @@ -6,7 +6,7 @@ aliases: - /en-us/install-with-docker --- -# Installation with Docker (rootful) +# Installation with Docker Gitea provides automatically updated Docker images within its Docker Hub organization. It is possible to always use the latest stable tag or to use another service that handles updating From 5e4cd3b57790d2f1bbb1b12dae3cee2f34830341 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 8 Apr 2026 23:08:20 +0000 Subject: [PATCH 028/217] Remove obsolete actions concurrency notes (#377) `concurrency` is fully supported as of v1.26 via https://github.com/go-gitea/gitea/pull/32751, so remove the unsupported entry and the different-behavior note. Closes #340 --- This PR was written with the help of Claude Opus 4.6 Reviewed-on: https://gitea.com/gitea/docs/pulls/377 Reviewed-by: Lunny Xiao Co-authored-by: silverwind Co-committed-by: silverwind --- docs/usage/actions/comparison.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/docs/usage/actions/comparison.md b/docs/usage/actions/comparison.md index d7d1d73a..024da652 100644 --- a/docs/usage/actions/comparison.md +++ b/docs/usage/actions/comparison.md @@ -26,13 +26,6 @@ Github Actions doesn't support that. https://docs.github.com/en/actions/using-wo ## Unsupported workflows syntax -### `concurrency` - -It's used to run a single job at a time. -See [Using concurrency](https://docs.github.com/en/actions/using-jobs/using-concurrency). - -It's ignored by Gitea Actions now. - ### `jobs..timeout-minutes` See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes). @@ -94,14 +87,6 @@ Services steps don't have their own section in the job log user interface. ## Different behavior -### Concurrency - -As of v1.21.0, gitea behaves as if `concurrency.cancel-in-progress` is set to `true`. - -This means that newly-triggered workflows will pre-empt runs already in progress for previous triggers. - -See [PR #25716](https://github.com/go-gitea/gitea/pull/25716) for additional details. - ### Job token permissions (`permissions`) Gitea supports `permissions` and `jobs..permissions` to control the default `GITEA_TOKEN` permissions. From b339770f3cb4e1443e798896f7c7a6b97115af40 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 9 Apr 2026 14:15:29 +0000 Subject: [PATCH 029/217] fix(deps): update dependency @mui/material to v9 (#375) Reviewed-on: https://gitea.com/gitea/docs/pulls/375 Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot --- package.json | 2 +- pnpm-lock.yaml | 94 +++++++++++++++++++++++++++----------------------- 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 7f0b3cda..eac73d03 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@mdx-js/react": "^3.0.0", - "@mui/material": "^7.0.0", + "@mui/material": "^9.0.0", "clsx": "^2.1.1", "docusaurus-plugin-plausible": "^0.0.5", "prism-react-renderer": "^2.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95bee366..248669d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: ^3.0.0 version: 3.1.1(@types/react@18.2.46)(react@19.2.4) '@mui/material': - specifier: ^7.0.0 - version: 7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + specifier: ^9.0.0 + version: 9.0.0(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) clsx: specifier: ^2.1.1 version: 2.1.1 @@ -698,6 +698,10 @@ packages: resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==} engines: {node: '>=6.9.0'} + '@babel/runtime@7.29.2': + resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} + engines: {node: '>=6.9.0'} + '@babel/template@7.25.9': resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} @@ -1375,16 +1379,16 @@ packages: '@module-federation/webpack-bundler-runtime@0.18.0': resolution: {integrity: sha512-TEvErbF+YQ+6IFimhUYKK3a5wapD90d90sLsNpcu2kB3QGT7t4nIluE25duXuZDVUKLz86tEPrza/oaaCWTpvQ==} - '@mui/core-downloads-tracker@7.3.9': - resolution: {integrity: sha512-MOkOCTfbMJwLshlBCKJ59V2F/uaLYfmKnN76kksj6jlGUVdI25A9Hzs08m+zjBRdLv+sK7Rqdsefe8X7h/6PCw==} + '@mui/core-downloads-tracker@9.0.0': + resolution: {integrity: sha512-uwQNGkhv0lf7ufxw6QXev77BW6pWbW+7uxYjU5+rfp4lBkFtMEgJCsarTM3Tn+i0lGx6+Ol2u88JdGXr0GDskA==} - '@mui/material@7.3.9': - resolution: {integrity: sha512-I8yO3t4T0y7bvDiR1qhIN6iBWZOTBfVOnmLlM7K6h3dx5YX2a7rnkuXzc2UkZaqhxY9NgTnEbdPlokR1RxCNRQ==} + '@mui/material@9.0.0': + resolution: {integrity: sha512-+VP/oQCDhDR87NQQgXnNBG8dwy6GNuQLnenS1pZvkbn2dKFSxRSRMybTpH9xUxXP+316mlYDy5CSbYtusnCWtw==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 '@emotion/styled': ^11.3.0 - '@mui/material-pigment-css': ^7.3.9 + '@mui/material-pigment-css': ^9.0.0 '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1398,8 +1402,8 @@ packages: '@types/react': optional: true - '@mui/private-theming@7.3.9': - resolution: {integrity: sha512-ErIyRQvsiQEq7Yvcvfw9UDHngaqjMy9P3JDPnRAaKG5qhpl2C4tX/W1S4zJvpu+feihmZJStjIyvnv6KDbIrlw==} + '@mui/private-theming@9.0.0': + resolution: {integrity: sha512-JtuZoaiCqwD6vjgYu6Xp3T7DZkrxJlgtDz5yESzhI34fEX5hHMh2VJUbuL9UOg8xrfIFMrq6dcYoH/7Zi4G0RA==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1408,8 +1412,8 @@ packages: '@types/react': optional: true - '@mui/styled-engine@7.3.9': - resolution: {integrity: sha512-JqujWt5bX4okjUPGpVof/7pvgClqh7HvIbsIBIOOlCh2u3wG/Bwp4+E1bc1dXSwkrkp9WUAoNdI5HEC+5HKvMw==} + '@mui/styled-engine@9.0.0': + resolution: {integrity: sha512-9RLGdX4Jg0aQPRuvqh/OLzYSPlgd5zyEw5/1HIRfdavSiOd03WtUaGZH9/w1RoTYuRKwpgy0hpIFaMHIqPVIWg==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.4.1 @@ -1421,8 +1425,8 @@ packages: '@emotion/styled': optional: true - '@mui/system@7.3.9': - resolution: {integrity: sha512-aL1q9am8XpRrSabv9qWf5RHhJICJql34wnrc1nz0MuOglPRYF/liN+c8VqZdTvUn9qg+ZjRVbKf4sJVFfIDtmg==} + '@mui/system@9.0.0': + resolution: {integrity: sha512-YnC5Zg6j04IxiLc/boAKs0464jfZlLFVa7mf5E8lF0XOtZVUvG6R6gJK50lgUYdaaLdyLfxF6xR7LaPuEpeT/g==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -1437,16 +1441,16 @@ packages: '@types/react': optional: true - '@mui/types@7.4.12': - resolution: {integrity: sha512-iKNAF2u9PzSIj40CjvKJWxFXJo122jXVdrmdh0hMYd+FR+NuJMkr/L88XwWLCRiJ5P1j+uyac25+Kp6YC4hu6w==} + '@mui/types@9.0.0': + resolution: {integrity: sha512-i1cuFCAWN44b3AJWO7mh7tuh1sqbQSeVr/94oG0TX5uXivac8XalgE4/6fQZcmGZigzbQ35IXxj/4jLpRIBYZg==} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: '@types/react': optional: true - '@mui/utils@7.3.9': - resolution: {integrity: sha512-U6SdZaGbfb65fqTsH3V5oJdFj9uYwyLE2WVuNvmbggTSDBb8QHrFsqY8BN3taK9t3yJ8/BPHD/kNvLNyjwM7Yw==} + '@mui/utils@9.0.0': + resolution: {integrity: sha512-bQcqyg/gjULUqTuyUjSAFr6LQGLvtkNtDbJerAtoUn9kGZ0hg5QJiN1PLHMLbeFpe3te1831uq7GFl2ITokGdg==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -7229,6 +7233,8 @@ snapshots: '@babel/runtime@7.28.6': {} + '@babel/runtime@7.29.2': {} + '@babel/template@7.25.9': dependencies: '@babel/code-frame': 7.26.2 @@ -8615,15 +8621,15 @@ snapshots: '@module-federation/runtime': 0.18.0 '@module-federation/sdk': 0.18.0 - '@mui/core-downloads-tracker@7.3.9': {} + '@mui/core-downloads-tracker@9.0.0': {} - '@mui/material@7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@mui/material@9.0.0(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: - '@babel/runtime': 7.28.6 - '@mui/core-downloads-tracker': 7.3.9 - '@mui/system': 7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) - '@mui/types': 7.4.12(@types/react@18.2.46) - '@mui/utils': 7.3.9(@types/react@18.2.46)(react@19.2.4) + '@babel/runtime': 7.29.2 + '@mui/core-downloads-tracker': 9.0.0 + '@mui/system': 9.0.0(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) + '@mui/types': 9.0.0(@types/react@18.2.46) + '@mui/utils': 9.0.0(@types/react@18.2.46)(react@19.2.4) '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.12(@types/react@18.2.46) clsx: 2.1.1 @@ -8638,18 +8644,18 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) '@types/react': 18.2.46 - '@mui/private-theming@7.3.9(@types/react@18.2.46)(react@19.2.4)': + '@mui/private-theming@9.0.0(@types/react@18.2.46)(react@19.2.4)': dependencies: - '@babel/runtime': 7.28.6 - '@mui/utils': 7.3.9(@types/react@18.2.46)(react@19.2.4) + '@babel/runtime': 7.29.2 + '@mui/utils': 9.0.0(@types/react@18.2.46)(react@19.2.4) prop-types: 15.8.1 react: 19.2.4 optionalDependencies: '@types/react': 18.2.46 - '@mui/styled-engine@7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4)': + '@mui/styled-engine@9.0.0(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4)': dependencies: - '@babel/runtime': 7.28.6 + '@babel/runtime': 7.29.2 '@emotion/cache': 11.14.0 '@emotion/serialize': 1.3.3 '@emotion/sheet': 1.4.0 @@ -8660,13 +8666,13 @@ snapshots: '@emotion/react': 11.14.0(@types/react@18.2.46)(react@19.2.4) '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) - '@mui/system@7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4)': + '@mui/system@9.0.0(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4)': dependencies: - '@babel/runtime': 7.28.6 - '@mui/private-theming': 7.3.9(@types/react@18.2.46)(react@19.2.4) - '@mui/styled-engine': 7.3.9(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4) - '@mui/types': 7.4.12(@types/react@18.2.46) - '@mui/utils': 7.3.9(@types/react@18.2.46)(react@19.2.4) + '@babel/runtime': 7.29.2 + '@mui/private-theming': 9.0.0(@types/react@18.2.46)(react@19.2.4) + '@mui/styled-engine': 9.0.0(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4))(react@19.2.4) + '@mui/types': 9.0.0(@types/react@18.2.46) + '@mui/utils': 9.0.0(@types/react@18.2.46)(react@19.2.4) clsx: 2.1.1 csstype: 3.2.3 prop-types: 15.8.1 @@ -8676,16 +8682,16 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@18.2.46)(react@19.2.4))(@types/react@18.2.46)(react@19.2.4) '@types/react': 18.2.46 - '@mui/types@7.4.12(@types/react@18.2.46)': + '@mui/types@9.0.0(@types/react@18.2.46)': dependencies: - '@babel/runtime': 7.28.6 + '@babel/runtime': 7.29.2 optionalDependencies: '@types/react': 18.2.46 - '@mui/utils@7.3.9(@types/react@18.2.46)(react@19.2.4)': + '@mui/utils@9.0.0(@types/react@18.2.46)(react@19.2.4)': dependencies: - '@babel/runtime': 7.28.6 - '@mui/types': 7.4.12(@types/react@18.2.46) + '@babel/runtime': 7.29.2 + '@mui/types': 9.0.0(@types/react@18.2.46) '@types/prop-types': 15.7.15 clsx: 2.1.1 prop-types: 15.8.1 @@ -10415,7 +10421,7 @@ snapshots: dom-helpers@5.2.1: dependencies: - '@babel/runtime': 7.28.6 + '@babel/runtime': 7.29.2 csstype: 3.2.3 dom-serializer@1.4.1: @@ -11021,7 +11027,7 @@ snapshots: history@4.10.1: dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 loose-envify: 1.4.0 resolve-pathname: 3.0.0 tiny-invariant: 1.3.1 @@ -13319,7 +13325,7 @@ snapshots: react-transition-group@4.4.5(react-dom@19.2.4(react@19.2.4))(react@19.2.4): dependencies: - '@babel/runtime': 7.28.6 + '@babel/runtime': 7.29.2 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 @@ -13410,7 +13416,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.28.4 + '@babel/runtime': 7.28.6 regexpu-core@6.2.0: dependencies: From a7ab7af00fd6417e01cf1e9dc744819417ad8de6 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 9 Apr 2026 19:27:32 +0000 Subject: [PATCH 030/217] Add v1.26 documentation (#376) Co-authored-by: silverwind <2021+silverwind@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/docs/pulls/376 Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com> --- docusaurus.config.js | 28 +- .../version-1.26.json | 8 + .../actions/{act-runner.md => act-runner.mdx} | 0 .../{agit-support.md => issues-prs/agit.md} | 0 .../version-1.26.json | 29 + .../administration/_category_.json | 9 + .../administration/adding-legal-pages.md | 34 + .../administration/authentication.md | 301 + .../administration/backup-and-restore.md | 146 + .../administration/cmd-embedded.md | 93 + .../administration/command-line.md | 534 + .../administration/config-cheat-sheet.md | 1385 + .../administration/customizing-gitea.md | 83 + .../administration/email-setup.md | 77 + .../administration/environment-variables.md | 49 + .../administration/external-renderers.md | 194 + .../administration/fail2ban-setup.md | 86 + .../administration/git-lfs-support.md | 24 + .../administration/https-support.md | 89 + .../administration/logging-config.md | 263 + .../administration/mail-templates.md | 254 + .../administration/repo-indexer.md | 50 + .../administration/reverse-proxies.md | 391 + .../search-engines-indexation.md | 30 + .../version-1.26/administration/signing.md | 137 + .../version-1.26/contributing/_category_.json | 9 + .../contributing/guidelines-backend.md | 110 + .../contributing/guidelines-frontend.md | 149 + .../contributing/guidelines-refactoring.md | 40 + .../version-1.26/contributing/localization.md | 25 + .../version-1.26/development/_category_.json | 9 + .../version-1.26/development/api-usage.md | 63 + .../development/hacking-on-gitea.md | 334 + .../version-1.26/development/integrations.md | 37 + .../version-1.26/development/migrations.md | 31 + .../development/oauth2-provider.md | 128 + .../version-1.26/help/_category_.json | 9 + .../version-1.26/help/faq.md | 433 + .../version-1.26/help/support.md | 69 + .../version-1.26/index.md | 75 + .../version-1.26/installation/_category_.json | 9 + .../version-1.26/installation/comparison.md | 140 + .../installation/database-preparation.md | 300 + .../version-1.26/installation/from-binary.md | 205 + .../version-1.26/installation/from-package.md | 104 + .../version-1.26/installation/from-source.md | 218 + .../installation/on-cloud-provider.md | 42 + .../installation/on-kubernetes.md | 74 + .../installation/run-as-service-in-ubuntu.md | 63 + .../installation/upgrade-from-gitea.md | 86 + .../installation/windows-service.md | 69 + .../installation/with-docker-rootless.md | 325 + .../version-1.26/installation/with-docker.md | 373 + .../version-1.26/usage/_category_.json | 9 + .../usage/access-control/_category_.json | 9 + .../usage/access-control/permissions.md | 77 + .../usage/access-control/protected-tags.md | 46 + .../usage/actions/_category_.json | 9 + .../version-1.26/usage/actions/act-runner.mdx | 276 + .../version-1.26/usage/actions/comparison.md | 125 + .../version-1.26/usage/actions/design.md | 124 + .../version-1.26/usage/actions/faq.md | 167 + .../version-1.26/usage/actions/overview.md | 42 + .../version-1.26/usage/actions/quickstart.md | 131 + .../version-1.26/usage/actions/secrets.md | 28 + .../version-1.26/usage/actions/variables.md | 30 + .../usage/issues-prs/_category_.json | 9 + .../version-1.26/usage/issues-prs/agit.md | 45 + .../issue-pull-request-templates.md | 283 + .../version-1.26/usage/issues-prs/labels.md | 33 + .../usage/issues-prs/linked-references.md | 143 + .../issues-prs/merge-message-templates.md | 47 + .../usage/issues-prs/pull-request.md | 60 + .../usage/packages/_category_.json | 9 + .../version-1.26/usage/packages/alpine.md | 121 + .../version-1.26/usage/packages/cargo.md | 98 + .../version-1.26/usage/packages/chef.md | 84 + .../version-1.26/usage/packages/composer.md | 110 + .../version-1.26/usage/packages/conan.md | 89 + .../version-1.26/usage/packages/conda.md | 73 + .../version-1.26/usage/packages/container.md | 81 + .../version-1.26/usage/packages/cran.md | 81 + .../version-1.26/usage/packages/debian.md | 121 + .../version-1.26/usage/packages/generic.md | 135 + .../version-1.26/usage/packages/go.md | 64 + .../version-1.26/usage/packages/helm.md | 55 + .../version-1.26/usage/packages/maven.md | 154 + .../version-1.26/usage/packages/npm.md | 132 + .../version-1.26/usage/packages/nuget.md | 105 + .../version-1.26/usage/packages/overview.md | 96 + .../version-1.26/usage/packages/pub.md | 71 + .../version-1.26/usage/packages/pypi.md | 75 + .../version-1.26/usage/packages/rpm.md | 108 + .../version-1.26/usage/packages/rubygems.md | 115 + .../version-1.26/usage/packages/storage.md | 72 + .../version-1.26/usage/packages/swift.md | 81 + .../version-1.26/usage/packages/vagrant.md | 66 + .../usage/repository/_category_.json | 9 + .../usage/repository/clone-filter.md | 18 + .../usage/repository/incoming-email.md | 38 + .../usage/repository}/profile-readme.md | 0 .../version-1.26/usage/repository/push.md | 61 + .../usage/repository/repo-mirror.md | 98 + .../usage/repository/template-repositories.md | 76 + .../version-1.26/usage/repository/webhooks.md | 185 + .../usage/user-setting/_category_.json | 9 + .../actions/{act-runner.md => act-runner.mdx} | 0 .../{agit-support.md => issues-prs/agit.md} | 0 .../version-1.26.json | 29 + .../administration/_category_.json | 9 + .../administration/adding-legal-pages.md | 34 + .../administration/authentication.md | 301 + .../administration/backup-and-restore.md | 146 + .../administration/cmd-embedded.md | 93 + .../administration/command-line.md | 534 + .../administration/config-cheat-sheet.md | 1380 + .../administration/customizing-gitea.md | 83 + .../administration/email-setup.md | 77 + .../administration/environment-variables.md | 49 + .../administration/external-renderers.md | 194 + .../administration/fail2ban-setup.md | 86 + .../administration/git-lfs-support.md | 24 + .../administration/https-support.md | 89 + .../administration/logging-config.md | 263 + .../administration/mail-templates.md | 254 + .../administration/repo-indexer.md | 50 + .../administration/reverse-proxies.md | 391 + .../search-engines-indexation.md | 30 + .../version-1.26/administration/signing.md | 137 + .../version-1.26/contributing/_category_.json | 9 + .../contributing/guidelines-backend.md | 110 + .../contributing/guidelines-frontend.md | 149 + .../contributing/guidelines-refactoring.md | 40 + .../version-1.26/contributing/localization.md | 25 + .../version-1.26/development/_category_.json | 9 + .../version-1.26/development/api-usage.md | 63 + .../development/hacking-on-gitea.md | 334 + .../version-1.26/development/integrations.md | 37 + .../version-1.26/development/migrations.md | 31 + .../development/oauth2-provider.md | 128 + .../version-1.26/help/_category_.json | 9 + .../version-1.26/help/faq.md | 433 + .../version-1.26/help/support.md | 69 + .../version-1.26/index.md | 73 + .../version-1.26/installation/_category_.json | 9 + .../version-1.26/installation/comparison.md | 140 + .../installation/database-preparation.md | 300 + .../version-1.26/installation/from-binary.md | 205 + .../version-1.26/installation/from-package.md | 104 + .../version-1.26/installation/from-source.md | 218 + .../installation/on-cloud-provider.md | 42 + .../installation/on-kubernetes.md | 74 + .../installation/run-as-service-in-ubuntu.md | 63 + .../installation/upgrade-from-gitea.md | 86 + .../installation/windows-service.md | 69 + .../installation/with-docker-rootless.md | 325 + .../version-1.26/installation/with-docker.md | 374 + .../version-1.26/usage/_category_.json | 9 + .../usage/access-control/_category_.json | 9 + .../usage/access-control/permissions.md | 77 + .../usage/access-control/protected-tags.md | 46 + .../usage/actions/_category_.json | 9 + .../version-1.26/usage/actions/act-runner.mdx | 276 + .../version-1.26/usage/actions/comparison.md | 125 + .../version-1.26/usage/actions/design.md | 124 + .../version-1.26/usage/actions/faq.md | 167 + .../version-1.26/usage/actions/overview.md | 42 + .../version-1.26/usage/actions/quickstart.md | 131 + .../version-1.26/usage/actions/secrets.md | 28 + .../version-1.26/usage/actions/variables.md | 30 + .../usage/issues-prs/_category_.json | 9 + .../version-1.26/usage/issues-prs/agit.md | 45 + .../issue-pull-request-templates.md | 283 + .../version-1.26/usage/issues-prs/labels.md | 33 + .../usage/issues-prs/linked-references.md | 143 + .../issues-prs/merge-message-templates.md | 47 + .../usage/issues-prs/pull-request.md | 60 + .../usage/packages/_category_.json | 9 + .../version-1.26/usage/packages/alpine.md | 121 + .../version-1.26/usage/packages/cargo.md | 98 + .../version-1.26/usage/packages/chef.md | 84 + .../version-1.26/usage/packages/composer.md | 110 + .../version-1.26/usage/packages/conan.md | 89 + .../version-1.26/usage/packages/conda.md | 73 + .../version-1.26/usage/packages/container.md | 81 + .../version-1.26/usage/packages/cran.md | 81 + .../version-1.26/usage/packages/debian.md | 121 + .../version-1.26/usage/packages/generic.md | 135 + .../version-1.26/usage/packages/go.md | 64 + .../version-1.26/usage/packages/helm.md | 55 + .../version-1.26/usage/packages/maven.md | 154 + .../version-1.26/usage/packages/npm.md | 132 + .../version-1.26/usage/packages/nuget.md | 105 + .../version-1.26/usage/packages/overview.md | 96 + .../version-1.26/usage/packages/pub.md | 71 + .../version-1.26/usage/packages/pypi.md | 75 + .../version-1.26/usage/packages/rpm.md | 108 + .../version-1.26/usage/packages/rubygems.md | 115 + .../version-1.26/usage/packages/storage.md | 72 + .../version-1.26/usage/packages/swift.md | 81 + .../version-1.26/usage/packages/vagrant.md | 66 + .../usage/repository/_category_.json | 9 + .../usage/repository/clone-filter.md | 18 + .../usage/repository/incoming-email.md | 38 + .../usage/repository/profile-readme.md | 15 + .../version-1.26/usage/repository/push.md | 61 + .../usage/repository/repo-mirror.md | 98 + .../usage/repository/template-repositories.md | 76 + .../version-1.26/usage/repository/webhooks.md | 185 + .../usage/user-setting/_category_.json | 9 + static/swagger-25.json | 4 +- static/swagger-26.json | 31072 ++++++++++++++++ static/swagger-latest.json | 1187 +- update_api_docs.sh | 2 +- .../administration/_category_.json | 9 + .../administration/adding-legal-pages.md | 33 + .../administration/authentication.md | 351 + .../administration/backup-and-restore.md | 176 + .../administration/cmd-embedded.md | 112 + .../administration/command-line.md | 564 + .../administration/config-cheat-sheet.md | 1698 + .../administration/customizing-gitea.md | 514 + .../administration/email-setup.md | 120 + .../administration/environment-variables.md | 50 + .../administration/external-renderers.md | 183 + .../administration/fail2ban-setup.md | 118 + .../administration/git-lfs-support.md | 43 + .../administration/https-support.md | 93 + .../administration/logging-config.md | 284 + .../administration/mail-templates.md | 268 + .../administration/repo-indexer.md | 56 + .../administration/reverse-proxies.md | 448 + .../search-engines-indexation.md | 31 + .../version-1.26/administration/signing.md | 212 + .../version-1.26/contributing/_category_.json | 9 + .../version-1.26/contributing/contributing.md | 76 + .../contributing/guidelines-backend.md | 115 + .../contributing/guidelines-frontend.md | 156 + .../contributing/guidelines-refactoring.md | 40 + .../version-1.26/contributing/localization.md | 30 + .../version-1.26/development/_category_.json | 9 + .../version-1.26/development/api-usage.md | 163 + .../development/hacking-on-gitea.md | 372 + .../version-1.26/development/integrations.md | 38 + .../version-1.26/development/migrations.md | 34 + .../development/oauth2-provider.md | 271 + .../version-1.26/help/_category_.json | 9 + versioned_docs/version-1.26/help/faq.md | 352 + versioned_docs/version-1.26/help/support.md | 71 + versioned_docs/version-1.26/index.md | 110 + .../version-1.26/installation/_category_.json | 9 + .../version-1.26/installation/comparison.md | 145 + .../installation/database-preparation.md | 311 + .../version-1.26/installation/from-binary.md | 240 + .../version-1.26/installation/from-package.md | 109 + .../version-1.26/installation/from-source.md | 254 + .../installation/on-cloud-provider.md | 43 + .../installation/on-kubernetes.md | 63 + .../installation/run-as-service-in-ubuntu.md | 68 + .../installation/upgrade-from-gitea.md | 91 + .../installation/windows-service.md | 72 + .../installation/with-docker-rootless.md | 123 + .../version-1.26/installation/with-docker.md | 329 + .../version-1.26/usage/_category_.json | 9 + .../usage/access-control/_category_.json | 9 + .../usage/access-control/blocking-users.md | 47 + .../usage/access-control/permissions.md | 78 + .../access-control/protected-branches.md | 90 + .../usage/access-control/protected-tags.md | 47 + .../usage/actions/_category_.json | 9 + .../version-1.26/usage/actions/act-runner.mdx | 459 + .../version-1.26/usage/actions/badge.md | 27 + .../version-1.26/usage/actions/comparison.md | 116 + .../version-1.26/usage/actions/design.md | 122 + .../version-1.26/usage/actions/faq.md | 175 + .../version-1.26/usage/actions/overview.md | 38 + .../version-1.26/usage/actions/quickstart.md | 138 + .../version-1.26/usage/actions/secrets.md | 35 + .../usage/actions/token-permissions.md | 115 + .../version-1.26/usage/actions/variables.md | 140 + .../usage/issues-prs/_category_.json | 9 + .../version-1.26/usage/issues-prs/agit.md | 49 + .../issue-pull-request-templates.md | 328 + .../version-1.26/usage/issues-prs/labels.md | 33 + .../usage/issues-prs/linked-references.md | 194 + .../issues-prs/merge-message-templates.md | 46 + .../usage/issues-prs/pull-request.md | 60 + .../usage/packages/_category_.json | 9 + .../version-1.26/usage/packages/alpine.md | 122 + .../version-1.26/usage/packages/arch.md | 133 + .../version-1.26/usage/packages/cargo.md | 104 + .../version-1.26/usage/packages/chef.md | 84 + .../version-1.26/usage/packages/composer.md | 112 + .../version-1.26/usage/packages/conan.md | 91 + .../version-1.26/usage/packages/conda.md | 83 + .../version-1.26/usage/packages/container.md | 93 + .../version-1.26/usage/packages/cran.md | 91 + .../version-1.26/usage/packages/debian.md | 123 + .../version-1.26/usage/packages/generic.md | 135 + .../version-1.26/usage/packages/go.md | 66 + .../version-1.26/usage/packages/helm.md | 55 + .../version-1.26/usage/packages/maven.md | 154 + .../version-1.26/usage/packages/npm.md | 132 + .../version-1.26/usage/packages/nuget.md | 106 + .../version-1.26/usage/packages/overview.md | 103 + .../version-1.26/usage/packages/pub.md | 71 + .../version-1.26/usage/packages/pypi.md | 75 + .../version-1.26/usage/packages/rpm.md | 130 + .../version-1.26/usage/packages/rubygems.md | 115 + .../version-1.26/usage/packages/storage.md | 72 + .../version-1.26/usage/packages/swift.md | 90 + .../version-1.26/usage/packages/terraform.md | 99 + .../version-1.26/usage/packages/vagrant.md | 76 + .../usage/repository/_category_.json | 9 + .../version-1.26/usage/repository/blame.md | 30 + .../usage/repository/clone-filter.md | 31 + .../usage/repository/code-owners.md | 57 + .../usage/repository/incoming-email.md | 38 + .../version-1.26/usage/repository/markdown.md | 155 + .../usage/repository/migration.md | 55 + .../usage/repository/profile-readme.md | 18 + .../version-1.26/usage/repository/push.md | 64 + .../usage/repository/repo-mirror.md | 99 + .../usage/repository/template-repositories.md | 87 + .../version-1.26/usage/repository/webhooks.md | 190 + .../usage/user-setting/_category_.json | 9 + .../multi-factor-authentication.md | 30 + versioned_sidebars/version-1.26-sidebars.json | 87 + versions.json | 1 + 329 files changed, 71328 insertions(+), 254 deletions(-) create mode 100644 i18n/en-us/docusaurus-plugin-content-docs/version-1.26.json rename i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/actions/{act-runner.md => act-runner.mdx} (100%) rename i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/{agit-support.md => issues-prs/agit.md} (100%) create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/adding-legal-pages.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/authentication.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/backup-and-restore.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/cmd-embedded.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/command-line.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/config-cheat-sheet.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/customizing-gitea.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/email-setup.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/environment-variables.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/external-renderers.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/fail2ban-setup.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/git-lfs-support.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/https-support.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/logging-config.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/mail-templates.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/repo-indexer.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/reverse-proxies.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/search-engines-indexation.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/signing.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/contributing/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/contributing/guidelines-backend.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/contributing/guidelines-frontend.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/contributing/guidelines-refactoring.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/contributing/localization.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/development/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/development/api-usage.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/development/hacking-on-gitea.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/development/integrations.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/development/migrations.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/development/oauth2-provider.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/help/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/help/faq.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/help/support.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/index.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/comparison.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/database-preparation.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/from-binary.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/from-package.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/from-source.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/on-cloud-provider.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/on-kubernetes.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/run-as-service-in-ubuntu.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/upgrade-from-gitea.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/windows-service.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/with-docker-rootless.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/installation/with-docker.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/access-control/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/access-control/permissions.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/access-control/protected-tags.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/act-runner.mdx create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/comparison.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/design.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/faq.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/overview.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/quickstart.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/secrets.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/actions/variables.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/agit.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/issue-pull-request-templates.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/labels.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/linked-references.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/merge-message-templates.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/pull-request.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/alpine.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/cargo.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/chef.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/composer.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/conan.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/conda.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/container.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/cran.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/debian.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/generic.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/go.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/helm.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/maven.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/npm.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/nuget.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/overview.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/pub.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/pypi.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/rpm.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/rubygems.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/storage.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/swift.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/packages/vagrant.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository/_category_.json create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository/clone-filter.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository/incoming-email.md rename i18n/{zh-tw/docusaurus-plugin-content-docs/version-1.25/usage => zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository}/profile-readme.md (100%) create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository/push.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository/repo-mirror.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository/template-repositories.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/repository/webhooks.md create mode 100644 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/usage/user-setting/_category_.json rename i18n/zh-tw/docusaurus-plugin-content-docs/version-1.25/usage/actions/{act-runner.md => act-runner.mdx} (100%) rename i18n/zh-tw/docusaurus-plugin-content-docs/version-1.25/usage/{agit-support.md => issues-prs/agit.md} (100%) create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/adding-legal-pages.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/authentication.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/backup-and-restore.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/cmd-embedded.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/command-line.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/config-cheat-sheet.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/customizing-gitea.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/email-setup.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/environment-variables.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/external-renderers.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/fail2ban-setup.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/git-lfs-support.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/https-support.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/logging-config.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/mail-templates.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/repo-indexer.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/reverse-proxies.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/search-engines-indexation.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/administration/signing.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/contributing/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/contributing/guidelines-backend.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/contributing/guidelines-frontend.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/contributing/guidelines-refactoring.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/contributing/localization.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/development/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/development/api-usage.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/development/hacking-on-gitea.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/development/integrations.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/development/migrations.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/development/oauth2-provider.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/help/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/help/faq.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/help/support.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/index.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/comparison.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/database-preparation.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/from-binary.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/from-package.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/from-source.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/on-cloud-provider.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/on-kubernetes.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/run-as-service-in-ubuntu.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/upgrade-from-gitea.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/windows-service.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/with-docker-rootless.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/installation/with-docker.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/access-control/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/access-control/permissions.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/access-control/protected-tags.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/act-runner.mdx create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/comparison.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/design.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/faq.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/overview.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/quickstart.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/secrets.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/actions/variables.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/agit.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/issue-pull-request-templates.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/labels.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/linked-references.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/merge-message-templates.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/issues-prs/pull-request.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/alpine.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/cargo.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/chef.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/composer.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/conan.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/conda.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/container.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/cran.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/debian.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/generic.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/go.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/helm.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/maven.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/npm.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/nuget.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/overview.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/pub.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/pypi.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/rpm.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/rubygems.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/storage.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/swift.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/packages/vagrant.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/_category_.json create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/clone-filter.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/incoming-email.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/profile-readme.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/push.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/repo-mirror.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/template-repositories.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/repository/webhooks.md create mode 100644 i18n/zh-tw/docusaurus-plugin-content-docs/version-1.26/usage/user-setting/_category_.json create mode 100644 static/swagger-26.json create mode 100644 versioned_docs/version-1.26/administration/_category_.json create mode 100644 versioned_docs/version-1.26/administration/adding-legal-pages.md create mode 100644 versioned_docs/version-1.26/administration/authentication.md create mode 100644 versioned_docs/version-1.26/administration/backup-and-restore.md create mode 100644 versioned_docs/version-1.26/administration/cmd-embedded.md create mode 100644 versioned_docs/version-1.26/administration/command-line.md create mode 100644 versioned_docs/version-1.26/administration/config-cheat-sheet.md create mode 100644 versioned_docs/version-1.26/administration/customizing-gitea.md create mode 100644 versioned_docs/version-1.26/administration/email-setup.md create mode 100644 versioned_docs/version-1.26/administration/environment-variables.md create mode 100644 versioned_docs/version-1.26/administration/external-renderers.md create mode 100644 versioned_docs/version-1.26/administration/fail2ban-setup.md create mode 100644 versioned_docs/version-1.26/administration/git-lfs-support.md create mode 100644 versioned_docs/version-1.26/administration/https-support.md create mode 100644 versioned_docs/version-1.26/administration/logging-config.md create mode 100644 versioned_docs/version-1.26/administration/mail-templates.md create mode 100644 versioned_docs/version-1.26/administration/repo-indexer.md create mode 100644 versioned_docs/version-1.26/administration/reverse-proxies.md create mode 100644 versioned_docs/version-1.26/administration/search-engines-indexation.md create mode 100644 versioned_docs/version-1.26/administration/signing.md create mode 100644 versioned_docs/version-1.26/contributing/_category_.json create mode 100644 versioned_docs/version-1.26/contributing/contributing.md create mode 100644 versioned_docs/version-1.26/contributing/guidelines-backend.md create mode 100644 versioned_docs/version-1.26/contributing/guidelines-frontend.md create mode 100644 versioned_docs/version-1.26/contributing/guidelines-refactoring.md create mode 100644 versioned_docs/version-1.26/contributing/localization.md create mode 100644 versioned_docs/version-1.26/development/_category_.json create mode 100644 versioned_docs/version-1.26/development/api-usage.md create mode 100644 versioned_docs/version-1.26/development/hacking-on-gitea.md create mode 100644 versioned_docs/version-1.26/development/integrations.md create mode 100644 versioned_docs/version-1.26/development/migrations.md create mode 100644 versioned_docs/version-1.26/development/oauth2-provider.md create mode 100644 versioned_docs/version-1.26/help/_category_.json create mode 100644 versioned_docs/version-1.26/help/faq.md create mode 100644 versioned_docs/version-1.26/help/support.md create mode 100644 versioned_docs/version-1.26/index.md create mode 100644 versioned_docs/version-1.26/installation/_category_.json create mode 100644 versioned_docs/version-1.26/installation/comparison.md create mode 100644 versioned_docs/version-1.26/installation/database-preparation.md create mode 100644 versioned_docs/version-1.26/installation/from-binary.md create mode 100644 versioned_docs/version-1.26/installation/from-package.md create mode 100644 versioned_docs/version-1.26/installation/from-source.md create mode 100644 versioned_docs/version-1.26/installation/on-cloud-provider.md create mode 100644 versioned_docs/version-1.26/installation/on-kubernetes.md create mode 100644 versioned_docs/version-1.26/installation/run-as-service-in-ubuntu.md create mode 100644 versioned_docs/version-1.26/installation/upgrade-from-gitea.md create mode 100644 versioned_docs/version-1.26/installation/windows-service.md create mode 100644 versioned_docs/version-1.26/installation/with-docker-rootless.md create mode 100644 versioned_docs/version-1.26/installation/with-docker.md create mode 100644 versioned_docs/version-1.26/usage/_category_.json create mode 100644 versioned_docs/version-1.26/usage/access-control/_category_.json create mode 100644 versioned_docs/version-1.26/usage/access-control/blocking-users.md create mode 100644 versioned_docs/version-1.26/usage/access-control/permissions.md create mode 100644 versioned_docs/version-1.26/usage/access-control/protected-branches.md create mode 100644 versioned_docs/version-1.26/usage/access-control/protected-tags.md create mode 100644 versioned_docs/version-1.26/usage/actions/_category_.json create mode 100644 versioned_docs/version-1.26/usage/actions/act-runner.mdx create mode 100644 versioned_docs/version-1.26/usage/actions/badge.md create mode 100644 versioned_docs/version-1.26/usage/actions/comparison.md create mode 100644 versioned_docs/version-1.26/usage/actions/design.md create mode 100644 versioned_docs/version-1.26/usage/actions/faq.md create mode 100644 versioned_docs/version-1.26/usage/actions/overview.md create mode 100644 versioned_docs/version-1.26/usage/actions/quickstart.md create mode 100644 versioned_docs/version-1.26/usage/actions/secrets.md create mode 100644 versioned_docs/version-1.26/usage/actions/token-permissions.md create mode 100644 versioned_docs/version-1.26/usage/actions/variables.md create mode 100644 versioned_docs/version-1.26/usage/issues-prs/_category_.json create mode 100644 versioned_docs/version-1.26/usage/issues-prs/agit.md create mode 100644 versioned_docs/version-1.26/usage/issues-prs/issue-pull-request-templates.md create mode 100644 versioned_docs/version-1.26/usage/issues-prs/labels.md create mode 100644 versioned_docs/version-1.26/usage/issues-prs/linked-references.md create mode 100644 versioned_docs/version-1.26/usage/issues-prs/merge-message-templates.md create mode 100644 versioned_docs/version-1.26/usage/issues-prs/pull-request.md create mode 100644 versioned_docs/version-1.26/usage/packages/_category_.json create mode 100644 versioned_docs/version-1.26/usage/packages/alpine.md create mode 100644 versioned_docs/version-1.26/usage/packages/arch.md create mode 100644 versioned_docs/version-1.26/usage/packages/cargo.md create mode 100644 versioned_docs/version-1.26/usage/packages/chef.md create mode 100644 versioned_docs/version-1.26/usage/packages/composer.md create mode 100644 versioned_docs/version-1.26/usage/packages/conan.md create mode 100644 versioned_docs/version-1.26/usage/packages/conda.md create mode 100644 versioned_docs/version-1.26/usage/packages/container.md create mode 100644 versioned_docs/version-1.26/usage/packages/cran.md create mode 100644 versioned_docs/version-1.26/usage/packages/debian.md create mode 100644 versioned_docs/version-1.26/usage/packages/generic.md create mode 100644 versioned_docs/version-1.26/usage/packages/go.md create mode 100644 versioned_docs/version-1.26/usage/packages/helm.md create mode 100644 versioned_docs/version-1.26/usage/packages/maven.md create mode 100644 versioned_docs/version-1.26/usage/packages/npm.md create mode 100644 versioned_docs/version-1.26/usage/packages/nuget.md create mode 100644 versioned_docs/version-1.26/usage/packages/overview.md create mode 100644 versioned_docs/version-1.26/usage/packages/pub.md create mode 100644 versioned_docs/version-1.26/usage/packages/pypi.md create mode 100644 versioned_docs/version-1.26/usage/packages/rpm.md create mode 100644 versioned_docs/version-1.26/usage/packages/rubygems.md create mode 100644 versioned_docs/version-1.26/usage/packages/storage.md create mode 100644 versioned_docs/version-1.26/usage/packages/swift.md create mode 100644 versioned_docs/version-1.26/usage/packages/terraform.md create mode 100644 versioned_docs/version-1.26/usage/packages/vagrant.md create mode 100644 versioned_docs/version-1.26/usage/repository/_category_.json create mode 100644 versioned_docs/version-1.26/usage/repository/blame.md create mode 100644 versioned_docs/version-1.26/usage/repository/clone-filter.md create mode 100644 versioned_docs/version-1.26/usage/repository/code-owners.md create mode 100644 versioned_docs/version-1.26/usage/repository/incoming-email.md create mode 100644 versioned_docs/version-1.26/usage/repository/markdown.md create mode 100644 versioned_docs/version-1.26/usage/repository/migration.md create mode 100644 versioned_docs/version-1.26/usage/repository/profile-readme.md create mode 100644 versioned_docs/version-1.26/usage/repository/push.md create mode 100644 versioned_docs/version-1.26/usage/repository/repo-mirror.md create mode 100644 versioned_docs/version-1.26/usage/repository/template-repositories.md create mode 100644 versioned_docs/version-1.26/usage/repository/webhooks.md create mode 100644 versioned_docs/version-1.26/usage/user-setting/_category_.json create mode 100644 versioned_docs/version-1.26/usage/user-setting/multi-factor-authentication.md create mode 100644 versioned_sidebars/version-1.26-sidebars.json diff --git a/docusaurus.config.js b/docusaurus.config.js index efba8cef..33894ff7 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -30,6 +30,10 @@ const apiConfig = [ { route: "/api/", spec: "static/swagger-25.json", + }, + { + route: "/api/1.26/", + spec: "static/swagger-26.json", }, { route: "/api/1.25/", @@ -65,14 +69,24 @@ const pageConfig = renderApiSSR const globalVariables = { "current": { - goVersion: "1.25", - minGoVersion: "1.25", + goVersion: "1.26", + minGoVersion: "1.26", minNodeVersion: "22", version: "main-nightly", sourceVersion: "main", sourceBranch: "main", dockerVersion: "nightly", - displayVersion: "1.26-dev", + displayVersion: "1.27-dev", + }, + "1.26": { + goVersion: "1.26", + minGoVersion: "1.26", + minNodeVersion: "22", + version: "1.26.0-rc0", + sourceVersion: "v1.26.0-rc0", + sourceBranch: "release/v1.26", + dockerVersion: "1.26.0-rc0", + displayVersion: "1.26.0-rc0", }, "1.25": { goVersion: "1.25", @@ -121,6 +135,9 @@ const versions = { label: globalVariables["current"].displayVersion, // path is kept as next for dev (so users can always find "nightly" docs) banner: "unreleased", }, + "1.26": { + label: globalVariables["1.26"].displayVersion, + }, "1.25": { label: globalVariables["1.25"].displayVersion, }, @@ -362,7 +379,7 @@ const config = { to: "/api/1.25/", label: "API", position: "left", - activeBaseRegex: "api/(1.22|1.23|1.24|1.25|next)/", + activeBaseRegex: "api/(1.22|1.23|1.24|1.25|1.26|next)/", }, { to: "/runner/0.2.11/", @@ -395,7 +412,8 @@ const config = { label: "API Version", position: "right", items: [ - { to: "/api/next/", label: "1.26-dev" }, + { to: "/api/next/", label: "1.27-dev" }, + { to: "/api/1.26/", label: "1.26.0-rc0" }, { to: "/api/1.25/", label: "1.25.5" }, { to: "/api/1.24/", label: "1.24.7" }, { to: "/api/1.23/", label: "1.23.8" }, diff --git a/i18n/en-us/docusaurus-plugin-content-docs/version-1.26.json b/i18n/en-us/docusaurus-plugin-content-docs/version-1.26.json new file mode 100644 index 00000000..46868db6 --- /dev/null +++ b/i18n/en-us/docusaurus-plugin-content-docs/version-1.26.json @@ -0,0 +1,8 @@ +{ + "sidebar.docs.category.actions": { + "message": "Actions" + }, + "sidebar.docs.category.packages": { + "message": "Packages" + } +} diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/actions/act-runner.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/actions/act-runner.mdx similarity index 100% rename from i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/actions/act-runner.md rename to i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/actions/act-runner.mdx diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/agit-support.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/issues-prs/agit.md similarity index 100% rename from i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/agit-support.md rename to i18n/zh-cn/docusaurus-plugin-content-docs/version-1.25/usage/issues-prs/agit.md diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26.json b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26.json new file mode 100644 index 00000000..2d74cbec --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26.json @@ -0,0 +1,29 @@ +{ + "sidebar.docs.category.Installation": { + "message": "安装" + }, + "sidebar.docs.category.Administration": { + "message": "管理" + }, + "sidebar.docs.category.Usage": { + "message": "使用" + }, + "sidebar.docs.category.actions": { + "message": "工作流" + }, + "sidebar.docs.category.packages": { + "message": "软件包" + }, + "sidebar.docs.category.Development": { + "message": "开发" + }, + "sidebar.docs.category.Contributing": { + "message": "贡献" + }, + "sidebar.docs.category.Help": { + "message": "帮助" + }, + "sidebar.docs.doc.What is Gitea?": { + "message": "Gitea是什么?" + } +} diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/_category_.json b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/_category_.json new file mode 100644 index 00000000..51635415 --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "运维", + "position": 30, + "link": { + "type": "generated-index", + "slug": "/administration", + "title": "运维" + } +} diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/adding-legal-pages.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/adding-legal-pages.md new file mode 100644 index 00000000..2649e795 --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/adding-legal-pages.md @@ -0,0 +1,34 @@ +--- +date: "2023-05-23T09:00:00+08:00" +slug: adding-legal-pages +sidebar_position: 110 + +aliases: + - /zh-cn/adding-legal-pages +--- + +# 添加法律页面 + +一些法域(例如欧盟)要求在网站上添加特定的法律页面(例如隐私政策)。按照以下步骤将它们添加到你的 Gitea 实例中。 + +## 获取页面 + +Gitea 源代码附带了示例页面,位于 `contrib/legal` 目录中。将它们复制到 `custom/public/assets/` 目录下。例如,如果要添加隐私政策: + +``` +wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample +``` + +现在,你需要编辑该页面以满足你的需求。特别是,你必须更改电子邮件地址、网址以及与 "Your Gitea Instance" 相关的引用,以匹配你的情况。 + +请务必不要放置会暗示 Gitea 项目对你的服务器负责的一般服务条款或隐私声明。 + +## 使其可见 + +创建或追加到 `/path/to/custom/templates/custom/extra_links_footer.tmpl` 文件中: + +```go +隐私政策 +``` + +重启 Gitea 以查看更改。 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/authentication.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/authentication.md new file mode 100644 index 00000000..c7fdd375 --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/authentication.md @@ -0,0 +1,301 @@ +--- +date: "2016-12-01T16:00:00+02:00" +slug: "authentication" +sidebar_position: 10 +aliases: + - /zh-cn/authentication +--- + +# 认证 + +## 轻量级目录访问协议(Lightweight Directory Access Protocol,LDAP) + +通过 BindDN 的 LDAP 和简单认证方式 LDAP 共享以下字段: + +- 认证名称 **(必选)** + + - 分配给新授权方法的名称。 + +- 主机名 **(必选)** + + - LDAP 服务的主机地址. + - 例如:`mydomain.com` + +- 端口号 **(必选)** + + - LDAP 服务的端口号. + - 例如: LDAP `389`/ LDAPs `636` + +- 安全协议 (可选) + + - 连接 LDAP 服务器时是否使用 TLS 协议。 + +- 管理员过滤规则 (可选) + + - 一个 LDAP 过滤器,用于指定哪些用户应该被赋予管理员特权。如果用户帐户符合过滤器条件,则该用户将被授予管理员权限。 + - 示例:`(objectClass=adminAccount)` + - 适用于 Microsoft Active Directory(AD)的示例:`memberOf=CN=admin-group,OU=example,DC=example,DC=org` + +- 用户名属性(可选) + + - 用户 LDAP 记录中包含用户名称的属性。在第一次成功登录后,将使用指定的属性值作为新的 Gitea 账户用户名。若留空,则使用登录表单上提供的用户名。 + - 当提供的登录名与多个属性匹配时,这一选项非常有用,但是只有一个特定属性应该用于 Gitea 账户名称,请参阅"用户过滤器"。 + - 示例:uid + - 适用于 Microsoft Active Directory(AD)的示例:`sAMAccountName` + +- 名字属性(可选) + + - 用户 LDAP 记录中包含用户名字的属性。将用于填充他们的账户信息。 + - 示例:givenName + +- 姓氏属性(可选) + + - 用户 LDAP 记录中包含用户姓氏的属性。将用于填充他们的账户信息。 + - 示例:`sn` + +- 电子邮件属性 **(必选)** + - 用户 LDAP 记录中包含用户电子邮件地址的属性。将用于填充他们的账户信息。 + - 示例:`mail` + +### LDAP(via BindDN) + +需要额外设置以下字段: + +- 绑定 DN (可选) + + - 搜索用户时绑定到 LDAP 服务器的 DN。这可以留空以执行匿名搜索。 + - 示例: `cn=Search,dc=mydomain,dc=com` + +- 绑定密码 (可选) + + - 上述指定的 Bind DN(绑定区别名)的密码,如果有的话。注意:该密码在服务器上使用 SECRET_KEY 进行加密存储。仍然建议确保 Bind DN 具有尽可能少的权限。 + +- 用户搜索基准 **(必选)** + + - 这是用于搜索用户帐户的 LDAP 基础路径. + - 示例: `ou=Users,dc=mydomain,dc=com` + +- 用户过滤规则 **(必选)** + - LDAP 过滤器声明如何查找试图进行身份验证的用户记录 + `%[1]s`匹配参数将替换为登录表单中给出的登录名 + - 示例: `(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))` + - 示例 for Microsoft Active Directory (AD): `(&(objectCategory=Person)(memberOf=CN=user-group,OU=example,DC=example,DC=org)(sAMAccountName=%s)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))` + - 如需多次替换,应使用 `%[1]s`,例如在将提供的登录名与多个属性(如用户标识符、电子邮件甚至电话号码)进行匹配时。 + - 示例: `(&(objectClass=Person)(|(uid=%[1]s)(mail=%[1]s)(mobile=%[1]s)))` +- 启用用户同步 + - 这个选项启用了一个周期性任务,用于将 Gitea 用户与 LDAP 服务器进行同步。默认的同步周期是每 24 小时, + 但您可以在 app.ini 文件中进行更改。 + 有关此部分的详细说明,请参阅[sample + app.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) + 的*cron.sync_external_users* 部分的注释。前面提到的*User Search Base*和*User Filter* + 设置将限制哪些用户可以使用 Gitea 以及哪些用户将被同步。 + 在初始运行任务时,将根据给定的设置创建所有与 LDAP 匹配的用户,因此在使用大型企业 LDAP 目录时需要小心。 + +### LDAP(simple auth) + +需要额外设置以下字段: + +- 用户 DN **(必选)** + + - 用作用户 DN 的模板。匹配参数 `%s` 将替换为登录表单中的登录名。 + - 示例: `cn=%s,ou=Users,dc=mydomain,dc=com` + - 示例: `uid=%s,ou=Users,dc=mydomain,dc=com` + +- 用户搜索基准 (可选) + + - 用户搜索基准声明哪些用户帐户将被搜索. + - 示例: `ou=Users,dc=mydomain,dc=com` + +- 用户过滤规则 **(必选)** + - LDAP 过滤器声明何时允许用户登录 + `%[1]s`匹配参数将替换为登录表单中给出的登录名。 + - 示例: `(&(objectClass=posixAccount)(|(cn=%[1]s)(mail=%[1]s)))` + - 示例: `(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))` + +### 使用 LDAP 验证分组成员 + +使用以下字段: + +- 群组搜索基础 DN(可选) + + - 组使用的 LDAP DN。 + - 示例: `ou=group,dc=mydomain,dc=com` + +- 组名过滤器 (可选) + + - LDAP 过滤器,声明如何在上述 DN 中查找有效组。 + - 示例: `(|(cn=gitea_users)(cn=admins))` + +- 组中的用户属性 (可选) + + - 组中列出了哪个用户的 LDAP 属性。 + - 示例: `uid` + +- 用户组属性 (可选) + - 哪个组的 LDAP 属性包含一个高于用户属性名称的数组。 + - 示例: `memberUid` + +## 可插拔式认证模块(Pluggable Authentication Module,PAM) + +这个过程启用了 PAM(Pluggable Authentication Modules)认证。用户仍然可以通过用户管理手动添加到系统中。 +PAM 提供了一种机制,通过对用户进行 PAM 认证来自动将其添加到当前数据库中。为了与普通的 Linux 密码一起使用, +运行 Gitea 的用户还必须具有对`/etc/shadow`的读取权限,以便在使用公钥登录时检查账户的有效性。 + +**注意**:如果用户已将 SSH 公钥添加到 Gitea 中,使用这些密钥可能会绕过登录检查系统。因此, +如果您希望禁用使用 PAM 进行身份验证的用户,应该在 Gitea 中手动禁用该账户,使用内置的用户管理功能。 + +1. 配置和安装准备. + - 建议您创建一个管理用户. + - 建议取消自动注册. +1. 一旦数据库已初始化完成,使用新创建的管理员账户登录. +1. 导航至用户设置(右上角的图标),然后选择 + `Site Administration` -> `Authentication Sources`, 并选择 + `Add Authentication Source`. +1. 填写字段如下: + - 认证类型:`PAM`。 + - 名称:任何有效的值都可以,如果您愿意,可以使用"System Authentication"。 + - PAM 服务名称:从/etc/pam.d/目录下选择适用于所需认证的正确文件[^1]。 + - PAM 电子邮件域:用户认证时要附加的电子邮件后缀。例如,如果登录系统期望一个名为 gituse 的用户, + 并且将此字段设置为 mail.com,那么 Gitea 在验证一个 GIT 实例的用户时将期望 user emai 字段为gituser@mail.com[^2]。 + +**Note**: PAM 支持通过[build-time flags](installation/from-source.md#build)添加, +而官方提供的二进制文件通常不会默认启用此功能。PAM 需要确保系统上有必要的 libpam 动态库,并且编译器可以访问必要的 PAM 开发头文件。 + +[^1]: + 例如,在 Debian "Bullseye"上使用标准 Linux 登录,可以使用`common-session-noninteractive`。这个值对于其他版本的 Debian, + 包括 Ubuntu 和 Mint,可能也是有效的,请查阅您所使用发行版的文档以确认。 + +[^2]: **PAM 的必选项** 请注意:在上面的示例中,用户将作为`gituser`而不是`gituser@mail.com`登录到 Gitea 的 Web 界面。 + +## 简单邮件传输协议(Simple Mail Transfer Protocol,SMTP) + +此选项允许 Gitea 以 Gitea 用户身份登录 SMTP 主机。请设置以下字段: + +- 身份验证名称 **(必选)** + + - 分配给新授权方法的名称 + +- SMTP 验证类型 **(必选)** + + - 用于连接 SMTP 主机的验证类型,plain 或 login + +- 主机名 **(必选)** + + - SMTP 服务的主机地址 + - 例如:`smtp.mydomain.com` + +- 端口号 **(必选)** + + - SMTP 服务的端口号 + - 例如: `587` + +- 允许的域名 + + - 如果使用公共 SMTP 主机或有多个域的 SMTP 主机,限制哪些域可以登录 + 限制哪些域可以登录。 + - 示例: `gitea.com,mydomain.com,mydomain2.com` + +- 强制使用 SMTPS + - 默认情况下将使用 SMTPS 连接到端口 465.如果您希望将 smtp 用于其他端口,自行设置 + - 否则,如果服务器提供' STARTTLS '扩展名,则将使用此扩展名 +- 跳过 TLS 验证 + - 禁用 TLS 验证身份. +- 该认证源处于激活状态 + - 启用或禁用此身份验证源 + +## FreeIPA + +- 要使用 FreeIPA 凭据登录 Gitea,需要为 Gitea 创建一个绑定帐户。 + 创建一个绑定帐户: +- 在 FreeIPA 服务器上创建一个 gitea.ldif 文件,并将`dc=example,dc=com`替换为您的`dn`,然后提供一个适当安全的密码。 + + ```sh + dn: uid=gitea,cn=sysaccounts,cn=etc,dc=example,dc=com + changetype: add + objectclass: account + objectclass: simplesecurityobject + uid: gitea + userPassword: secure password + passwordExpirationTime: 20380119031407Z + nsIdleTimeout: 0 + ``` + +- 导入 LDIF 文件(如果需要,请将 localhost 更改为 IPA 服务器)。系统会提示您输入 Directory Manager 的密码。: + + ```sh + ldapmodify -h localhost -p 389 -x -D \ + "cn=Directory Manager" -W -f gitea.ldif + ``` + +- 为`gitea_users`添加 IPA 组: + + ```sh + ipa group-add --desc="Gitea Users" gitea_users + ``` + +- **提示**:对于 IPA 凭证错误,运行' kinit admin '并提供域管理帐户密码. +- 以管理员身份登录 Gitea,点击 Admin Panel 下的`Authentication`。然后单击`Add New Source`并填写详细信息,更改所有适当的地方。 + +## SPNEGO with SSPI (Kerberos/NTLM, for Windows only) + +Gitea 支持通过 Windows 内置的安全支持提供程序接口(Security Support Provider Interface,SSPI)实现 SPNEGO 单点登录认证(由 RFC4559 定义的方案),用于服务器的 Web 部分。SSPI 仅在 Windows 环境中工作,即当服务器和客户端都在 Windows 操作系统上运行时。 + +在激活 SSPI 单点登录认证(SSO)之前,您需要准备您的环境: + +- 在 Active Directory 中创建一个单独的用户账户,gitea.exe 进程将在该账户下运行(例如,在 domain.local 域下创建一个名为 user 的账户: +- 为运行 gitea.exe 的主机创建一个服务主体名称(Service Principal Name,SPN),其类别为 HTTP: + + - 以特权域用户(例如域管理员)的身份启动“命令提示符”或“PowerShell”。 + - 运行下面的命令,将 host.domain.local 替换为 Web 应用程序将运行的服务器的完全限定域名(FQDN),将 domain\user 替换为在前一步中创建的账户名称: + + ```sh + setspn -A HTTP/host.domain.local domain\user + ``` + +在遵循上述步骤之前,请确保您按照以下流程进行操作: + +1. 用之前创建的用户登录(如果已经登录,请先注销)。 +2. 确保在`custom/conf/app.ini`文件的`[server]`部分中,`ROOT_URL`设置为 Web 应用程序将运行的服务器的完全限定域名(FQDN),与之前创建服务主体名称时使用的一致(例如,`host.domain.local`)。 +3. 启动 Web 服务器(运行 `gitea.exe web`)。 +4. 在 `Site Administration -> Authentication Sources` 中添加一个 `SPNEGO with SSPI` 认证源,以启用 SSPI 认证。 +5. 在域中的客户端计算机上,使用任何域用户登录(与运行`gitea.exe`的服务器不同)。 +6. 如果您使用 Chrome 或 Edge 浏览器,请将 Web 应用程序的 URL 添加到“本地站点”(`Internet选项 -> 安全 -> 本地站点 -> 站点`)。 +7. 启动 Chrome 或 Edge 浏览器,导航到 Gitea 的 FQDN URL(例如,`http://host.domain.local:3000`)。 +8. 在控制面板中点击“Sign In”按钮,然后选择 SSPI,将会自动使用当前登录到计算机的用户进行登录。 +9. 如果无法正常工作,请确保: + - 您不是在运行`gitea.exe`的同一台服务器上运行 Web 浏览器。应该在与服务器不同的域加入计算机(客户端)上运行 Web 浏览器。如果客户端和服务器都在同一台计算机上运行,则 NTLM 将优先于 Kerberos。 + - 主机上只有一个`HTTP/...`的 SPN。 + - SPN 中只包含主机名,不包含端口号。 + - 将 Web 应用程序的 URL 添加到"本地站点"。 + - 服务器和客户端的时钟差异不超过 5 分钟(取决于组策略)。 + - 在 Internet Explorer 中启用了"集成 Windows 身份验证"(在"高级设置"下)。 + +遵循这些步骤,您应该能够成功启用和使用 SSPI 单点登录认证(SSO)。 + +## 反向代理认证 + +Gitea 支持通过读取反向代理传递的 HTTP 头中的登录名或者 email 地址来支持反向代理来认证。默认是不启用的,你可以用以下配置启用。 + +```ini +[service] +ENABLE_REVERSE_PROXY_AUTHENTICATION = true +``` + +默认的登录用户名的 HTTP 头是 `X-WEBAUTH-USER`,你可以通过修改 `REVERSE_PROXY_AUTHENTICATION_USER` 来变更它。如果用户不存在,可以自动创建用户,当然你需要修改 `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION=true` 来启用它。 + +默认的登录用户 Email 的 HTTP 头是 `X-WEBAUTH-EMAIL`,你可以通过修改 `REVERSE_PROXY_AUTHENTICATION_EMAIL` 来变更它。如果用户不存在,可以自动创建用户,当然你需要修改 `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION=true` 来启用它。你也可以通过修改 `ENABLE_REVERSE_PROXY_EMAIL` 来启用或停用这个 HTTP 头。 + +如果设置了 `ENABLE_REVERSE_PROXY_FULL_NAME=true`,则用户的全名会从 `X-WEBAUTH-FULLNAME` 读取,这样在自动创建用户时将使用这个字段作为用户全名,你也可以通过修改 `REVERSE_PROXY_AUTHENTICATION_FULL_NAME` 来变更 HTTP 头。 + +你也可以通过修改 `REVERSE_PROXY_TRUSTED_PROXIES` 来设置反向代理的 IP 地址范围,加强安全性,默认值是 `127.0.0.0/8,::1/128`。 通过 `REVERSE_PROXY_LIMIT`, 可以设置最多信任几级反向代理。 + +你可以通过以下配置为 API 启用此认证方法: + +```ini +[service] +ENABLE_REVERSE_PROXY_AUTHENTICATION_API = true +``` + +:::note +当此方法用于 API 时,反向代理负责处理 CSRF 保护。 +::: diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/backup-and-restore.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/backup-and-restore.md new file mode 100644 index 00000000..2382c97d --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/backup-and-restore.md @@ -0,0 +1,146 @@ +--- +date: "2018-06-06T09:33:00+08:00" +slug: "backup-and-restore" +sidebar_position: 11 + +aliases: + - /zh-cn/backup-and-restore +--- + +# 备份与恢复 + +Gitea 已经实现了 `dump` 命令可以用来备份所有需要的文件到一个 zip 压缩文件。该压缩文件可以被用来进行数据恢复。 + +## 备份一致性 + +为了确保 Gitea 实例的一致性,在备份期间必须关闭它。 + +Gitea 包括数据库、文件和 Git 仓库,当它被使用时所有这些都会发生变化。例如,当迁移正在进行时,在数据库中创建一个事务,而 Git 仓库正在被复制。如果备份发生在迁移的中间,Git 仓库可能是不完整的,尽管数据库声称它是完整的,因为它是在之后被转储的。避免这种竞争条件的唯一方法是在备份期间停止 Gitea 实例。 + +## 备份命令 (`dump`) + +先转到 git 用户的权限: `su git`. 再 Gitea 目录运行 `./gitea dump`。一般会显示类似如下的输出: + +``` +2016/12/27 22:32:09 Creating tmp work dir: /tmp/gitea-dump-417443001 +2016/12/27 22:32:09 Dumping local repositories.../home/git/repositories +2016/12/27 22:32:22 Dumping database... +2016/12/27 22:32:22 Packing dump files... +2016/12/27 22:32:34 Removing tmp work dir: /tmp/gitea-dump-417443001 +2016/12/27 22:32:34 Finish dumping in file gitea-dump-1482906742.zip +``` + +最后生成的 `gitea-dump-1482906742.zip` 文件将会包含如下内容: + +- `app.ini` - 如果原先存储在默认的 custom/ 目录之外,则是配置文件的可选副本 +- `custom/` - 所有保存在 `custom/` 目录下的配置和自定义的文件。 +- `data/` - 数据目录(APP_DATA_PATH),如果使用文件会话,则不包括会话。该目录包括 `attachments`、`avatars`、`lfs`、`indexers`、如果使用 SQLite 则包括 SQLite 文件。 +- `repos/` - 仓库目录的完整副本。 +- `gitea-db.sql` - 数据库 dump 出来的 SQL。 +- `log/` - Logs 文件,如果用作迁移不是必须的。 + +中间备份文件将会在临时目录进行创建,如果您要重新指定临时目录,可以用 `--tempdir` 参数,或者用 `TMPDIR` 环境变量。 + +## 备份数据库 + +`gitea dump` 创建的 SQL 转储使用 XORM,Gitea 管理员可能更喜欢使用本地的 MySQL 和 PostgreSQL 转储工具。使用 XORM 转储数据库时仍然存在一些问题,可能会导致在尝试恢复时出现问题。 + +```sh +# mysql +mysqldump -u$USER -p$PASS --databases $DATABASE > gitea-db.sql +# postgres +pg_dump -U $USER $DATABASE > gitea-db.sql +``` + +### 使用 Docker (`dump`) + +在使用 Docker 时,使用 `dump` 命令有一些注意事项。 + +必须以 `gitea/conf/app.ini` 中指定的 `RUN_USER = ` 执行该命令;并且,为了让备份文件夹的压缩过程能够顺利执行,`docker exec` 命令必须在 `--tempdir` 内部执行。 + +示例: + +```none +docker exec -u -it -w <--tempdir> $(docker ps -qf 'name=^$') bash -c '/usr/local/bin/gitea dump -c ' +``` + +\*注意:`--tempdir` 指的是 Gitea 使用的 Docker 环境的临时目录;如果您没有指定自定义的 `--tempdir`,那么 Gitea 将使用 `/tmp` 或 Docker 容器的 `TMPDIR` 环境变量。对于 `--tempdir`,请相应调整您的 `docker exec` 命令选项。 + +结果应该是一个文件,存储在指定的 `--tempdir` 中,类似于:`gitea-dump-1482906742.zip` + +## 恢复命令 (`restore`) + +当前还没有恢复命令,恢复需要人工进行。主要是把文件和数据库进行恢复。 + +例如: + +```sh +unzip gitea-dump-1610949662.zip +cd gitea-dump-1610949662 +mv app.ini /etc/gitea/conf/app.ini +mv data/* /var/lib/gitea/data/ +mv log/* /var/lib/gitea/log/ +mv repos/* /var/lib/gitea/repositories/ +chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea + +# mysql +mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE Docker),或者 Gitea 安装到了与之前安装不同的目录,则需要重新生成仓库 Git 钩子。 + +在 Gitea 运行时,并从 Gitea 二进制文件所在的目录执行:`./gitea admin regenerate hooks` + +这样可以确保仓库 Git 钩子中的应用程序和配置文件路径与当前安装一致。如果这些路径没有更新,仓库的 `push` 操作将失败。 + +### 使用 Docker (`restore`) + +在基于 Docker 的 Gitea 实例中,也没有恢复命令的支持。恢复过程与前面描述的步骤相同,但路径不同。 + +示例: + +```sh +# 在容器中打开 bash 会话 +docker exec --user git -it 2a83b293548e bash +# 在容器内解压您的备份文件 +unzip gitea-dump-1610949662.zip +cd gitea-dump-1610949662 +# 恢复 Gitea 数据 +mv data/* /data/gitea +# 恢复仓库本身 +mv repos/* /data/git/repositories/ +# 调整文件权限 +chown -R git:git /data +# 重新生成 Git 钩子 +/usr/local/bin/gitea -c '/data/gitea/conf/app.ini' admin regenerate hooks +``` + +Gitea 容器中的默认用户是 `git`(1000:1000)。请用您的 Gitea 容器 ID 或名称替换 `2a83b293548e`。 + +### 使用 Docker-rootless (`restore`) + +在 Docker-rootless 容器中的恢复工作流程只是要使用的目录不同: + +```sh +# 在容器中打开 bash 会话 +docker exec --user git -it 2a83b293548e bash +# 在容器内解压您的备份文件 +unzip gitea-dump-1610949662.zip +cd gitea-dump-1610949662 +# 恢复 app.ini +mv data/conf/app.ini /etc/gitea/app.ini +# 恢复 Gitea 数据 +mv data/* /var/lib/gitea +# 恢复仓库本身 +mv repos/* /var/lib/gitea/git/repositories +# 调整文件权限 +chown -R git:git /etc/gitea/app.ini /var/lib/gitea +# 重新生成 Git 钩子 +/usr/local/bin/gitea -c '/etc/gitea/app.ini' admin regenerate hooks +``` diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/cmd-embedded.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/cmd-embedded.md new file mode 100644 index 00000000..a2d2dc7e --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/cmd-embedded.md @@ -0,0 +1,93 @@ +--- +date: "2023-05-23T09:00:00+08:00" +slug: "cmd-embedded" +sidebar_position: 20 + +aliases: + - /zh-cn/cmd-embedded +--- + +# 嵌入资源提取工具 + +Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置](../administration/customizing-gitea.md))。 + +要获取嵌入资源的副本以进行编辑,可以使用 CLI 中的 `embedded` 命令,通过操作系统的 shell 执行。 + +**注意:** 嵌入资源提取工具包含在 Gitea 1.12 及以上版本中。 + +## 资源列表 + +要列出嵌入在 Gitea 可执行文件中的资源,请使用以下语法: + +```sh +gitea embedded list [--include-vendored] [patterns...] +``` + +`--include-vendored` 标志使命令包括被供应的文件,这些文件通常被排除在外;即来自外部库的文件,这些文件是 Gitea 所需的(例如 [octicons](https://octicons.github.com/) 等)。 + +可以提供一系列文件搜索模式。Gitea 使用 [gobwas/glob](https://github.com/gobwas/glob) 作为其 glob 语法。以下是一些示例: + +- 列出所有模板文件,无论在哪个虚拟目录下:`**.tmpl` +- 列出所有邮件模板文件:`templates/mail/**.tmpl` + 列出 `public/assets/img` 目录下的所有文件:`public/assets/img/**` + +不要忘记为模式使用引号,因为空格、`*` 和其他字符可能对命令行解释器有特殊含义。 + +如果未提供模式,则列出所有文件。 + +### 示例:列出所有嵌入文件 + +列出所有路径中包含 `openid` 的嵌入文件: + +```sh +$ gitea embedded list '**openid**' +public/assets/img/auth/openid_connect.svg +public/assets/img/openid-16x16.png +templates/user/auth/finalize_openid.tmpl +templates/user/auth/signin_openid.tmpl +templates/user/auth/signup_openid_connect.tmpl +templates/user/auth/signup_openid_navbar.tmpl +templates/user/auth/signup_openid_register.tmpl +templates/user/settings/security_openid.tmpl +``` + +## 提取资源 + +要提取嵌入在 Gitea 可执行文件中的资源,请使用以下语法: + +```sh +gitea [--config {file}] embedded extract [--destination {dir}|--custom] [--overwrite|--rename] [--include-vendored] {patterns...} +``` + +`--config` 选项用于告知 Gitea `app.ini` 配置文件的位置(如果不在默认位置)。此选项仅在使用 `--custom` 标志时使用。 + +`--destination` 选项用于指定提取文件的目标目录。默认为当前目录。 + +`--custom` 标志告知 Gitea 直接将文件提取到 `custom` 目录中。为使其正常工作,该命令需要知道 `app.ini` 配置文件的位置(通过 `--config` 指定),并且根据配置的不同,需要从 Gitea 通常启动的目录运行。有关详细信息,请参阅 [自定义 Gitea 配置](../administration/customizing-gitea.md)。 + +`--overwrite` 标志允许覆盖目标目录中的任何现有文件。 + +`--rename` 标志告知 Gitea 将目标目录中的任何现有文件重命名为 `filename.bak`。之前的 `.bak` 文件将被覆盖。 + +至少需要提供一个文件搜索模式;有关模式的语法和示例,请参阅上述 `list` 子命令。 + +### 重要提示 + +请确保**只提取需要自定义的文件**。位于 `custom` 目录中的文件不会受到 Gitea 的升级过程的影响。当 Gitea 升级到新版本(通过替换可执行文件)时,许多嵌入文件将发生变化。Gitea 将尊重并使用在 `custom` 目录中找到的任何文件,即使这些文件是旧的和不兼容的。 + +### 示例:提取邮件模板 + +将邮件模板提取到临时目录: + +```sh +$ mkdir tempdir +$ gitea embedded extract --destination tempdir 'templates/mail/**.tmpl' +Extracting to tempdir: +tempdir/templates/mail/auth/activate.tmpl +tempdir/templates/mail/auth/activate_email.tmpl +tempdir/templates/mail/auth/register_notify.tmpl +tempdir/templates/mail/auth/reset_passwd.tmpl +tempdir/templates/mail/issue/assigned.tmpl +tempdir/templates/mail/issue/default.tmpl +tempdir/templates/mail/notify/collaborator.tmpl +``` diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/command-line.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/command-line.md new file mode 100644 index 00000000..e7a563cb --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/command-line.md @@ -0,0 +1,534 @@ +--- +date: "2023-05-23T09:00:00+08:00" +slug: "command-line" +sidebar_position: 1 + +aliases: + - /zh-cn/command-line +--- + +# 命令行 + +## 用法 + +`gitea [全局选项] 命令 [命令或全局选项] [参数...]` + +## 全局选项 + +所有全局选项均可被放置在命令级别。 + +- `--help`,`-h`:显示帮助文本并退出。可选。 +- `--version`,`-v`:显示版本信息并退出。可选。 (示例:`Gitea version 1.1.0+218-g7b907ed built with: bindata, sqlite`)。 +- `--custom-path path`,`-C path`:Gitea 自定义文件夹的路径。可选。 (默认值:`AppWorkPath`/custom 或 `$GITEA_CUSTOM`)。 +- `--config path`,`-c path`:Gitea 配置文件的路径。可选。 (默认值:`custom`/conf/app.ini)。 +- `--work-path path`,`-w path`:Gitea 的 `AppWorkPath`。可选。 (默认值:LOCATION_OF_GITEA_BINARY 或 `$GITEA_WORK_DIR`) + +注意:默认的 custom-path、config 和 work-path 也可以在构建时更改(如果需要)。 + +## 命令 + +### web + +启动服务器: + +- 选项: + - `--port number`,`-p number`:端口号。可选。 (默认值:3000)。覆盖配置文件中的设置。 + - `--install-port number`:运行安装页面的端口号。可选。 (默认值:3000)。覆盖配置文件中的设置。 + - `--pid path`,`-P path`:Pid 文件的路径。可选。 + - `--quiet`,`-q`:只在控制台上输出 Fatal 日志,用于在设置日志之前发出的日志。 + - `--verbose`:在控制台上输出跟踪日志,用于在设置日志之前发出的日志。 +- 示例: + - `gitea web` + - `gitea web --port 80` + - `gitea web --config /etc/gitea.ini --pid /some/custom/gitea.pid` +- 注意: + - Gitea 不应以 root 用户身份运行。要绑定到低于 1024 的端口,您可以在 Linux 上使用 setcap 命令:`sudo setcap 'cap_net_bind_service=+ep' /path/to/gitea`。每次更新 Gitea 都需要重新执行此操作。 + +### admin + +管理员操作: + +- 命令: + - `user`: + - `list`: + - 选项: + - `--admin`:仅列出管理员用户。可选。 + - 描述:列出所有现有用户。 + - 示例: + - `gitea admin user list` + - `delete`: + - 选项: + - `--email`:要删除的用户的电子邮件。 + - `--username`:要删除的用户的用户名。 + - `--id`:要删除的用户的 ID。 + - 必须提供 `--id`、`--username` 或 `--email` 中的一个。如果提供多个,则所有条件必须匹配。 + - 示例: + - `gitea admin user delete --id 1` + - `create`: + - 选项: + - `--name value`:用户名。必填。自 Gitea 1.9.0 版本起,请改用 `--username` 标志。 + - `--username value`:用户名。必填。Gitea 1.9.0 新增。 + - `--password value`:密码。必填。 + - `--email value`:邮箱。必填。 + - `--admin`:如果提供此选项,将创建一个管理员用户。可选。 + - `--access-token`:如果提供,将为用户创建访问令牌。可选。(默认值:false)。 + - `--must-change-password`:如果提供,创建的用户将在初始登录后需要选择一个新密码。可选。(默认值:true)。 + - `--random-password`:如果提供,将使用随机生成的密码作为创建用户的密码。`--password` 的值将被忽略。可选。 + - `--random-password-length`:如果提供,将用于配置随机生成密码的长度。可选。(默认值:12) + - 示例: + - `gitea admin user create --username myname --password asecurepassword --email me@example.com` + - `change-password`: + - 选项: + - `--username value`,`-u value`:用户名。必填。 + - `--password value`,`-p value`:新密码。必填。 + - 示例: + - `gitea admin user change-password --username myname --password asecurepassword` + - `must-change-password`: + - 参数: + - `[username...]`:需要更改密码的用户 + - 选项: + - `--all`,`-A`:强制所有用户更改密码 + - `--exclude username`,`-e username`:排除给定的用户。可以多次设置。 + - `--unset`:撤销对给定用户的强制密码更改 + - `regenerate`: + - 选项: + - `hooks`:重新生成所有仓库的 Git Hooks。 + - `keys`:重新生成 authorized_keys 文件。 + - 示例: + - `gitea admin regenerate hooks` + - `gitea admin regenerate keys` + - `auth`: + - `list`: + - 描述:列出所有存在的外部认证源。 + - 示例: + - `gitea admin auth list` + - `delete`: + - 选项: + - `--id`:要删除的源的 ID。必填。 + - 示例: + - `gitea admin auth delete --id 1` + - `add-oauth`: + - 选项: + - `--name`:应用程序名称。 + - `--provider`:OAuth2 提供者。 + - `--key`:客户端 ID(Key)。 + - `--secret`:客户端密钥。 + - `--auto-discover-url`:OpenID Connect 自动发现 URL(仅在使用 OpenID Connect 作为提供程序时需要)。 + - `--use-custom-urls`:在 GitLab/GitHub OAuth 端点上使用自定义 URL。 + - `--custom-tenant-id`:在 OAuth 端点上使用自定义租户 ID。 + - `--custom-auth-url`:使用自定义授权 URL(GitLab/GitHub 的选项)。 + - `--custom-token-url`:使用自定义令牌 URL(GitLab/GitHub 的选项)。 + - `--custom-profile-url`:使用自定义配置文件 URL(GitLab/GitHub 的选项)。 + - `--custom-email-url`:使用自定义电子邮件 URL(GitHub 的选项)。 + - `--icon-url`:OAuth2 登录源的自定义图标 URL。 + - `--skip-local-2fa`:允许源覆盖本地 2FA。(可选) + - `--scopes`:请求此 OAuth2 源的附加范围。(可选) + - `--required-claim-name`:必须设置的声明名称,以允许用户使用此源登录。(可选) + - `--required-claim-value`:必须设置的声明值,以允许用户使用此源登录。(可选) + - `--group-claim-name`:提供此源的组名的声明名称。(可选) + - `--admin-group`:管理员用户的组声明值。(可选) + - `--restricted-group`:受限用户的组声明值。(可选) + - `--group-team-map`:组与组织团队之间的 JSON 映射。(可选) + - `--group-team-map-removal`:根据组自动激活团队成员资格的删除。(可选) + - 示例: + - `gitea admin auth add-oauth --name external-github --provider github --key OBTAIN_FROM_SOURCE --secret OBTAIN_FROM_SOURCE` + - `update-oauth`: + - 选项: + - `--id`:要更新的源的 ID。必填。 + - `--name`:应用程序名称。 + - `--provider`:OAuth2 提供者。 + - `--key`:客户端 ID(Key)。 + - `--secret`:客户端密钥。 + - `--auto-discover-url`:OpenID Connect 自动发现 URL(仅在使用 OpenID Connect 作为提供程序时需要)。 + - `--use-custom-urls`:在 GitLab/GitHub OAuth 端点上使用自定义 URL。 + - `--custom-tenant-id`:在 OAuth 端点上使用自定义租户 ID。 + - `--custom-auth-url`:使用自定义授权 URL(GitLab/GitHub 的选项)。 + - `--custom-token-url`:使用自定义令牌 URL(GitLab/GitHub 的选项)。 + - `--custom-profile-url`:使用自定义配置文件 URL(GitLab/GitHub 的选项)。 + - `--custom-email-url`:使用自定义电子邮件 URL(GitHub 的选项)。 + - `--icon-url`:OAuth2 登录源的自定义图标 URL。 + - `--skip-local-2fa`:允许源覆盖本地 2FA。(可选) + - `--scopes`:请求此 OAuth2 源的附加范围。 + - `--required-claim-name`:必须设置的声明名称,以允许用户使用此源登录。(可选) + - `--required-claim-value`:必须设置的声明值,以允许用户使用此源登录。(可选) + - `--group-claim-name`:提供此源的组名的声明名称。(可选) + - `--admin-group`:管理员用户的组声明值。(可选) + - `--restricted-group`:受限用户的组声明值。(可选) + - 示例: + - `gitea admin auth update-oauth --id 1 --name external-github-updated` + - `add-smtp`: + - 选项: + - `--name`:应用程序名称。必填。 + - `--auth-type`:SMTP 认证类型(PLAIN/LOGIN/CRAM-MD5)。默认为 PLAIN。 + - `--host`:SMTP 主机。必填。 + - `--port`:SMTP 端口。必填。 + - `--force-smtps`:SMTPS 始终在端口 465 上使用。设置此选项以强制在其他端口上使用 SMTPS。 + - `--skip-verify`:跳过 TLS 验证。 + - `--helo-hostname`:发送 HELO 时使用的主机名。留空以发送当前主机名。 + - `--disable-helo`:禁用 SMTP helo。 + - `--allowed-domains`:留空以允许所有域。使用逗号(',')分隔多个域。 + - `--skip-local-2fa`:跳过 2FA 登录。 + - `--active`:启用此认证源。 + 备注: + `--force-smtps`、`--skip-verify`、`--disable-helo`、`--skip-local-2fs` 和 `--active` 选项可以采用以下形式使用: + - `--option`、`--option=true` 以启用选项 + - `--option=false` 以禁用选项 + 如果未指定这些选项,则在 `update-smtp` 中不会更改值,或者在 `add-smtp` 中将使用默认的 `false` 值。 + - 示例: + - `gitea admin auth add-smtp --name ldap --host smtp.mydomain.org --port 587 --skip-verify --active` + - `update-smtp`: + - 选项: + - `--id`:要更新的源的 ID。必填。 + - 其他选项与 `add-smtp` 共享 + - 示例: + - `gitea admin auth update-smtp --id 1 --host smtp.mydomain.org --port 587 --skip-verify=false` + - `gitea admin auth update-smtp --id 1 --active=false` + - `add-ldap`:添加新的 LDAP(通过 Bind DN)认证源 + - 选项: + - `--name value`:认证名称。必填。 + - `--not-active`:停用认证源。 + - `--security-protocol value`:安全协议名称。必填。 + - `--skip-tls-verify`:禁用 TLS 验证。 + - `--host value`:LDAP 服务器的地址。必填。 + - `--port value`:连接到 LDAP 服务器时使用的端口。必填。 + - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。必填。 + - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。 + - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 + - `--restricted-filter value`:指定是否应将用户设置为受限状态的 LDAP 过滤器。 + - `--username-attribute value`:用户 LDAP 记录中包含用户名的属性。 + - `--firstname-attribute value`:用户 LDAP 记录中包含用户名字的属性。 + - `--surname-attribute value`:用户 LDAP 记录中包含用户姓氏的属性。 + - `--email-attribute value`:用户 LDAP 记录中包含用户电子邮件地址的属性。必填。 + - `--public-ssh-key-attribute value`:用户 LDAP 记录中包含用户公共 SSH 密钥的属性。 + - `--avatar-attribute value`:用户 LDAP 记录中包含用户头像的属性。 + - `--bind-dn value`:在搜索用户时绑定到 LDAP 服务器的 DN。 + - `--bind-password value`:绑定 DN 的密码(如果有)。 + - `--attributes-in-bind`:在绑定 DN 上下文中获取属性。 + - `--synchronize-users`:启用用户同步。 + - `--page-size value`:搜索页面大小。 + - 示例: + - `gitea admin auth add-ldap --name ldap --security-protocol unencrypted --host mydomain.org --port 389 --user-search-base "ou=Users,dc=mydomain,dc=org" --user-filter "(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" --email-attribute mail` + - `update-ldap`:更新现有的 LDAP(通过 Bind DN)认证源 + - 选项: + - `--id value`:认证源的 ID。必填。 + - `--name value`:认证名称。 + - `--not-active`:停用认证源。 + - `--security-protocol value`:安全协议名称。 + - `--skip-tls-verify`:禁用 TLS 验证。 + - `--host value`:LDAP 服务器的地址。 + - `--port value`:连接到 LDAP 服务器时使用的端口。 + - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。 + - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。 + - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 + - `--restricted-filter value`:指定是否应将用户设置为受限状态的 LDAP 过滤器。 + - `--username-attribute value`:用户 LDAP 记录中包含用户名的属性。 + - `--firstname-attribute value`:用户 LDAP 记录中包含用户名字的属性。 + - `--surname-attribute value`:用户 LDAP 记录中包含用户姓氏的属性。 + - `--email-attribute value`:用户 LDAP 记录中包含用户电子邮件地址的属性。 + - `--public-ssh-key-attribute value`:用户 LDAP 记录中包含用户公共 SSH 密钥的属性。 + - `--avatar-attribute value`:用户 LDAP 记录中包含用户头像的属性。 + - `--bind-dn value`:在搜索用户时绑定到 LDAP 服务器的 DN。 + - `--bind-password value`:绑定 DN 的密码(如果有)。 + - `--attributes-in-bind`:在绑定 DN 上下文中获取属性。 + - `--synchronize-users`:启用用户同步。 + - `--page-size value`:搜索页面大小。 + - 示例: + - `gitea admin auth update-ldap --id 1 --name "my ldap auth source"` + - `gitea admin auth update-ldap --id 1 --username-attribute uid --firstname-attribute givenName --surname-attribute sn` + - `add-ldap-simple`:添加新的 LDAP(简单身份验证)认证源 + - 选项: + - `--name value`:认证名称。必填。 + - `--not-active`:停用认证源。 + - `--security-protocol value`:安全协议名称。必填。 + - `--skip-tls-verify`:禁用 TLS 验证。 + - `--host value`:LDAP 服务器的地址。必填。 + - `--port value`:连接到 LDAP 服务器时使用的端口。必填。 + - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。 + - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。 + - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 + - `--restricted-filter value`:指定是否应将用户设置为受限状态的 LDAP 过滤器。 + - `--username-attribute value`:用户 LDAP 记录中包含用户名的属性。 + - `--firstname-attribute value`:用户 LDAP 记录中包含用户名字的属性。 + - `--surname-attribute value`:用户 LDAP 记录中包含用户姓氏的属性。 + - `--email-attribute value`:用户 LDAP 记录中包含用户电子邮件地址的属性。必填。 + - `--public-ssh-key-attribute value`:用户 LDAP 记录中包含用户公共 SSH 密钥的属性。 + - `--avatar-attribute value`:用户 LDAP 记录中包含用户头像的属性。 + - `--user-dn value`:用户的 DN。必填。 + - 示例: + - `gitea admin auth add-ldap-simple --name ldap --security-protocol unencrypted --host mydomain.org --port 389 --user-dn "cn=%s,ou=Users,dc=mydomain,dc=org" --user-filter "(&(objectClass=posixAccount)(cn=%s))" --email-attribute mail` + - `update-ldap-simple`:更新现有的 LDAP(简单身份验证)认证源 + - 选项: + - `--id value`:认证源的 ID。必填。 + - `--name value`:认证名称。 + - `--not-active`:停用认证源。 + - `--security-protocol value`:安全协议名称。 + - `--skip-tls-verify`:禁用 TLS 验证。 + - `--host value`:LDAP 服务器的地址。 + - `--port value`:连接到 LDAP 服务器时使用的端口。 + - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。 + - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。 + - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 + - `--restricted-filter value`:指定是否应将用户设置为受限状态的 LDAP 过滤器。 + - `--username-attribute value`:用户 LDAP 记录中包含用户名的属性。 + - `--firstname-attribute value`:用户 LDAP 记录中包含用户名字的属性。 + - `--surname-attribute value`:用户 LDAP 记录中包含用户姓氏的属性。 + - `--email-attribute value`:用户 LDAP 记录中包含用户电子邮件地址的属性。 + - `--public-ssh-key-attribute value`:用户 LDAP 记录中包含用户公共 SSH 密钥的属性。 + - `--avatar-attribute value`:用户 LDAP 记录中包含用户头像的属性。 + - `--user-dn value`:用户的 DN。 + - 示例: + - `gitea admin auth update-ldap-simple --id 1 --name "my ldap auth source"` + - `gitea admin auth update-ldap-simple --id 1 --username-attribute uid --firstname-attribute givenName --surname-attribute sn` + +### cert + +生成自签名的 SSL 证书。将输出到当前目录下的`cert.pem`和`key.pem`文件中,并且会覆盖任何现有文件。 + +- 选项: + - `--host value`:逗号分隔的主机名和 IP 地址列表,此证书适用于这些主机。支持使用通配符。必填。 + - `--ecdsa-curve value`:用于生成密钥的 ECDSA 曲线。可选。有效选项为 P224、P256、P384、P521。 + - `--rsa-bits value`:要生成的 RSA 密钥的大小。可选。如果设置了--ecdsa-curve,则忽略此选项。(默认值:3072)。 + - `--start-date value`:证书的创建日期。可选。(格式:`Jan 1 15:04:05 2011`)。 + - `--duration value`:证书有效期。可选。(默认值:8760h0m0s) + - `--ca`:如果提供此选项,则证书将生成自己的证书颁发机构。可选。 +- 示例: + - `gitea cert --host git.example.com,example.com,www.example.com --ca` + +### dump + +将所有文件和数据库导出到一个 zip 文件中。输出文件将保存在当前目录下,类似于`gitea-dump-1482906742.zip`。 + +- 选项: + - `--file name`,`-f name`:指定要创建的导出文件的名称。可选。(默认值:gitea-dump-[timestamp].zip)。 + - `--tempdir path`,`-t path`:指定临时目录的路径。可选。(默认值:/tmp)。 + - `--skip-repository`,`-R`:跳过仓库的导出。可选。 + - `--skip-custom-dir`:跳过自定义目录的导出。可选。 + - `--skip-lfs-data`:跳过 LFS 数据的导出。可选。 + - `--skip-attachment-data`:跳过附件数据的导出。可选。 + - `--skip-package-data`:跳过包数据的导出。可选。 + - `--skip-log`:跳过日志数据的导出。可选。 + - `--database`,`-d`:指定数据库的 SQL 语法。可选。 + - `--verbose`,`-V`:如果提供此选项,显示附加详细信息。可选。 + - `--type`:设置导出的格式。可选。(默认值:zip) +- 示例: + - `gitea dump` + - `gitea dump --verbose` + +### generate + +用于在配置文件中生成随机值和令牌。对于自动部署时生成值非常有用。 + +- 命令: + - `secret`: + - 选项: + - `INTERNAL_TOKEN`: 用于内部 API 调用身份验证的令牌。 + - `JWT_SECRET`: 用于 LFS 和 OAUTH2 JWT 身份验证的密钥(LFS_JWT_SECRET 是此选项的别名,用于向后兼容)。 + - `SECRET_KEY`: 全局密钥。 + - 示例: + - `gitea generate secret INTERNAL_TOKEN` + - `gitea generate secret JWT_SECRET` + - `gitea generate secret SECRET_KEY` + +### keys + +提供一个 SSHD AuthorizedKeysCommand。需要在 sshd 配置文件中进行配置: + +```ini +... +# -e 的值和 AuthorizedKeysCommandUser 应与运行 Gitea 的用户名匹配 +AuthorizedKeysCommandUser git +AuthorizedKeysCommand /path/to/gitea keys -e git -u %u -t %t -k %k +``` + +该命令将返回适用于提供的密钥的合适 authorized_keys 行。您还应在 `app.ini` 的 `[server]` 部分设置值 `SSH_CREATE_AUTHORIZED_KEYS_FILE=false`。 + +注意: opensshd 要求 Gitea 程序由 root 拥有,并且不可由组或其他人写入。程序必须使用绝对路径指定。 +注意: Gitea 必须在运行此命令时处于运行状态才能成功。 + +### migrate + +迁移数据库。该命令可用于在首次启动服务器之前运行其他命令。此命令是幂等的。 + +### doctor check + +对 Gitea 实例进行诊断,可以修复一些可修复的问题。 +默认只运行部分检查,额外的检查可以参考: + +- `gitea doctor check --list` - 列出所有可用的检查 +- `gitea doctor check --all` - 运行所有可用的检查 +- `gitea doctor check --default` - 运行默认的检查 +- `gitea doctor check --run [check(s),]...` - 运行指定的名字的检查 + +有些问题可以通过设置 `--fix` 选项进行自动修复。 +额外的日志可以通过 `--log-file=...` 进行设置。 + +#### doctor recreate-table + +有时,在迁移时,旧的列和默认值可能会在数据库模式中保持不变。这可能会导致警告,如下所示: + +``` +2020/08/02 11:32:29 ...rm/session_schema.go:360:Sync() [W] Table user Column keep_activity_private db default is , struct default is 0 +``` + +您可以通过以下方式让 Gitea 重新创建这些表,并将旧数据复制到新表中,并适当设置默认值: + +``` +gitea doctor recreate-table user +``` + +您可以使用以下方式让 Gitea 重新创建多个表: + +``` +gitea doctor recreate-table table1 table2 ... +``` + +如果您希望 Gitea 重新创建所有表,请直接调用: + +``` +gitea doctor recreate-table +``` + +强烈建议在运行这些命令之前备份您的数据库。 + +### doctor convert + +将现有的 MySQL 数据库从 utf8 转换为 utf8mb4,或者把 MSSQL 数据库从 varchar 转换为 nvarchar。 + +### manager + +管理运行中的服务器操作: + +- 命令: + - `shutdown`: 优雅地关闭运行中的进程 + - `restart`: 优雅地重新启动运行中的进程(对于 Windows 服务器尚未实现) + - `flush-queues`: 刷新运行中的进程中的队列 + - 选项: + - `--timeout value`: 刷新过程的超时时间(默认值: 1m0s) + - `--non-blocking`: 设置为 true,以在返回之前不等待刷新完成 + - `logging`: 调整日志命令 + - 命令: + - `pause`: 暂停日志记录 + - 注意: + - 如果日志级别低于此级别,日志级别将被临时提升为 INFO。 + - Gitea 将在一定程度上缓冲日志,并在超过该点后丢弃日志。 + - `resume`: 恢复日志记录 + - `release-and-reopen`: 使 Gitea 释放和重新打开用于日志记录的文件和连接(相当于向 Gitea 发送 SIGUSR1 信号)。 + - `remove name`: 删除指定的日志记录器 + - 选项: + - `--group group`, `-g group`: 从中删除子记录器的组(默认为`default`) + - `add`: 添加日志记录器 + - 命令: + - `console`: 添加控制台日志记录器 + - 选项: + - `--group value`, `-g value`: 要添加日志记录器的组 - 默认为"default" + - `--name value`, `-n value`: 新日志记录器的名称 - 默认为模式 + - `--level value`, `-l value`: 新日志记录器的日志级别 + - `--stacktrace-level value`, `-L value`: 堆栈跟踪日志级别 + - `--flags value`, `-F value`: 日志记录器的标志 + - `--expression value`, `-e value`: 日志记录器的匹配表达式 + - `--prefix value`, `-p value`: 日志记录器的前缀 + - `--color`: 在日志中使用颜色 + - `--stderr`: 将控制台日志输出到 stderr - 仅适用于控制台 + - `file`: 添加文件日志记录器 + - 选项: + - `--group value`, `-g value`: 要添加日志记录器的组 - 默认为"default" + - `--name value`, `-n value`: 新日志记录器的名称 - 默认为模式 + - `--level value`, `-l value`: 新日志记录器的日志级别 + - `--stacktrace-level value`, `-L value`: 堆栈跟踪日志级别 + - `--flags value`, `-F value`: 日志记录器的标志 + - `--expression value`, `-e value`: 日志记录器的匹配表达式 + - `--prefix value`, `-p value`: 日志记录器的前缀 + - `--color`: 在日志中使用颜色 + - `--filename value`, `-f value`: 日志记录器的文件名 + - `--rotate`, `-r`: 轮转日志 + - `--max-size value`, `-s value`: 在轮转之前的最大大小(以字节为单位) + - `--daily`, `-d`: 每天轮转日志 + - `--max-days value`, `-D value`: 保留的每日日志的最大数量 + - `--compress`, `-z`: 压缩轮转的日志 + - `--compression-level value`, `-Z value`: 使用的压缩级别 + - `conn`: 添加网络连接日志记录器 + - 选项: + - `--group value`, `-g value`: 要添加日志记录器的组 - 默认为"default" + - `--name value`, `-n value`: 新日志记录器的名称 - 默认为模式 + - `--level value`, `-l value`: 新日志记录器的日志级别 + - `--stacktrace-level value`, `-L value`: 堆栈跟踪日志级别 + - `--flags value`, `-F value`: 日志记录器的标志 + - `--expression value`, `-e value`: 日志记录器的匹配表达式 + - `--prefix value`, `-p value`: 日志记录器的前缀 + - `--color`: 在日志中使用颜色 + - `--reconnect-on-message`, `-R`: 对于每个消息重新连接主机 + - `--reconnect`, `-r`: 连接中断时重新连接主机 + - `--protocol value`, `-P value`: 设置要使用的协议:tcp、unix 或 udp(默认为 tcp) + - `--address value`, `-a value`: 要连接到的主机地址和端口(默认为:7020) + - `smtp`: 添加 SMTP 日志记录器 + - 选项: + - `--group value`, `-g value`: 要添加日志记录器的组 - 默认为"default" + - `--name value`, `-n value`: 新日志记录器的名称 - 默认为模式 + - `--level value`, `-l value`: 新日志记录器的日志级别 + - `--stacktrace-level value`, `-L value`: 堆栈跟踪日志级别 + - `--flags value`, `-F value`: 日志记录器的标志 + - `--expression value`, `-e value`: 日志记录器的匹配表达式 + - `--prefix value`, `-p value`: 日志记录器的前缀 + - `--color`: 在日志中使用颜色 + - `--username value`, `-u value`: 邮件服务器用户名 + - `--password value`, `-P value`: 邮件服务器密码 + - `--host value`, `-H value`: 邮件服务器主机(默认为: 127.0.0.1:25) + - `--send-to value`, `-s value`: 要发送到的电子邮件地址 + - `--subject value`, `-S value`: 发送电子邮件的主题标题 + - `processes`: 显示 Gitea 进程和 Goroutine 信息 + - 选项: + - `--flat`: 以平面表格形式显示进程,而不是树形结构 + - `--no-system`: 不显示系统进程 + - `--stacktraces`: 显示与进程关联的 Goroutine 的堆栈跟踪 + - `--json`: 输出为 JSON 格式 + - `--cancel PID`: 向具有 PID 的进程发送取消命令(仅适用于非系统进程) + +### dump-repo + +`dump-repo` 从 Git/GitHub/Gitea/GitLab 中转储存储库数据: + +- 选项: + - `--git_service service`:Git 服务,可以是 `git`、`github`、`gitea`、`gitlab`。如果 `clone_addr` 可以被识别,则可以忽略此选项。 + - `--repo_dir dir`,`-r dir`:存储数据的存储库目录路径。 + - `--clone_addr addr`:将被克隆的 URL,目前可以是 git/github/gitea/gitlab 的 http/https URL。例如:https://github.com/lunny/tango.git + - `--auth_username lunny`:访问 `clone_addr` 的用户名。 + - `--auth_password `:访问 `clone_addr` 的密码。 + - `--auth_token `:访问 `clone_addr` 的个人令牌。 + - `--owner_name lunny`:如果非空,数据将存储在具有所有者名称的目录中。 + - `--repo_name tango`:如果非空,数据将存储在具有存储库名称的目录中。 + - `--units `:要迁移的项目,一个或多个项目应以逗号分隔。允许的项目有 wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments。如果为空,则表示所有项目。 + +### restore-repo + +`restore-repo` 从磁盘目录中还原存储库数据: + +- 选项: + - `--repo_dir dir`,`-r dir`:还原数据的存储库目录路径。 + - `--owner_name lunny`:还原目标所有者名称。 + - `--repo_name tango`:还原目标存储库名称。 + - `--units `:要还原的项目,一个或多个项目应以逗号分隔。允许的项目有 wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments。如果为空,则表示所有项目。 + +### actions generate-runner-token + +生成一个供 Runner 使用的新令牌,用于向服务器注册。 + +- 选项: + - `--scope {owner}[/{repo}]`,`-s {owner}[/{repo}]`:限制 Runner 的范围,没有范围表示该 Runner 可用于所有仓库,但你也可以将其限制为特定的仓库或所有者。 + +要注册全局 Runner: + +``` +gitea actions generate-runner-token +``` + +要注册特定组织的 Runner,例如 `org`: + +``` +gitea actions generate-runner-token -s org +``` + +要注册特定仓库的 Runner,例如 `username/test-repo`: + +``` +gitea actions generate-runner-token -s username/test-repo +``` diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/config-cheat-sheet.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/config-cheat-sheet.md new file mode 100644 index 00000000..f8606820 --- /dev/null +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.26/administration/config-cheat-sheet.md @@ -0,0 +1,1385 @@ +--- +date: "2016-12-26T16:00:00+02:00" +slug: "config-cheat-sheet" +sidebar_position: 30 + +aliases: + - /zh-cn/config-cheat-sheet +--- + +# 配置说明 + +这是针对 Gitea 配置文件的说明, +你可以了解 Gitea 的强大配置。 + +需要说明的是,你的所有改变请修改 `custom/conf/app.ini` 文件而不是源文件。 +如果是从发行版本完成的安装, +配置文件的路径为`/etc/gitea/conf/app.ini`。 + +所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) 查看到。 +标注了 :exclamation: 的配置项表明除非你真的理解这个配置项的意义,否则最好使用默认值。 + +包含`#`或者`;`的变量必须使用引号( `` ` `` 或者 `"` )包裹,否则会被解析为注释。 + +本文档使用以下约定: + +- `[section].FOO_BAR` 或 `[section]FOO_BAR`: 一个位于 INI 文件 `[section]` 段中的配置项。 +- `FooBar`: 这是一个 Gitea 内部变量,不是一个配置项,仅用于描述相关逻辑。 +- `$FOO_BAR`: 这是一个环境变量,Gitea 可能会使用它的值,但是它不能直接用于配置文件中。 +- `{FOO_BAR}/something` 或 `{FooBar}/something`: 这个值会默认使用配置项 `FOO_BAR` 或者内部变量 `FooBar`。 + +**注意:** 修改完配置文件后,需要重启 Gitea 服务才能生效。 + +## 使用环境变量配置 Gitea + +我们提供了 [environment-to-ini](https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini) 工具 +来帮助通过环境变量生成 Gitea 的 `app.ini` 配置文件。 + +## 默认配置 (非`app.ini`配置文件) + +这些值取决于环境,但构成了许多值的基础。当运行 `gitea help`或启动时,它们将 +作为默认配置的一部分进行报告。它们在那里发出的顺序略有不同,但我们将按照设置的顺序在这里列出。 + +- _`AppPath`_: Gitea 二进制可执行文件的绝对路径 +- _`AppWorkPath`_: Gitea 可执行文件的工作目录。 该配置可以通过以下几种方式设置,优先级依次递减: + - `app.ini`中的`WORK_PATH`配置项 + - 启动 Gitea 时的`--work-path`命令行参数 + - `$GITEA_WORK_DIR`环境变量 + - 在编译时设置的内置值(参见从源代码编译) + - 默认为 _`AppPath`_ 的目录 + - 如果上述任何路径为相对路径,将自动解析为相对于 _`AppPath`_ 目录的绝对路径 +- _`CustomPath`_: 这是用于自定义模板和其他选项的基础目录。 + 它是通过使用以下层次结构中的第一个设置的内容来确定的: + - 通过传递给二进制文件的`--custom-path`标志 + - 环境变量 `$GITEA_CUSTOM` + - 在构建时设置的内置值(参见从源代码构建) + - 否则,默认为 _`AppWorkPath`_`/custom` + - 如果上述任何路径是相对路径,则会相对于 _`AppWorkPath`_ 目录进行处理, + 使其变为绝对路径。 +- _`CustomConf`_: 这是指向`app.ini`文件的路径。 + - 这是指向`app.ini`文件的路径。 + - 在构建时设置的内置值(参见从源代码构建) + - 否则,默认为 _`CustomPath`_`/conf/app.ini` + - 如果上述任何路径是相对路径,则会相对于*`CustomPath`*目录进行处理。 + +此外,还有*`StaticRootPath`*,可以在构建时设置为内置值,否则将默认为 _`AppWorkPath`_。 + +## Overall (`DEFAULT`) + +- `APP_NAME`: **Gitea: Git with a cup of tea** 应用名称,在网页的标题中显示。 +- `RUN_USER`: **_current OS username_/`$USER`/`$USERNAME` e.g. git**: 运行 Gitea 的用户, + 应当是一个专用的系统账户(非用户使用,推荐创建一个专用的`git`用户). 如果在你自己的个人电脑使用改成你自己的用户名。 + 该配置如果设置不正确,Gitea 可能崩溃。 +- `RUN_MODE`: **prod**: 应用的运行模式,对运行性能和问题排除有影响: `dev` 或者 `prod`,默认为 `prod`。 `dev`模式有助于开发和问题排查, 除设置为`dev` 外,均被视为 `prod`. +- `WORK_PATH`: **_the-work-path_**: 工作目录, 前文有提及. + +## 仓库 (`repository`) + +- `ROOT`: **`{APP_DATA_PATH}/gitea-repositories`**: 存放 git 工程的根目录,建议填绝对路径。 + 相对路径将被解析为**`{AppWorkPath}/{ROOT}`**. +- `SCRIPT_TYPE`: **bash**: 服务器支持的 Shell 类型,通常是`bash`, + 但有些服务器也有可能是`sh`。 +- `DETECTED_CHARSETS_ORDER`: **UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr**: 检测到的字符集的决定性顺序 - 如果检测到的字符集具有相等的置信度,则优先选择列表中较早出现的字符集,而不是较晚出现的字符集。添加“defaults”将会将未命名的字符集放置在该点。 +- `ANSI_CHARSET`: **_empty_**: 默认的 ANSI 字符集,用于覆盖非 UTF-8 字符集。 +- `FORCE_PRIVATE`: **false**: 强制使每个新仓库变为私有。 +- `DEFAULT_PRIVATE`: **last**: 创建新仓库时默认为私有:`last`, `private`, `public`。 +- `DEFAULT_PUSH_CREATE_PRIVATE`: **true**: 使用推送创建新仓库时默认为私有。 +- `MAX_CREATION_LIMIT`: **-1**: 每个用户的全局仓库创建上限, + `-1` 代表无限制. +- `PREFERRED_LICENSES`: **Apache License 2.0,MIT License**: 要放置在列表顶部的指定许可证。 + 名称必须与 options/license 或 custom/options/license 中的文件名匹配。 +- `DISABLE_HTTP_GIT`: **false**: 禁用 HTTP 协议与仓库进行 + 交互的能力。 +- `USE_COMPAT_SSH_URI`: **false**: 当使用默认的 SSH 端口时,强制使用 ssh://克隆 URL, + 而不是 scp-style uri。 +- `GO_GET_CLONE_URL_PROTOCOL`: **https**: 用于 "go get" 请求的值,返回仓库的 URL 作为 https 或 ssh, + 默认为 https。 +- `ACCESS_CONTROL_ALLOW_ORIGIN`: **_empty_**:用于 Access-Control-Allow-Origin 标头的值, + 默认不提供。 + 警告:如果您不提供正确的值,这可能对您的网站造成危害。 +- `DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH`: **false**: 如果非默认分支上的提交将问题标记为已关闭,则关闭该问题。 +- `ENABLE_PUSH_CREATE_USER`: **false**: 允许用户将本地存储库推送到 Gitea,并为用户自动创建它们。 +- `ENABLE_PUSH_CREATE_ORG`: **false**: 允许用户将本地存储库推送到 Gitea,并为组织自动创建它们。 +- `DISABLED_REPO_UNITS`: **_empty_**: 逗号分隔的全局禁用的仓库单元列表。允许的值是:: \[repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects, repo.packages, repo.actions\] +- `DEFAULT_REPO_UNITS`: **repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages,repo.actions**: 逗号分隔的默认新仓库单元列表。允许的值是:: \[repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects, repo.packages, repo.actions\]. 注意:目前无法停用代码和发布。如果您指定了默认的仓库单元,您仍应将它们列出以保持未来的兼容性。外部 wiki 和问题跟踪器不能默认启用,因为它需要额外的设置。禁用的仓库单元将不会添加到新的仓库中,无论它是否在默认列表中。 +- `DEFAULT_FORK_REPO_UNITS`: **repo.code,repo.pulls**: 逗号分隔的默认分叉仓库单元列表。允许的值和规则与`DEFAULT_REPO_UNITS`相同。 +- `DEFAULT_MIRROR_REPO_UNITS`: **repo.code,repo.releases,repo.issues,repo.wiki,repo.projects,repo.packages**: 逗号分隔的默认镜像仓库单元列表。允许的值和规则与`DEFAULT_REPO_UNITS`相同。 +- `DEFAULT_TEMPLATE_REPO_UNITS`: **repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages**: 逗号分隔的默认模板仓库单元列表。允许的值和规则与`DEFAULT_REPO_UNITS`相同。 +- `PREFIX_ARCHIVE_FILES`: **true**: 通过将存档文件放置在以仓库命名的目录中来添加前缀。 +- `DISABLE_MIGRATIONS`: **false**: 禁用迁移功能。 +- `DISABLE_STARS`: **false**: 禁用点赞功能。 +- `DEFAULT_BRANCH`: **main**: 所有仓库的默认分支名称。 +- `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: 允许非管理员用户认领未被认领的仓库。 +- `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: 允许非管理员用户删除未被认领的仓库。 +- `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: 不允许从用户界面下载源代码存档文件。 +- `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: 允许无限制得派生仓库。 + +### 仓库 - 编辑器 (`repository.editor`) + +- `LINE_WRAP_EXTENSIONS`: **.txt,.md,.markdown,.mdown,.mkd,.livemd,**: 在 Monaco 编辑器中应该换行的文件扩展名列表。用逗号分隔扩展名。要对没有扩展名的文件进行换行,只需放置一个逗号。 +- `PREVIEWABLE_FILE_MODES`: **markdown**: 具有预览 API 的有效文件模式,例如 `api/v1/markdown`。用逗号分隔各个值。如果文件扩展名不匹配,编辑模式下的预览选项卡将不会显示。 + +### 仓库 - 合并请求 (`repository.pull-request`) + +- `WORK_IN_PROGRESS_PREFIXES`: **WIP:,\[WIP\]**: 在拉取请求标题中用于标记工作正在进行中的前缀列表。 + 这些前缀在不区分大小写的情况下进行匹配。 +- `CLOSE_KEYWORDS`: **close**, **closes**, **closed**, **fix**, **fixes**, **fixed**, **resolve**, **resolves**, **resolved**: 在拉取请求评论中用于自动关闭相关问题的关键词列表。 +- `REOPEN_KEYWORDS`: **reopen**, **reopens**, **reopened**: 在拉取请求评论中用于自动重新打开相关问题的 + 关键词列表。 +- `DEFAULT_MERGE_STYLE`: **merge**: 设置创建仓库的默认合并方式,可选: `merge`, `rebase`, `rebase-merge`, `squash`, `fast-forward-only` +- `DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT`: **50**: 在默认合并消息中,对于`squash`提交,最多包括此数量的提交。设置为 -1 以包括所有提交。 +- `DEFAULT_MERGE_MESSAGE_SIZE`: **5120**: 在默认的合并消息中,对于`squash`提交,限制提交消息的大小。设置为 `-1`以取消限制。仅在`POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`为`true`时使用。 +- `DEFAULT_MERGE_MESSAGE_ALL_AUTHORS`: **false**: 在默认合并消息中,对于`squash`提交,遍历所有提交以包括所有作者的`Co-authored-by`,否则仅使用限定列表中的作者。 +- `DEFAULT_MERGE_MESSAGE_MAX_APPROVERS`: **10**:在默认合并消息中,限制列出的审批者数量为`Reviewed-by`:。设置为 `-1` 以包括所有审批者。 +- `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: 在默认合并消息中,仅包括官方允许审查的审批者。 +- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: 在默认的 squash 合并消息中,包括构成拉取请求的所有提交的提交消息。 +- `ADD_CO_COMMITTER_TRAILERS`: **true**: 如果提交者与作者不匹配,在合并提交消息中添加`co-authored-by`和`co-committed-by`标记。 +- `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`:使用三方合并方法测试`PR Patch`以发现是否存在冲突。如果此设置`true`,将使用`git apply`重新测试冲突的`PR Pathch` - 这是 1.18(和之前版本)中的先前行为,但效率相对较低。如果发现需要此设置,请报告。 + +### 仓库 - 工单 (`repository.issue`) + +- `LOCK_REASONS`: **Too heated,Off-topic,Resolved,Spam**: 合并请求或工单被锁定的原因列表。 +- `MAX_PINNED`: **3**: 每个仓库的最大可固定工单数量。设置为 0 禁用固定工单。 + +### 仓库 - 文件上传 (`repository.upload`) + +- `ENABLED`: **true**: 是否启用仓库文件上传。 +- `TEMP_PATH`: **data/tmp/uploads**: 文件上传的临时保存路径(在 Gitea 重启的时候该目录会被清空)。 +- `ALLOWED_TYPES`: **_empty_**: 以逗号分割的列表,代表支持上传的文件类型。(`.zip`), mime 类型 (`text/plain`) or 通配符类型 (`image/*`, `audio/*`, `video/*`). 为空或者 `*/*`代表允许所有类型文件。 +- `FILE_MAX_SIZE`: **50**: 每个文件的最大大小(MB)。 +- `MAX_FILES`: **5**: 每次上传的最大文件数。 + +### 仓库 - 版本发布 (`repository.release`) + +- `ALLOWED_TYPES`: **_empty_**: 允许发布的文件类型列表,用逗号分隔 。如压缩包类型(`.zip`), mime 类型 (`text/plain`) ,也支持通配符 (`image/*`, `audio/*`, `video/*`)。 空值或者 `*/*` 代表允许所有类型。 +- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页大小 +- 关于版本发布相关的附件设置,详见`附件`部分。 + +### 仓库 - Signing (`repository.signing`) + +- `SIGNING_KEY`: **default**: \[none, KEYID, default \]: 用于签名的密钥 +- `SIGNING_NAME` & `SIGNING_EMAIL`: 如果`SIGNING_KEY`提供了一个 KEYID,将使用这些作为签名者的姓名和电子邮件地址。这些应与密钥的公开姓名和电子邮件地址相匹配。 +- `INITIAL_COMMIT`: **always**: \[never, pubkey, twofa, always\]: 签名初始提交。 + - `never`: 永不签名 + - `pubkey`: 仅在用户具有公钥时签名 + - `twofa`: 仅在用户使用双因素身份验证登录时签名 + - `always`: 始终签名 + - 除了 never 和 always 之外的选项可以组合为逗号分隔的列表。 +- `DEFAULT_TRUST_MODEL`: **collaborator**: \[collaborator, committer, collaboratorcommitter\]: 用于验证提交的默认信任模型。 + - `collaborator`: 信任协作者密钥签名的签名。 + - `committer`: 信任与提交者匹配的签名(这与 GitHub 匹配,并会强制 Gitea 签名的提交具有 Gitea 作为提交者)。 + - `collaboratorcommitter`: 信任与提交者匹配的协作者密钥签名的签名。 +- `WIKI`: **never**: \[never, pubkey, twofa, always, parentsigned\]: 对 wiki 提交进行签名。 +- `CRUD_ACTIONS`: **pubkey, twofa, parentsigned**: \[never, pubkey, twofa, parentsigned, always\]: 对 CRUD 操作进行签名。 + - 与上面相同的选项,增加了: + - `parentsigned`: 仅在父提交进行了签名时才进行签名。 +- `MERGES`: **pubkey, twofa, basesigned, commitssigned**: \[never, pubkey, twofa, approved, basesigned, commitssigned, always\]: 对合并操作进行签名。 + - `approved`: 仅对已批准的合并操作进行签名,适用于受保护的分支。 + - `basesigned`: 仅在基础仓库的父提交进行了签名时才进行签名。 + - `headsigned`: 仅在头分支的头提交进行了签名时才进行签名。 + - `commitssigned`: 仅在头分支中的所有提交到合并点都进行了签名时才进行签名。 + +### 仓库 - Local (`repository.local`) + +- `LOCAL_COPY_PATH`: **tmp/local-repo**:临时本地仓库副本的路径。默认为 tmp/local-repo(内容在 Gitea 重新启动时被删除) + +### 仓库 - MIME type mapping (`repository.mimetype_mapping`) + +配置用于根据可下载文件的文件扩展名设置预期的 MIME 类型。配置以键值对的形式呈现,文件扩展名以`.`开头。 + +以下配置在下载具有`.apk`文件扩展名的文件时设置`Content-Type: application/vnd.android.package-archive`头部。 + +```ini +.apk=application/vnd.android.package-archive +``` + +## 跨域 (`cors`) + +- `ENABLED`: **false**: 启用 CORS 头部(默认禁用) +- `ALLOW_DOMAIN`: **\***: 允许请求的域名列表 +- `METHODS`: **GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS**: 允许发起的请求方式列表 +- `MAX_AGE`: **10m**: 缓存响应的最大时间 +- `ALLOW_CREDENTIALS`: **false**: 允许带有凭据的请求 +- `HEADERS`: **Content-Type,User-Agent**: 允许请求携带的头部 +- `X_FRAME_OPTIONS`: **SAMEORIGIN**: 详见 `X-Frame-Options`HTTP 头部. + +## 界面 (`ui`) + +- `EXPLORE_PAGING_NUM`: **20**: 探索页面每页显示的仓库数量。 +- `ISSUE_PAGING_NUM`: **20**: 工单页面每页显示的工单数量。 +- `MEMBERS_PAGING_NUM`: **20**: 组织成员页面每页显示的成员数量。 +- `FEED_MAX_COMMIT_NUM`: **5**: 活动流页面显示的最大提交数量。 +- `FEED_PAGING_NUM`: **20**: 活动流页面显示的最大活动数量。 +- `SITEMAP_PAGING_NUM`: **20**: 在单个子 SiteMap 中显示的项数。 +- `GRAPH_MAX_COMMIT_NUM`: **100**: 提交图中显示的最大 commit 数量。 +- `CODE_COMMENT_LINES`: **4**: 在代码评论中能够显示的最大代码行数。 +- `DEFAULT_THEME`: **gitea-auto**: 在 Gitea 安装时候设置的默认主题,自定义的主题可以通过 `{CustomPath}/public/assets/css/theme-*.css` 提供。 +- `SHOW_USER_EMAIL`: **true**: 用户的电子邮件是否应该显示在`Explore Users`页面中。 +- `THEMES`: **_empty_**: 所有可用的主题(由 `{CustomPath}/public/assets/css/theme-*.css` 提供)。允许用户选择个性化的主题, +- `MAX_DISPLAY_FILE_SIZE`: **8388608**: 能够显示文件的最大大小(默认为 8MiB)。 +- `REACTIONS`: 用户可以在问题(Issue)、Pull Request(PR)以及评论中选择的所有可选的反应。 + 这些值可以是表情符号别名(例如::smile:)或 Unicode 表情符号。 + 对于自定义的反应,在 public/assets/img/emoji/ 目录下添加一个紧密裁剪的正方形图像,文件名为 reaction_name.png。 +- `CUSTOM_EMOJIS`: **gitea, codeberg, gitlab, git, github, gogs**: 不在 utf8 标准中定义的额外表情符号。 + 默认情况下,我们支持 Gitea 表情符号(:gitea:)。要添加更多表情符号,请将它们复制到 public/assets/img/emoji/ 目录下, + 并将其添加到此配置中。 +- `DEFAULT_SHOW_FULL_NAME`: **false**: 是否在可能的情况下显示用户的全名。如果没有设置全名,则将使用用户名。 +- `SEARCH_REPO_DESCRIPTION`: **true**: 是否在探索页面上的仓库搜索中搜索描述。 +- `ONLY_SHOW_RELEVANT_REPOS`: **false** 在没有指定关键字并使用默认排序时,是否仅在探索页面上显示相关的仓库。 + 如果一个仓库是分叉或者没有元数据(没有描述、图标、主题),则被视为不相关的仓库。 + +### 界面 - 管理员 (`ui.admin`) + +- `USER_PAGING_NUM`: **50**: 单页显示的用户数量。 +- `REPO_PAGING_NUM`: **50**: 单页显示的仓库数量。 +- `NOTICE_PAGING_NUM`: **25**: 单页显示的通知数量。 +- `ORG_PAGING_NUM`: **50**: 单页显示的组织数量。 + +### 界面 - 用户 (`ui.user`) + +- `REPO_PAGING_NUM`: **15**: 单页显示的仓库数量。 +- `ORG_PAGING_NUM`: **15**: 个人信息页展示的组织数量。 + +### 界面 - 元信息 (`ui.meta`) + +- `AUTHOR`: **Gitea - Git with a cup of tea**: 主页的作者元标签。 +- `DESCRIPTION`: **Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go**: 主页的描述元标签。 +- `KEYWORDS`: **go,git,self-hosted,gitea**: 首页关键词元标签。 + +### 界面 - 通知 (`ui.notification`) + +- `MIN_TIMEOUT`: **10s**: 这些选项控制通知端点定期轮询以更新通知计数。在页面加载后,通知计数将在` MIN_TIMEOUT`之后进行检查。如果通知计数未更改,超时时间将按照`TIMEOUT_STEP`增加到`MAX_TIMEOUT`。将 `MIN_TIMEOUT`设置为 -1 以关闭该功能。 +- `MAX_TIMEOUT`: **60s**. +- `TIMEOUT_STEP`: **10s**. +- `EVENT_SOURCE_UPDATE_TIME`: **10s**: 该设置确定了查询数据库以更新通知计数的频率。如果浏览器客户端支持`EventSource`和`SharedWorker`,则优先使用`SharedWorker`而不是轮询通知端点。将其设置为 -1 可以禁用 `EventSource`。 + +### 界面 - SVG Images (`ui.svg`) + +- `ENABLE_RENDER`: **true**: 是否将 SVG 文件呈现为图像。如果禁用了 SVG 渲染,SVG 文件将显示为文本,无法作为图像嵌入到 Markdown 文件中。 + +### 界面 - CSV Files (`ui.csv`) + +- `MAX_FILE_SIZE`: **524288** (512kb): 以字节为单位允许将 CSV 文件呈现为表格的最大文件大小(将其设置为 0 表示没有限制)。 +- `MAX_ROWS`: **2500** : 最大允许的 CSV 文件行数。 (设置为 0 不限制) + +## Markdown (`markdown`) + +- `ENABLE_HARD_LINE_BREAK_IN_COMMENTS`: **true**: 在评论中将软换行符呈现为硬换行符, + 这意味着段落之间的单个换行符将导致换行, + 并且不需要在段落后添加尾随空格来强制换行。 +- `ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS`: **false**: 在文档中将软换行符呈现为硬换行符, + 这意味着段落之间的单个换行符将导致换行, + 并且不需要在段落后添加尾随空格来强制换行。 +- `CUSTOM_URL_SCHEMES`: 使用逗号分隔的列表(ftp、git、svn)来指示要在 Markdown 中呈现的附加 URL 超链接。 + 以 http 和 https 开头的 URL 始终显示。 + 如果此条目为空,则允许所有 URL 方案。 +- `FILE_EXTENSIONS`: **.md,.markdown,.mdown,.mkd,.livemd**: 应呈现/编辑为 Markdown 的文件扩展名列表。使用逗号分隔扩展名。要将没有任何扩展名的文件呈现为 Markdown,请只需放置一个逗号。 +- `ENABLE_MATH`: **true**: 启用对`\(...\)`, `\[...\]`, `$...$`和`$$...$$` 作为数学块的检测。 + +## 服务器 (`server`) + +- `APP_DATA_PATH`: **_`AppWorkPath`_/data**: 这是存储数据的默认根路径。 +- `PROTOCOL`: **http**: \[http, https, fcgi, http+unix, fcgi+unix\] +- `USE_PROXY_PROTOCOL`: **false**: 在连接中预期`PROXY`协议头。 +- `PROXY_PROTOCOL_TLS_BRIDGING`: **false**: 协议为 https 时,在`TLS`协商后预期`PROXY`协议头。 +- `PROXY_PROTOCOL_HEADER_TIMEOUT`: **5s**: 等待`PROXY`协议头的超时时间(设置为`0`表示没有超时)。 +- `PROXY_PROTOCOL_ACCEPT_UNKNOWN`: **false**:接受带有未知类型的`PROXY`协议头。 +- `DOMAIN`: **localhost**: 此服务器的域名。 +- `ROOT_URL`: **`{PROTOCOL}://{DOMAIN}:{HTTP_PORT}/`**: + 覆盖自动生成的公共 URL。 + 这个选项用于内部 URL 和外部 URL 不匹配的情况(例如 Gitea 运行在反向代理后)。 +- `PUBLIC_URL_DETECTION`: **`legacy`**: 控制如何生成公共 URL。 + 虽然它的默认值是 "legacy"(避免影响老的用户),大多数实例都应当使用 "auto" 行为,尤其是 Gitea 实例需要在容器网络中被访问的场景。 + - "legacy": 当 "X-Forwarded-Proto" 请求头存在的时候,使用 "Host" 请求头生成公共 URL,否则使用 "ROOT_URL"。 + - "auto": 总是使用 "Host" 请求头生成公共 URL,如果 "X-Forwarded-Proto" 请求头存在也会使用它。如果没有 "Host" 请求头则使用 "ROOT_URL"。 + - "never": 总是使用 "ROOT_URL" 生成公共 URL,不从请求头进行检测。 +- `STATIC_URL_PREFIX`: **_empty_**: + 覆盖此选项以从不同的 URL 请求静态资源。 + 这包括 CSS 文件、图片、JS 文件和 Web 字体。 + 头像图片是动态资源,仍由 Gitea 提供。 + 选项可以是不同的路径,例如`/static`, 也可以是另一个域,例如`https://cdn.example.com`. + 请求会变成 `{ROOT_URL}/static/assets/css/index.css` 或 `https://cdn.example.com/assets/css/index.css` + 静态文件位于 Gitea 源代码仓库的`public/`目录中。 + 您可以将`STATIC_URL_PREFIX`请求代理到 Gitea 服务器以提供静态资源,或者将手动构建的 Gitea 资源从 `$GITEA_BUILD/public`复制到静态位置,例如`/var/www/assets`。确保`$STATIC_URL_PREFIX/assets/css/index.css`指向`/var/www/assets/css/index.css`。 + +- `HTTP_ADDR`: **0.0.0.0**: HTTP 监听地址。 + - 如果 `PROTOCOL` 设置为 `fcgi`,Gitea 将在由 + `HTTP_ADDR` 和 `HTTP_PORT` 配置设置定义的 TCP 套接字上监听 FastCGI 请求。 + - 如果 `PROTOCOL` 设置为 `http+unix` 或 `fcgi+unix`,则应该是要使用的 Unix 套接字文件的名称。相对路径将相对于 _`AppWorkPath`_ 被转换为绝对路径。 +- `HTTP_PORT`: **3000**: HTTP 监听端口。 + - 如果 `PROTOCOL` 设置为 `fcgi`,Gitea 将在由 `HTTP_ADDR` 和 `HTTP_PORT` + 配置设置定义的 TCP 套接字上监听 FastCGI 请求。 +- `UNIX_SOCKET_PERMISSION`: **666**: Unix 套接字的权限。 +- `LOCAL_ROOT_URL`: **`{PROTOCOL}://{HTTP_ADDR}:{HTTP_PORT}/`**: + 用于访问网络服务的 Gitea 工作器(例如 SSH 更新)的本地(DMZ)URL。 + 在大多数情况下,您不需要更改默认值。 + 仅在您的 SSH 服务器节点与 HTTP 节点不同的情况下才修改它。对于不同的协议,默认值不同。如果 `PROTOCOL` + 是 `http+unix`,则默认值为 `http://unix/`。如果 `PROTOCOL` 是 `fcgi` 或 `fcgi+unix`,则默认值为 + `{PROTOCOL}://{HTTP_ADDR}:{HTTP_PORT}/`。如果监听在 `0.0.0.0`,则默认值为 + `{PROTOCOL}://localhost:{HTTP_PORT}/`, + 否则默认值为 `{PROTOCOL}://{HTTP_ADDR}:{HTTP_PORT}/`。 +- `LOCAL_USE_PROXY_PROTOCOL`: **`{USE_PROXY_PROTOCOL}`**: 在进行本地连接时传递 PROXY 协议头。 + 如果本地连接将经过代理,请将其设置为 false。 +- `PER_WRITE_TIMEOUT`: **30s**: 连接的任何写操作的超时时间。(将其设置为 -1 + 以禁用所有超时。) +- `PER_WRITE_PER_KB_TIMEOUT`: **10s**: 连接每写入 1 KB 的超时时间。 +- `DISABLE_SSH`: **false**: 当 SSH 不可用时禁用 SSH 功能。 +- `START_SSH_SERVER`: **false**: 启用时,使用内置的 SSH 服务器。 +- `SSH_SERVER_USE_PROXY_PROTOCOL`: **false**: 在与内置 SSH 服务器建立连接时,期望 PROXY 协议头。 +- `BUILTIN_SSH_SERVER_USER`: **`{RUN_USER}`**: 用于内置 SSH 服务器的用户名。 +- `SSH_USER`: **BUILTIN_SSH_SERVER_USER**: 在克隆 URL 中显示的 SSH 用户名。 + 如果设置为 `(DOER_USERNAME)`,将使用当前登录用户名作为克隆用的 SSH 用户名。 + 此配置项仅为自己配置 SSH 反向代理的高级用户准备, + 大多数用户应当把它留空,或者按需修改 `BUILTIN_SSH_SERVER_USER`。 +- `SSH_DOMAIN`: **`{DOMAIN}`**: 此服务器的域名,用于显示的克隆 URL。 +- `SSH_PORT`: **22**: 显示在克隆 URL 中的 SSH 端口。 +- `SSH_LISTEN_HOST`: **0.0.0.0**: 内置 SSH 服务器的监听地址。 +- `SSH_LISTEN_PORT`: **`{SSH_PORT}`**: 内置 SSH 服务器的端口。 +- `SSH_ROOT_PATH`: **~/.ssh**: SSH 目录的根路径。 +- `SSH_CREATE_AUTHORIZED_KEYS_FILE`: **true**: 当 Gitea 不使用内置 SSH 服务器时,默认情况下 Gitea 会创建一个 authorized_keys 文件。如果您打算使用 AuthorizedKeysCommand 功能,您应该关闭此选项。 +- `SSH_AUTHORIZED_KEYS_BACKUP`: **false**: 在重写所有密钥时启用 SSH 授权密钥备份,默认值为 false。 +- `SSH_TRUSTED_USER_CA_KEYS`: **_empty_**: 指定信任的证书颁发机构的公钥,用于对用户证书进行身份验证。多个密钥应以逗号分隔。例如 `ssh- ` 或 `ssh- , ssh- `。有关详细信息,请参阅 `sshd` 配置手册中的 `TrustedUserCAKeys` 部分。当为空时,不会创建文件,并且 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 默认为 `off`。 +- `SSH_TRUSTED_USER_CA_KEYS_FILENAME`: **`RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem**: Gitea 将管理的 `TrustedUserCaKeys` 文件的绝对路径。如果您正在运行自己的 SSH 服务器,并且想要使用 Gitea 管理的文件,您还需要修改您的 `sshd_config` 来指向此文件。官方的 Docker 映像将自动工作,无需进一步配置。 +- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** 或 **username, email**: \[off, username, email, anything\]:指定允许用户用作 principal 的值。当设置为 `anything` 时,对 principal 字符串不执行任何检查。当设置为 `off` 时,不允许设置授权的 principal。 +- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: 当 Gitea 不使用内置 SSH 服务器且 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off` 时,默认情况下 Gitea 会创建一个 authorized_principals 文件。 +- `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**: 在重写所有密钥时启用 SSH 授权 principal 备份,默认值为 true(如果 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off`)。 +- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **`{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}`**: 设置用于传递授权密钥的命令模板。可能的密钥是:AppPath、AppWorkPath、CustomConf、CustomPath、Key,其中 Key 是 `models/asymkey.PublicKey`,其他是 shellquoted 字符串。 +- `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**: 对于内置的 SSH 服务器,选择支持的 SSH 连接的加密方法,对于系统 SSH,此设置无效。 +- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**: 对于内置 SSH 服务器,选择支持的 SSH 连接的密钥交换算法,对于系统 SSH,此设置无效。 +- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: 对于内置 SSH 服务器,选择支持的 SSH 连接的 MAC 算法,对于系统 SSH,此设置无效。 +- `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: 对于内置 SSH 服务器,选择要提供为主机密钥的密钥对。私钥应在 `SSH_SERVER_HOST_KEY` 中,公钥在 `SSH_SERVER_HOST_KEY.pub` 中。相对路径会相对于 `APP_DATA_PATH` 转为绝对路径。如果不存在密钥,将为您创建一个 4096 位的 RSA 密钥。 +- `SSH_KEY_TEST_PATH`: **/tmp**: 在使用 `ssh-keygen` 测试公共 SSH 密钥时要在其中创建临时文件的目录,默认为系统临时目录。 +- `SSH_KEYGEN_PATH`: **_empty_**: 使用 `ssh-keygen` 解析公共 SSH 密钥。该值将传递给 shell。默认情况下,Gitea 会自行进行解析。 +- `SSH_EXPOSE_ANONYMOUS`: **false**: 启用将 SSH 克隆 URL 暴露给匿名访问者,默认为 false。 +- `SSH_PER_WRITE_TIMEOUT`: **30s**: 对 SSH 连接的任何写入设置超时。(将其设置为 -1 可以禁用所有超时。) +- `SSH_PER_WRITE_PER_KB_TIMEOUT`: **10s**: 对写入 SSH 连接的每 KB 设置超时。 +- `MINIMUM_KEY_SIZE_CHECK`: **true**: 指示是否检查最小密钥大小与相应类型。 +- `OFFLINE_MODE`: **true**: 禁用 CDN 用于静态文件和 Gravatar 用于个人资料图片。 +- `CERT_FILE`: **https/cert.pem**: 用于 HTTPS 的证书文件路径。在链接时,服务器证书必须首先出现,然后是中间 CA 证书(如果有)。如果 `ENABLE_ACME=true`,则此设置会被忽略。路径相对于 `CUSTOM_PATH`。 +- `KEY_FILE`: **https/key.pem**: 用于 HTTPS 的密钥文件路径。如果 `ENABLE_ACME=true`,则此设置会被忽略。路径相对于 `CUSTOM_PATH`。 +- `STATIC_ROOT_PATH`: **_`StaticRootPath`_**: 模板和静态文件路径的上一级。 +- `APP_DATA_PATH`: **data**(在 Docker 上为 **/data/gitea**):应用程序数据的默认路径。相对路径会相对于 _`AppWorkPath`_ 转为绝对路径。 +- `STATIC_CACHE_TIME`: **6h**: 对 `custom/`、`public/` 和所有上传的头像的静态资源的 Web 浏览器缓存时间。请注意,在 `RUN_MODE` 为 "dev" 时,此缓存会被禁用。 +- `ENABLE_GZIP`: **false**: 为运行时生成的内容启用 gzip 压缩,静态资源除外。 +- `ENABLE_PPROF`: **false**: 应用程序分析(内存和 CPU)。对于 "web" 命令,它会在 `localhost:6060` 上监听。对于 "serv" 命令,它会将数据转储到磁盘上的 `PPROF_DATA_PATH` 中,文件名为 `(cpuprofile|memprofile)__`。 +- `PPROF_DATA_PATH`: **_`AppWorkPath`_/data/tmp/pprof**: `PPROF_DATA_PATH`,当您将 Gitea 作为服务启动时,请使用绝对路径。 +- `LANDING_PAGE`: **home**: 未经身份验证用户的登录页面 \[home, explore, organizations, login, **custom**]。其中 custom 可以是任何 URL,例如 "/org/repo" 或甚至是 `https://anotherwebsite.com`。 +- `LFS_START_SERVER`: **false**: 启用 Git LFS 支持。 +- `LFS_CONTENT_PATH`: **`{APP_DATA_PATH}/lfs`**: 默认的 LFS 内容路径(如果它在本地存储中)。**已弃用**,请使用 `[lfs]` 中的设置。 +- `LFS_JWT_SECRET`: **_empty_**: LFS 身份验证密钥,将其更改为唯一的字符串。你可以通过 Gitea 子命令来生成此字符串。转到 [Command Line](administration/command-line.md#generate)。 +- `LFS_JWT_SECRET_URI`: **_empty_**: 代替在配置中定义 LFS_JWT_SECRET,可以使用此配置选项为 Gitea 提供包含密钥的文件的路径(示例值:`file:/etc/gitea/lfs_jwt_secret`)。 +- `LFS_HTTP_AUTH_EXPIRY`: **24h**: LFS 身份验证的有效期,以 time.Duration 表示,超过此期限的推送可能会失败。 +- `LFS_MAX_FILE_SIZE`: **0**: 允许的最大 LFS 文件大小(以字节为单位,设置为 0 为无限制)。 +- `LFS_LOCKS_PAGING_NUM`: **50**: 每页返回的最大 LFS 锁定数。 +- `REDIRECT_OTHER_PORT`: **false**: 如果为 true 并且 `PROTOCOL` 为 https,则允许将 http 请求重定向到 Gitea 监听的 https 端口的 `PORT_TO_REDIRECT`。 +- `REDIRECTOR_USE_PROXY_PROTOCOL`: **`{USE_PROXY_PROTOCOL}`**: 在连接到 https 重定向器时,需要 PROXY 协议头。 +- `PORT_TO_REDIRECT`: **80**: http 重定向服务监听的端口。当 `REDIRECT_OTHER_PORT` 为 true 时使用。 +- `SSL_MIN_VERSION`: **TLSv1.2**: 设置最低支持的 SSL 版本。 +- `SSL_MAX_VERSION`: **_empty_**: 设置最大支持的 SSL 版本。 +- `SSL_CURVE_PREFERENCES`: **X25519,P256**: 设置首选的曲线。 +- `SSL_CIPHER_SUITES`: **ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305**: 设置首选的密码套件。 + - 如果没有对 AES 套件的硬件支持,默认情况下,ChaCha 套件将优先于 AES 套件。 + - 根据 Go 1.18 的支持的套件有: + - TLS 1.0 - 1.2 套件 + - "rsa_with_rc4_128_sha" + - "rsa_with_3des_ede_cbc_sha" + - "rsa_with_aes_128_cbc_sha" + - "rsa_with_aes_256_cbc_sha" + - "rsa_with_aes_128_cbc_sha256" + - "rsa_with_aes_128_gcm_sha256" + - "rsa_with_aes_256_gcm_sha384" + - "ecdhe_ecdsa_with_rc4_128_sha" + - "ecdhe_ecdsa_with_aes_128_cbc_sha" + - "ecdhe_ecdsa_with_aes_256_cbc_sha" + - "ecdhe_rsa_with_rc4_128_sha" + - "ecdhe_rsa_with_3des_ede_cbc_sha" + - "ecdhe_rsa_with_aes_128_cbc_sha" + - "ecdhe_rsa_with_aes_256_cbc_sha" + - "ecdhe_ecdsa_with_aes_128_cbc_sha256" + - "ecdhe_rsa_with_aes_128_cbc_sha256" + - "ecdhe_rsa_with_aes_128_gcm_sha256" + - "ecdhe_ecdsa_with_aes_128_gcm_sha256" + - "ecdhe_rsa_with_aes_256_gcm_sha384" + - "ecdhe_ecdsa_with_aes_256_gcm_sha384" + - "ecdhe_rsa_with_chacha20_poly1305_sha256" + - "ecdhe_ecdsa_with_chacha20_poly1305_sha256" + - TLS 1.3 套件 + - "aes_128_gcm_sha256" + - "aes_256_gcm_sha384" + - "chacha20_poly1305_sha256" + - 别名 + - "ecdhe_rsa_with_chacha20_poly1305" 是 "ecdhe_rsa_with_chacha20_poly1305_sha256" 的别名 + - "ecdhe_ecdsa_with_chacha20_poly1305" 是 "ecdhe_ecdsa_with_chacha20_poly1305_sha256" 的别名 +- `ENABLE_ACME`: **false**: 通过 ACME 能力的证书颁发机构(CA)服务器(默认为 Let's Encrypt)启用自动证书管理的标志。如果启用,将忽略 `CERT_FILE` 和 `KEY_FILE`,并且 CA 必须将 `DOMAIN` 解析为此 Gitea 服务器。确保设置了 DNS 记录,并且端口 `80` 或端口 `443` 可以被 CA 服务器访问(默认情况下是公共互联网),并重定向到相应的端口 `PORT_TO_REDIRECT` 或 `HTTP_PORT`。 +- `ACME_URL`: **_empty_**: CA 的 ACME 目录 URL,例如自托管的 [smallstep CA 服务器](https://github.com/smallstep/certificates),它可以是 `https://ca.example.com/acme/acme/directory`。如果留空,默认使用 Let's Encrypt 的生产 CA(还要检查 `LETSENCRYPT_ACCEPTTOS`)。 +- `ACME_ACCEPTTOS`: **false**: 这是一个明确的检查,您是否接受 ACME 提供者的服务条款。默认为 Let's Encrypt 的 [服务条款](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf)。 +- `ACME_DIRECTORY`: **https**: 证书管理器用于缓存证书和私钥等信息的目录。 +- `ACME_EMAIL`: **_empty_**: 用于 ACME 注册的电子邮件。通常用于通知有关已颁发的证书的问题。 +- `ACME_CA_ROOT`: **_empty_**: CA 的根证书。如果留空,默认使用系统的信任链。 +- `ALLOW_GRACEFUL_RESTARTS`: **true**: 在 SIGHUP 时执行优雅重启。 +- `GRACEFUL_HAMMER_TIME`: **60s**: 在重新启动后,父进程将停止接受新连接,并允许请求在停止之前完成。如果耗时超过此时间,则会强制关闭关闭。 +- `STARTUP_TIMEOUT`: **0**: 如果启动超过提供的时间,将关闭服务器。在 Windows 上设置这将向 SVC 主机发送一个等待提示,告诉 SVC 主机启动可能需要一些时间。请注意,启动由监听器(HTTP/HTTPS/SSH)的打开来确定。索引程序可能需要更长时间启动,可能具有自己的超时时间。 + +## 数据库 (`database`) + +- `DB_TYPE`: **mysql**: 数据库类型 \[mysql, postgres, mssql, sqlite3\]。 +- `HOST`: **127.0.0.1:3306**: 数据库主机地址和端口或 unix 套接字的绝对路径 \[mysql, postgres\](例如:/var/run/mysqld/mysqld.sock)。 +- `NAME`: **gitea**: 数据库名称。 +- `USER`: **root**: 数据库用户名。 +- `PASSWD`: **_empty_**: 数据库密码。如果密码包含特殊字符,请使用 \`your password\` 或 """your password"""。 +- `SCHEMA`: **_empty_**: 对于 PostgreSQL,如果与 "public" 不同的模式。模式必须事先存在,用户必须对其具有创建特权,并且用户搜索路径必须设置为首先查找模式(例如 `ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;`)。 +- `SSL_MODE`: **disable**: MySQL 或 PostgreSQL 数据库是否启用 SSL 模式,仅适用于 MySQL 和 PostgreSQL。 + - MySQL 的有效值: + - `true`:启用 TLS,并针对数据库服务器证书根证书进行验证。选择此选项时,请确保用于验证数据库服务器证书的根证书(例如 CA 证书)位于数据库服务器和 Gitea 服务器的系统证书存储中。有关如何将 CA 证书添加到证书存储的说明,请参阅系统文档。 + - `false`:禁用 TLS。 + - `disable`:`false` 的别名,与 PostgreSQL 兼容。 + - `skip-verify`:启用 TLS,但不进行数据库服务器证书验证。如果数据库服务器上有自签名或无效证书,请使用此选项。 + - `prefer`:启用 TLS,并回退到非 TLS 连接。 + - PostgreSQL 的有效值: + - `disable`:禁用 TLS。 + - `require`:启用 TLS,但不进行任何验证。 + - `verify-ca`:启用 TLS,并对数据库服务器证书进行根证书验证。 + - `verify-full`:启用 TLS,并验证数据库服务器名称是否与给定的证书的 "Common Name" 或 "Subject Alternative Name" 字段匹配。 +- `SQLITE_TIMEOUT`:**500**: 仅适用于 SQLite3 的查询超时。 +- `SQLITE_JOURNAL_MODE`:**""**: 更改 SQlite3 的日志模式。可以用于在高负载导致写入拥塞时启用 [WAL 模式](https://www.sqlite.org/wal.html)。有关可能的值,请参阅 [SQlite3 文档](https://www.sqlite.org/pragma.html#pragma_journal_mode)。默认为数据库文件的默认值,通常为 DELETE。 +- `ITERATE_BUFFER_SIZE`:**50**: 用于迭代的内部缓冲区大小。 +- `PATH`:**data/gitea.db**: 仅适用于 SQLite3 的数据库文件路径。 +- `LOG_SQL`:**false**: 记录已执行的 SQL。 +- `DB_RETRIES`:**10**: 允许多少次 ORM 初始化 / DB 连接尝试。 +- `DB_RETRY_BACKOFF`:**3s**: 如果发生故障,等待另一个 ORM 初始化 / DB 连接尝试的 time.Duration。 +- `MAX_OPEN_CONNS`:**0**: 数据库最大打开连接数 - 默认为 0,表示没有限制。 +- `MAX_IDLE_CONNS`:**2**: 连接池上的最大空闲数据库连接数,默认为 2 - 这将限制为 `MAX_OPEN_CONNS`。 +- `CONN_MAX_LIFETIME`:**0 或 3s**: 设置 DB 连接可以重用的最长时间 - 默认为 0,表示没有限制(除了 MySQL,其中为 3s - 请参见 #6804 和 #7071)。 +- `AUTO_MIGRATION`:**true**: 是否自动执行数据库模型迁移。 + +请参见 #8540 和 #8273 以获取有关 `MAX_OPEN_CONNS`、`MAX_IDLE_CONNS` 和 `CONN_MAX_LIFETIME` 的适当值及其与端口耗尽的关系的进一步讨论。 + +## 索引 (`indexer`) + +- `ISSUE_INDEXER_TYPE`: **bleve**: 工单索引类型,当前支持:`bleve`、`db`、`elasticsearch` 或 `meilisearch`。 +- `ISSUE_INDEXER_CONN_STR`:\*\*\*\* : 工单索引连接字符串,仅适用于 elasticsearch 和 meilisearch(例如:`http://elastic:password@localhost:9200`)或者(例如:`http://:apikey@localhost:7700`)。 +- `ISSUE_INDEXER_NAME`:**gitea_issues**: 工单索引器名称,在 ISSUE_INDEXER_TYPE 为 elasticsearch 或 meilisearch 时可用。 +- `ISSUE_INDEXER_PATH`:**indexers/issues.bleve**: 用于工单搜索的索引文件;在 ISSUE*INDEXER_TYPE 为 bleve 和 elasticsearch 时可用。相对路径将相对于 *`AppWorkPath`\_ 进行绝对路径化。 + +- `REPO_INDEXER_ENABLED`:**false**: 启用代码搜索(占用大量磁盘空间,约为存储库大小的 6 倍)。 +- `REPO_INDEXER_REPO_TYPES`:**sources,forks,mirrors,templates**: 存储库索引器单元。要索引的项目可以是 `sources`、`forks`、`mirrors`、`templates` 或它们的任何组合,用逗号分隔。如果为空,则默认为仅 `sources`,如果要完全禁用,请参见 `REPO_INDEXER_ENABLED`。 +- `REPO_INDEXER_TYPE`:**bleve**: 代码搜索引擎类型,可以为 `bleve` 或者 `elasticsearch`。 +- `REPO_INDEXER_PATH`:**indexers/repos.bleve**: 用于代码搜索的索引文件。 +- `REPO_INDEXER_CONN_STR`:\*\*\*\*: 代码索引器连接字符串,在 `REPO_INDEXER_TYPE` 为 elasticsearch 时可用。例如:`http://elastic:password@localhost:9200` +- `REPO_INDEXER_NAME`:**gitea_codes**: 代码索引器名称,在 `REPO_INDEXER_TYPE` 为 elasticsearch 时可用。 + +- `REPO_INDEXER_INCLUDE`:**empty**: 逗号分隔的 glob 模式列表(参见 [https://github.com/gobwas/glob](https://github.com/gobwas/glob))以用于**包括**在索引中。使用 `**.txt` 匹配任何具有 .txt 扩展名的文件。空列表表示包括所有文件。 +- `REPO_INDEXER_EXCLUDE`:**empty**: 逗号分隔的 glob 模式列表(参见 [https://github.com/gobwas/glob](https://github.com/gobwas/glob))以用于**排除**在索引中。即使在 `REPO_INDEXER_INCLUDE` 中匹配,也不会索引与此列表匹配的文件。 +- `REPO_INDEXER_EXCLUDE_VENDORED`:**true**: 从索引中排除 vendored 文件。 +- `MAX_FILE_SIZE`:**1048576**: 要索引的文件的最大字节数。 +- `STARTUP_TIMEOUT`:**30s**: 如果索引器启动时间超过此超时时间 - 则失败。(此超时时间将添加到上面的锤子时间中,用于子进程 - 因为 bleve 不会在上一个父进程关闭之前启动)。设置为 -1 表示永不超时。 + +## 队列 (`queue` and `queue.*`) + +[queue] 配置在 `[queue.*]` 下为各个队列设置默认值,并允许为各个队列设置单独的配置覆盖。(不过请参见下文。) + +- `TYPE`:**level**: 通用队列类型,当前支持:`level`(在内部使用 LevelDB)、`channel`、`redis`、`dummy`。无效的类型将视为 `level`。 +- `DATADIR`:**queues/common**: 用于存储 level 队列的基本 DataDir。单独的队列的 `DATADIR` 可以在 `queue.name` 部分进行设置。相对路径将根据 `{APP_DATA_PATH}` 变为绝对路径。 +- `LENGTH`:**100000**: 通道队列阻塞之前的最大队列大小 +- `BATCH_LENGTH`:**20**: 在传递给处理程序之前批处理数据 +- `CONN_STR`:**redis://127.0.0.1:6379/0**: redis 队列类型的连接字符串。对于 `redis-cluster`,使用 `redis+cluster://127.0.0.1:6379/0`。可以使用查询参数来设置选项。类似地,LevelDB 选项也可以使用:**leveldb://relative/path?option=value** 或 **leveldb:///absolute/path?option=value** 进行设置,并将覆盖 `DATADIR`。 +- `QUEUE_NAME`:**\_queue**: 默认的 redis 和磁盘队列名称的后缀。单独的队列将默认为 **`name`**`QUEUE_NAME`,但可以在特定的 `queue.name` 部分中进行覆盖。 +- `SET_NAME`:**\_unique**: 将添加到默认的 redis 和磁盘队列 `set` 名称中以用于唯一队列的后缀。单独的队列将默认为 **`name`**`QUEUE_NAME`_`SET_NAME`_,但可以在特定的 `queue.name` 部分中进行覆盖。 +- `MAX_WORKERS`:**(dynamic)**: 队列的最大工作协程数。默认值为 "CpuNum/2",限制在 1 到 10 之间。 + +Gitea 创建以下非唯一队列: + +- `code_indexer` +- `issue_indexer` +- `notification-service` +- `task` +- `mail` +- `push_update` + +以及以下唯一队列: + +- `repo_stats_update` +- `repo-archive` +- `mirror` +- `pr_patch_checker` + +## Admin (`admin`) + +- `DEFAULT_EMAIL_NOTIFICATIONS`: **enabled**: 用户电子邮件通知的默认配置(用户可配置)。选项:enabled、onmention、disabled +- `DISABLE_REGULAR_ORG_CREATION`: **false**: 禁止普通(非管理员)用户创建组织。 +- `USER_DISABLED_FEATURES`:**_empty_** 禁用的用户特性,当前允许为空或者 `deletion`,`manage_ssh_keys`, `manage_gpg_keys` 未来可以增加更多设置。 + - `deletion`: 用户不能通过界面或者 API 删除他自己。 + - `manage_ssh_keys`: 用户不能通过界面或者 API 配置 SSH Keys。 + - `manage_gpg_keys`: 用户不能配置 GPG 密钥。 + +## 安全性 (`security`) + +- `INSTALL_LOCK`: **false**: 控制是否能够访问安装向导页面,设置为 `true` 则禁止访问安装向导页面。 +- `SECRET_KEY`: **\<每次安装时随机生成\>**: 全局服务器安全密钥。这个密钥非常重要,如果丢失将无法解密加密的数据(例如 2FA)。 +- `SECRET_KEY_URI`: **_empty_**: 与定义 `SECRET_KEY` 不同,此选项可用于使用存储在文件中的密钥(示例值:`file:/etc/gitea/secret_key`)。它不应该像 `SECRET_KEY` 一样容易丢失。 +- `LOGIN_REMEMBER_DAYS`: **31**: 在要求重新登录之前,记住用户的登录状态多长时间(以天为单位)。 +- `COOKIE_REMEMBER_NAME`: **gitea_incredible**: 保存自动登录信息的 Cookie 名称。 +- `REVERSE_PROXY_AUTHENTICATION_USER`: **X-WEBAUTH-USER**: 反向代理认证的 HTTP 头部名称,用于提供用户信息。 +- `REVERSE_PROXY_AUTHENTICATION_EMAIL`: **X-WEBAUTH-EMAIL**: 反向代理认证的 HTTP 头部名称,用于提供邮箱信息。 +- `REVERSE_PROXY_AUTHENTICATION_FULL_NAME`: **X-WEBAUTH-FULLNAME**: 反向代理认证的 HTTP 头部名称,用于提供全名信息。 +- `REVERSE_PROXY_LIMIT`: **1**: 解释 X-Forwarded-For 标头或 X-Real-IP 标头,并将其设置为请求的远程 IP。 + 可信代理计数。设置为零以不使用这些标头。 +- `REVERSE_PROXY_TRUSTED_PROXIES`: **127.0.0.0/8,::1/128**: 逗号分隔的受信任代理服务器的 IP 地址和网络列表。使用 `*` 来信任全部。 +- `DISABLE_GIT_HOOKS`: **true**: 设置为 `false` 以允许具有 Git 钩子权限的用户创建自定义 Git 钩子。 + 警告:自定义 Git 钩子可用于在主机操作系统上执行任意代码。这允许用户访问和修改此配置文件和 Gitea 数据库,并中断 Gitea 服务。 + 通过修改 Gitea 数据库,用户可以获得 Gitea 管理员权限。 + 它还使他们可以访问正在运行 Gitea 实例的操作系统上用户可用的其他资源,并以 Gitea 操作系统用户的名义执行任意操作。 + 这可能对您的网站或操作系统造成危害。 + 在必要之前,请在更改现有 git 存储库中的钩子之前进行调整。 +- `DISABLE_WEBHOOKS`: **false**: 设置为 `true` 以禁用 Webhooks 功能。 +- `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: 设置为 `false` 以允许本地用户在未设置 Gitea 环境的情况下推送到 Gitea 存储库。不建议这样做,如果您希望本地用户推送到 Gitea 存储库,应该适当地设置环境。 +- `IMPORT_LOCAL_PATHS`: **false**: 设置为 `false` 以防止所有用户(包括管理员)从服务器上导入本地路径。 +- `INTERNAL_TOKEN`: **\<每次安装时随机生成,如果未设置 URI\>**: 用于验证 Gitea 二进制文件内部通信的密钥。 +- `INTERNAL_TOKEN_URI`: **_empty_**: 与在配置中定义 `INTERNAL_TOKEN` 不同,此配置选项可用于将包含内部令牌的文件的路径提供给 Gitea(示例值:`file:/etc/gitea/internal_token`)。 +- `PASSWORD_HASH_ALGO`: **pbkdf2**: 要使用的哈希算法 \[argon2、pbkdf2、pbkdf2_v1、pbkdf2_hi、scrypt、bcrypt\],argon2 和 scrypt 将消耗大量内存。 + - 注意:`pbkdf2` 哈希的默认参数已更改 - 先前的设置可作为 `pbkdf2_v1` 使用,但不建议使用。 + - 可以通过在算法后使用 `$` 进行调整: + - `argon2$