From a45952a3975c1797a2e9055e3ea714eccf5fae7e Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sun, 28 Apr 2024 21:02:38 +0800 Subject: [PATCH 01/11] Fix documentation build problems because of MDX syntax conflicts (#30744) (#30745) Backport #30744 by @lunny Documentation building has encountered a problem like below. This is because MDX syntax doesn't allow `{customPath}`, we have to use \`{customPath}\` ``` Error: Can't render static file for pathname "/next/administration/config-cheat-sheet" at generateStaticFile (/workspace/gitea/gitea-docusaurus/node_modules/@docusaurus/core/lib/ssg.js:119:15) at runNextTicks (node:internal/process/task_queues:60:5) at process.processImmediate (node:internal/timers:449:9) at async /workspace/gitea/gitea-docusaurus/node_modules/p-map/index.js:57:22 { [cause]: ReferenceError: CustomPath is not defined at _createMdxContent (server.bundle.js:4406:106) at MDXContent (server.bundle.js:10745:8) at Uc (server.bundle.js:264171:44) at Xc (server.bundle.js:264173:253) at Z (server.bundle.js:264179:89) at Yc (server.bundle.js:264182:98) at $c (server.bundle.js:264181:140) at Z (server.bundle.js:264179:345) at Xc (server.bundle.js:264177:231) at Z (server.bundle.js:264179:89) ``` Co-authored-by: Lunny Xiao --- administration/config-cheat-sheet.en-us.md | 4 ++-- administration/config-cheat-sheet.zh-cn.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md index 7bf23c9b..5066e0f8 100644 --- a/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -214,9 +214,9 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `SITEMAP_PAGING_NUM`: **20**: Number of items that are displayed in a single subsitemap. - `GRAPH_MAX_COMMIT_NUM`: **100**: Number of maximum commits shown in the commit graph. - `CODE_COMMENT_LINES`: **4**: Number of line of codes shown for a code comment. -- `DEFAULT_THEME`: **gitea-auto**: Set the default theme for the Gitea installation, custom themes could be provided by "{CustomPath}/public/assets/css/theme-*.css". +- `DEFAULT_THEME`: **gitea-auto**: Set the default theme for the Gitea installation, custom themes could be provided by `{CustomPath}/public/assets/css/theme-*.css`. - `SHOW_USER_EMAIL`: **true**: Whether the email of the user should be shown in the Explore Users page. -- `THEMES`: **_empty_**: All available themes by "{CustomPath}/public/assets/css/theme-*.css". Allow users select personalized themes. +- `THEMES`: **_empty_**: All available themes by `{CustomPath}/public/assets/css/theme-*.css`. Allow users select personalized themes. - `MAX_DISPLAY_FILE_SIZE`: **8388608**: Max size of files to be displayed (default is 8MiB) - `AMBIGUOUS_UNICODE_DETECTION`: **true**: Detect ambiguous unicode characters in file contents and show warnings on the UI - `REACTIONS`: All available reactions users can choose on issues/prs and comments diff --git a/administration/config-cheat-sheet.zh-cn.md b/administration/config-cheat-sheet.zh-cn.md index 0d08a5e5..3bb31d3d 100644 --- a/administration/config-cheat-sheet.zh-cn.md +++ b/administration/config-cheat-sheet.zh-cn.md @@ -212,9 +212,9 @@ menu: - `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" 提供。 +- `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" 提供)。允许用户选择个性化的主题, +- `THEMES`: **_empty_**: 所有可用的主题(由 `{CustomPath}/public/assets/css/theme-*.css` 提供)。允许用户选择个性化的主题, - `MAX_DISPLAY_FILE_SIZE`: **8388608**: 能够显示文件的最大大小(默认为8MiB)。 - `REACTIONS`: 用户可以在问题(Issue)、Pull Request(PR)以及评论中选择的所有可选的反应。 这些值可以是表情符号别名(例如::smile:)或Unicode表情符号。 From b3713f57803fc79746937e82d9ee88a58b1cdfd0 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 29 Apr 2024 07:51:42 +0800 Subject: [PATCH 02/11] Gitea with first upper case + typos (#30739) (#30747) Backport #30739 by @mainboarder * Corrected gitea to Gitea * fixed some typos Co-authored-by: mainboarder --- usage/repo-mirror.en-us.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usage/repo-mirror.en-us.md b/usage/repo-mirror.en-us.md index 8804a888..9d231598 100644 --- a/usage/repo-mirror.en-us.md +++ b/usage/repo-mirror.en-us.md @@ -58,7 +58,7 @@ 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 using act for continuous integration. +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**. @@ -91,10 +91,10 @@ The repository pushes shortly thereafter. To force a push, select the **Synchron ### Mirror an existing ssh repository -Currently gitea supports no ssh push mirrors. You can work around this by adding a `post-receive` hook to your gitea repository that pushes manually. +Currently Gitea supports no ssh push mirrors. You can work around this by adding a `post-receive` hook to your Gitea repository that pushes manually. -1. Make sure the user running gitea has access to the git repo you are trying to mirror to from shell. -2. On the Webinterface at the repository settings > git hooks add a post-receive hook for the mirror. I.e. +1. Make sure the user running Gitea has access to the git repo you are trying to mirror to from shell. +2. On the web interface at the repository settings > git hooks add a post-receive hook for the mirror. I.e. ``` #!/usr/bin/env bash From c0872a2a9023c875d50b7da43a9978ced9e54ce6 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 14 May 2024 00:14:31 +0800 Subject: [PATCH 03/11] fix: change npm scope registry (#30964) (#30965) Backport #30964 by @llxlr https://docs.npmjs.com/cli/v10/using-npm/scope#associating-a-scope-with-a-registry Co-authored-by: james yang --- usage/packages/npm.en-us.md | 4 ++-- usage/packages/npm.zh-cn.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usage/packages/npm.en-us.md b/usage/packages/npm.en-us.md index 1590b962..ccc075b1 100644 --- a/usage/packages/npm.en-us.md +++ b/usage/packages/npm.en-us.md @@ -30,7 +30,7 @@ The following examples use the `npm` tool with the scope `@test`. To register the package registry you need to configure a new package source. ```shell -npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/ +npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}" ``` @@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t For example: ```shell -npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/ +npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/ npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token" ``` diff --git a/usage/packages/npm.zh-cn.md b/usage/packages/npm.zh-cn.md index d51b8b78..772cdc08 100644 --- a/usage/packages/npm.zh-cn.md +++ b/usage/packages/npm.zh-cn.md @@ -30,7 +30,7 @@ menu: 要注册软件包注册表,您需要配置一个新的软件包源。 ```shell -npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/ +npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}" ``` @@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t 例如: ```shell -npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/ +npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/ npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token" ``` From 17747f61beeeccb9493751815b0eb98ce6d61852 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sun, 19 May 2024 23:22:54 +0800 Subject: [PATCH 04/11] Improve reverse proxy documents and clarify the AppURL guessing behavior (#31003) (#31020) Backport #31003 by wxiaoguang Fix #31002 1. Mention Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea 2. Clarify the basic requirements and move the "general configuration" to the top 3. Add a comment for the "container registry" 4. Use 1.21 behavior if the reverse proxy is not correctly configured Co-authored-by: wxiaoguang Co-authored-by: KN4CK3R --- administration/reverse-proxies.en-us.md | 92 +++++++++++++------------ 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/administration/reverse-proxies.en-us.md b/administration/reverse-proxies.en-us.md index fe54c67d..5fbd0eb0 100644 --- a/administration/reverse-proxies.en-us.md +++ b/administration/reverse-proxies.en-us.md @@ -17,15 +17,35 @@ menu: # Reverse Proxies +## General configuration + +1. Set `[server] ROOT_URL = https://git.example.com/` in your `app.ini` file. +2. Make the reverse-proxy pass `https://git.example.com/foo` to `http://gitea:3000/foo`. +3. Make sure the reverse-proxy does not decode the URI. The request `https://git.example.com/a%2Fb` should be passed as `http://gitea:3000/a%2Fb`. +4. Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea to make Gitea see the real URL being visited. + +### Use a sub-path + +Usually it's **not recommended** to put Gitea in a sub-path, it's not widely used and may have some issues in rare cases. + +To make Gitea work with a sub-path (eg: `https://common.example.com/gitea/`), +there are some extra requirements besides the general configuration above: + +1. Use `[server] ROOT_URL = https://common.example.com/gitea/` in your `app.ini` file. +2. Make the reverse-proxy pass `https://common.example.com/gitea/foo` to `http://gitea:3000/foo`. +3. The container registry requires a fixed sub-path `/v2` at the root level which must be configured: + - Make the reverse-proxy pass `https://common.example.com/v2` to `http://gitea:3000/v2`. + - Make sure the URI and headers are also correctly passed (see the general configuration above). + ## Nginx -If you want Nginx to serve your Gitea instance, add the following `server` section to the `http` section of `nginx.conf`: +If you want Nginx to serve your Gitea instance, add the following `server` section to the `http` section of `nginx.conf`. -``` +Make sure `client_max_body_size` is large enough, otherwise there would be "413 Request Entity Too Large" error when uploading large files. + +```nginx server { - listen 80; - server_name git.example.com; - + ... location / { client_max_body_size 512M; proxy_pass http://localhost:3000; @@ -39,37 +59,35 @@ server { } ``` -### Resolving Error: 413 Request Entity Too Large - -This error indicates nginx is configured to restrict the file upload size, -it affects attachment uploading, form posting, package uploading and LFS pushing, etc. -You can fine tune the `client_max_body_size` option according to [nginx document](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size). - ## Nginx with a sub-path -In case you already have a site, and you want Gitea to share the domain name, you can setup Nginx to serve Gitea under a sub-path by adding the following `server` section inside the `http` section of `nginx.conf`: +In case you already have a site, and you want Gitea to share the domain name, +you can setup Nginx to serve Gitea under a sub-path by adding the following `server` section +into the `http` section of `nginx.conf`: -``` +```nginx server { - listen 80; - server_name git.example.com; - - # Note: Trailing slash - location /gitea/ { + ... + location ~ ^/(gitea|v2)($|/) { client_max_body_size 512M; - # make nginx use unescaped URI, keep "%2F" as is + # make nginx use unescaped URI, keep "%2F" as-is, remove the "/gitea" sub-path prefix, pass "/v2" as-is. rewrite ^ $request_uri; - rewrite ^/gitea(/.*) $1 break; + rewrite ^(/gitea)?(/.*) $2 break; proxy_pass http://127.0.0.1:3000$uri; # other common HTTP headers, see the "Nginx" config section above - proxy_set_header ... + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; } } ``` -Then you **MUST** set something like `[server] ROOT_URL = http://git.example.com/git/` correctly in your configuration. +Then you **MUST** set something like `[server] ROOT_URL = http://git.example.com/gitea/` correctly in your configuration. ## Nginx and serve static resources directly @@ -93,7 +111,7 @@ or use a cdn for the static files. Set `[server] STATIC_URL_PREFIX = /_/static` in your configuration. -```apacheconf +```nginx server { listen 80; server_name git.example.com; @@ -112,7 +130,7 @@ server { Set `[server] STATIC_URL_PREFIX = http://cdn.example.com/gitea` in your configuration. -```apacheconf +```nginx # application server running Gitea server { listen 80; @@ -124,7 +142,7 @@ server { } ``` -```apacheconf +```nginx # static content delivery server server { listen 80; @@ -151,6 +169,8 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following ProxyRequests off AllowEncodedSlashes NoDecode ProxyPass / http://localhost:3000/ nocanon + ProxyPreserveHost On + RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} ``` @@ -172,6 +192,8 @@ In case you already have a site, and you want Gitea to share the domain name, yo AllowEncodedSlashes NoDecode # Note: no trailing slash after either /git or port ProxyPass /git http://localhost:3000 nocanon + ProxyPreserveHost On + RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} ``` @@ -183,7 +205,7 @@ Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`. If you want Caddy to serve your Gitea instance, you can add the following server block to your Caddyfile: -```apacheconf +``` git.example.com { reverse_proxy localhost:3000 } @@ -193,7 +215,7 @@ git.example.com { In case you already have a site, and you want Gitea to share the domain name, you can setup Caddy to serve Gitea under a sub-path by adding the following to your server block in your Caddyfile: -```apacheconf +``` git.example.com { route /git/* { uri strip_prefix /git @@ -371,19 +393,3 @@ gitea: This config assumes that you are handling HTTPS on the traefik side and using HTTP between Gitea and traefik. Then you **MUST** set something like `[server] ROOT_URL = http://example.com/gitea/` correctly in your configuration. - -## General sub-path configuration - -Usually it's not recommended to put Gitea in a sub-path, it's not widely used and may have some issues in rare cases. - -If you really need to do so, to make Gitea works with sub-path (eg: `http://example.com/gitea/`), here are the requirements: - -1. Set `[server] ROOT_URL = http://example.com/gitea/` in your `app.ini` file. -2. Make the reverse-proxy pass `http://example.com/gitea/foo` to `http://gitea-server:3000/foo`. -3. Make sure the reverse-proxy not decode the URI, the request `http://example.com/gitea/a%2Fb` should be passed as `http://gitea-server:3000/a%2Fb`. - -## Docker / Container Registry - -The container registry uses a fixed sub-path `/v2` which can't be changed. -Even if you deploy Gitea with a different sub-path, `/v2` will be used by the `docker` client. -Therefore you may need to add an additional route to your reverse proxy configuration. From 487aa249150aaf302cf69ed86c017ac9d68f8150 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 22 May 2024 23:02:34 +0800 Subject: [PATCH 05/11] Sync up deleted branches & action assets related cleanup documentation (#31022) (#31049) Backport #31022 by @kemzeb Syncs up docs associated to actions and deleted branch cleanup i.e. in custom/app.example.ini and the config cheat sheet. Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com> --- administration/config-cheat-sheet.en-us.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/administration/config-cheat-sheet.en-us.md b/administration/config-cheat-sheet.en-us.md index 5066e0f8..628942e8 100644 --- a/administration/config-cheat-sheet.en-us.md +++ b/administration/config-cheat-sheet.en-us.md @@ -974,12 +974,20 @@ Default templates for project boards: - `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. - `UPDATE_EXISTING`: **true**: Create new users, update existing user data and disable users that are not in external source anymore (default) or only create new users if UPDATE_EXISTING is set to false. -## Cron - Cleanup Expired Actions Assets (`cron.cleanup_actions`) +#### Cron - Cleanup Expired Actions Assets (`cron.cleanup_actions`) - `ENABLED`: **true**: Enable cleanup expired actions assets job. - `RUN_AT_START`: **true**: Run job at start time (if ENABLED). - `SCHEDULE`: **@midnight** : Cron syntax for the job. +#### Cron - Cleanup Deleted Branches (`cron.deleted_branches_cleanup`) + +- `ENABLED`: **true**: Enable deleted branches cleanup. +- `RUN_AT_START`: **true**: Run job at start time (if ENABLED). +- `NOTICE_ON_SUCCESS`: **false**: Set to true to log a success message. +- `SCHEDULE`: **@midnight**: Cron syntax for scheduling deleted branches cleanup. +- `OLDER_THAN`: **24h**: Branches deleted OLDER_THAN ago will be cleaned up. + ### Extended cron tasks (not enabled by default) #### Cron - Garbage collect all repositories (`cron.git_gc_repos`) From a7dda04aff79b25bae2c9a0e2aa67f8e32849e7a Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 22 May 2024 23:04:40 +0800 Subject: [PATCH 06/11] Update Actions documentation missing feature (#31034) (#31048) Backport #31034 by @lunny Fix https://github.com/go-gitea/gitea/issues/25897#issuecomment-2117145391 Co-authored-by: Lunny Xiao Co-authored-by: silverwind Co-authored-by: yp05327 <576951401@qq.com> --- usage/actions/comparison.en-us.md | 4 ++++ usage/actions/comparison.zh-cn.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/usage/actions/comparison.en-us.md b/usage/actions/comparison.en-us.md index 1ea3afac..5b084e09 100644 --- a/usage/actions/comparison.en-us.md +++ b/usage/actions/comparison.en-us.md @@ -108,6 +108,10 @@ See [Creating an annotation for an error](https://docs.github.com/en/actions/usi It's ignored by Gitea Actions now. +### Expressions + +For [expressions](https://docs.github.com/en/actions/learn-github-actions/expressions), only [`always()`](https://docs.github.com/en/actions/learn-github-actions/expressions#always) is supported. + ## Missing UI features ### Pre and Post steps diff --git a/usage/actions/comparison.zh-cn.md b/usage/actions/comparison.zh-cn.md index 16b2181b..79450e8e 100644 --- a/usage/actions/comparison.zh-cn.md +++ b/usage/actions/comparison.zh-cn.md @@ -108,6 +108,10 @@ Gitea Actions目前不支持此功能。 Gitea Actions目前不支持此功能。 +### 表达式 + +对于 [表达式](https://docs.github.com/en/actions/learn-github-actions/expressions), 当前仅 [`always()`](https://docs.github.com/en/actions/learn-github-actions/expressions#always) 被支持。 + ## 缺失的UI功能 ### 预处理和后处理步骤 From 6e0c43227b778506483d95e3e1e178e47d81d099 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 27 May 2024 21:54:19 +0800 Subject: [PATCH 07/11] Update pip related commands for docker (#31106) (#31111) Backport #31106 by wxiaoguang Co-authored-by: wxiaoguang --- administration/external-renderers.en-us.md | 6 ++---- administration/external-renderers.zh-cn.md | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/administration/external-renderers.en-us.md b/administration/external-renderers.en-us.md index 1e41b801..fec2ab64 100644 --- a/administration/external-renderers.en-us.md +++ b/administration/external-renderers.en-us.md @@ -38,12 +38,10 @@ FROM gitea/gitea:@version@ COPY custom/app.ini /data/gitea/conf/app.ini [...] -RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng libffi-dev py-pip python3-dev py3-pip py3-pyzmq +RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng libffi-dev pandoc python3-dev py3-pyzmq pipx # install any other package you need for your external renderers -RUN pip3 install --upgrade pip -RUN pip3 install -U setuptools -RUN pip3 install jupyter docutils +RUN pipx install jupyter docutils --include-deps # add above any other python package you may need to install ``` diff --git a/administration/external-renderers.zh-cn.md b/administration/external-renderers.zh-cn.md index fdf7315d..1e56d95a 100644 --- a/administration/external-renderers.zh-cn.md +++ b/administration/external-renderers.zh-cn.md @@ -37,12 +37,10 @@ FROM gitea/gitea:@version@ COPY custom/app.ini /data/gitea/conf/app.ini [...] -RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng libffi-dev py-pip python3-dev py3-pip py3-pyzmq +RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng libffi-dev pandoc python3-dev py3-pyzmq pipx # 安装其他您需要的外部渲染器的软件包 -RUN pip3 install --upgrade pip -RUN pip3 install -U setuptools -RUN pip3 install jupyter docutils +RUN pipx install jupyter docutils --include-deps # 在上面添加您需要安装的任何其他 Python 软件包 ``` From 29fa46e86e8d005e670b784310a1d4ed32c63101 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 27 May 2024 23:05:49 +0800 Subject: [PATCH 08/11] Move documents under actions (#31110) (#31116) Backport #31110 by @lunny Move secrets and badge under actions Co-authored-by: Lunny Xiao --- usage/{ => actions}/badge.en-us.md | 4 +--- usage/{ => actions}/secrets.en-us.md | 4 +--- usage/{ => actions}/secrets.zh-cn.md | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) rename usage/{ => actions}/badge.en-us.md (96%) rename usage/{ => actions}/secrets.en-us.md (96%) rename usage/{ => actions}/secrets.zh-cn.md (96%) diff --git a/usage/badge.en-us.md b/usage/actions/badge.en-us.md similarity index 96% rename from usage/badge.en-us.md rename to usage/actions/badge.en-us.md index 212134e0..de7a34f4 100644 --- a/usage/badge.en-us.md +++ b/usage/actions/badge.en-us.md @@ -5,11 +5,9 @@ slug: "badge" sidebar_position: 11 toc: false draft: false -aliases: - - /en-us/badge menu: sidebar: - parent: "usage" + parent: "actions" name: "Badge" sidebar_position: 11 identifier: "Badge" diff --git a/usage/secrets.en-us.md b/usage/actions/secrets.en-us.md similarity index 96% rename from usage/secrets.en-us.md rename to usage/actions/secrets.en-us.md index 8ad67466..5bf1f1a1 100644 --- a/usage/secrets.en-us.md +++ b/usage/actions/secrets.en-us.md @@ -5,11 +5,9 @@ slug: "secrets" sidebar_position: 50 draft: false toc: false -aliases: - - /en-us/secrets menu: sidebar: - parent: "usage" + parent: "actions" name: "Secrets" sidebar_position: 50 identifier: "usage-secrets" diff --git a/usage/secrets.zh-cn.md b/usage/actions/secrets.zh-cn.md similarity index 96% rename from usage/secrets.zh-cn.md rename to usage/actions/secrets.zh-cn.md index 40e80dc7..939042f0 100644 --- a/usage/secrets.zh-cn.md +++ b/usage/actions/secrets.zh-cn.md @@ -5,11 +5,9 @@ slug: "secrets" sidebar_position: 50 draft: false toc: false -aliases: - - /zh-cn/secrets menu: sidebar: - parent: "usage" + parent: "actions" name: "密钥管理" sidebar_position: 50 identifier: "usage-secrets" From 368cd48a390e42375aa85d27253d1de944a3ad3b Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 29 May 2024 08:54:14 +0800 Subject: [PATCH 09/11] Remove duplicate `ProxyPreserveHost` in Apache httpd doc (#31143) (#31147) Backport #31143 by @HorlogeSkynet --- (fix up for #31003) Co-authored-by: Samuel FORESTIER --- administration/reverse-proxies.en-us.md | 1 - 1 file changed, 1 deletion(-) diff --git a/administration/reverse-proxies.en-us.md b/administration/reverse-proxies.en-us.md index 5fbd0eb0..dff58c10 100644 --- a/administration/reverse-proxies.en-us.md +++ b/administration/reverse-proxies.en-us.md @@ -169,7 +169,6 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following ProxyRequests off AllowEncodedSlashes NoDecode ProxyPass / http://localhost:3000/ nocanon - ProxyPreserveHost On RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} ``` From 4e3fa99205113e7365745a86e283a78476a7306b Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 29 May 2024 09:05:07 +0800 Subject: [PATCH 10/11] Update demo site location from try.gitea.io -> demo.gitea.com (#31054) (#31146) Backport #31054 by @lunny Co-authored-by: Lunny Xiao --- development/api-usage.en-us.md | 2 +- help/faq.en-us.md | 6 +++--- help/faq.zh-cn.md | 6 +++--- help/support.en-us.md | 6 +++--- help/support.zh-cn.md | 6 +++--- index.en-us.md | 2 +- usage/authentication.en-us.md | 2 +- usage/authentication.zh-cn.md | 2 +- usage/issue-pull-request-templates.en-us.md | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/development/api-usage.en-us.md b/development/api-usage.en-us.md index 94dac70b..4fe376b1 100644 --- a/development/api-usage.en-us.md +++ b/development/api-usage.en-us.md @@ -117,7 +117,7 @@ curl -v "http://localhost/api/v1/repos/search?limit=1" API Reference guide is auto-generated by swagger and available on: `https://gitea.your.host/api/swagger` or on the -[Gitea demo instance](https://try.gitea.io/api/swagger) +[Gitea instance](https://gitea.com/api/swagger) The OpenAPI document is at: `https://gitea.your.host/swagger.v1.json` diff --git a/help/faq.en-us.md b/help/faq.en-us.md index ba39ec83..e94f3421 100644 --- a/help/faq.en-us.md +++ b/help/faq.en-us.md @@ -45,7 +45,7 @@ To migrate from GitHub to Gitea, you can use Gitea's built-in migration form. In order to migrate items such as issues, pull requests, etc. you will need to input at least your username. -[Example (requires login)](https://try.gitea.io/repo/migrate) +[Example (requires login)](https://demo.gitea.com/repo/migrate) To migrate from GitLab to Gitea, you can use this non-affiliated tool: @@ -137,9 +137,9 @@ All Gitea instances have the built-in API and there is no way to disable it comp You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`. For more information, refer to Gitea's [API docs](development/api-usage.md). -You can see the latest API (for example) on https://try.gitea.io/api/swagger +You can see the latest API (for example) on https://gitea.com/api/swagger -You can also see an example of the `swagger.json` file at https://try.gitea.io/swagger.v1.json +You can also see an example of the `swagger.json` file at https://gitea.com/swagger.v1.json ## Adjusting your server for public/private use diff --git a/help/faq.zh-cn.md b/help/faq.zh-cn.md index ef8a149a..d24dfe24 100644 --- a/help/faq.zh-cn.md +++ b/help/faq.zh-cn.md @@ -47,7 +47,7 @@ menu: 为了迁移诸如问题、拉取请求等项目,您需要至少输入您的用户名。 -[Example (requires login)](https://try.gitea.io/repo/migrate) +[Example (requires login)](https://demo.gitea.com/repo/migrate) 要从GitLab迁移到Gitea,您可以使用这个非关联的工具: @@ -141,9 +141,9 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。 有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。 -您可以在上查看最新的API(例如)https://try.gitea.io/api/swagger +您可以在上查看最新的API(例如)https://gitea.com/api/swagger -您还可以在上查看`swagger.json`文件的示例 https://try.gitea.io/swagger.v1.json +您还可以在上查看`swagger.json`文件的示例 https://gitea.com/swagger.v1.json ## 调整服务器用于公共/私有使用 diff --git a/help/support.en-us.md b/help/support.en-us.md index db735b81..bc8a8e3f 100644 --- a/help/support.en-us.md +++ b/help/support.en-us.md @@ -19,11 +19,11 @@ menu: - [Paid Commercial Support](https://about.gitea.com/) - [Discord](https://discord.gg/Gitea) -- [Discourse Forum](https://discourse.gitea.io/) +- [Forum](https://forum.gitea.com/) - [Matrix](https://matrix.to/#/#gitea-space:matrix.org) - NOTE: Most of the Matrix channels are bridged with their counterpart in Discord and may experience some degree of flakiness with the bridge process. - Chinese Support - - [Discourse Chinese Category](https://discourse.gitea.io/c/5-category/5) + - [Discourse Chinese Category](https://forum.gitea.com/c/5-category/5) - QQ Group 328432459 # Bug Report @@ -39,7 +39,7 @@ If you found a bug, please [create an issue on GitHub](https://github.com/go-git - When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs. - When using docker, use `docker logs --tail 1000 ` to collect logs. 4. Reproducible steps so that others could reproduce and understand the problem more quickly and easily. - - [try.gitea.io](https://try.gitea.io) could be used to reproduce the problem. + - [demo.gitea.com](https://demo.gitea.com) could be used to reproduce the problem. 5. If you encounter slow/hanging/deadlock problems, please report the stacktrace when the problem occurs. Go to the "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report". diff --git a/help/support.zh-cn.md b/help/support.zh-cn.md index 91b37c58..6c69584c 100644 --- a/help/support.zh-cn.md +++ b/help/support.zh-cn.md @@ -19,11 +19,11 @@ menu: - [付费商业支持](https://about.gitea.com/) - [Discord](https://discord.gg/Gitea) -- [Discourse 论坛](https://discourse.gitea.io/) +- [论坛](https://forum.gitea.com/) - [Matrix](https://matrix.to/#/#gitea-space:matrix.org) - 注意:大多数 Matrix 频道都与 Discord 中的对应频道桥接,可能在桥接过程中会出现一定程度的不稳定性。 - 中文支持 - - [Discourse 中文分类](https://discourse.gitea.io/c/5-category/5) + - [Discourse 中文分类](https://forum.gitea.com/c/5-category/5) - QQ 群 328432459 # Bug 报告 @@ -39,7 +39,7 @@ menu: - 在使用 systemd 时,使用 `journalctl --lines 1000 --unit gitea` 收集日志。 - 在使用 Docker 时,使用 `docker logs --tail 1000 ` 收集日志。 4. 可重现的步骤,以便他人能够更快速、更容易地重现和理解问题。 - - [try.gitea.io](https://try.gitea.io) 可用于重现问题。 + - [demo.gitea.com](https://demo.gitea.com) 可用于重现问题。 5. 如果遇到慢速/挂起/死锁等问题,请在出现问题时报告堆栈跟踪。 转到 "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report"。 diff --git a/index.en-us.md b/index.en-us.md index 170bf26f..35161181 100644 --- a/index.en-us.md +++ b/index.en-us.md @@ -21,7 +21,7 @@ up a self-hosted Git service. With Go, this can be done platform-independently across **all platforms** which Go supports, including Linux, macOS, and Windows, on x86, amd64, ARM and PowerPC architectures. -You can try it out using [the online demo](https://try.gitea.io/). +You can try it out using [the online demo](https://demo.gitea.com). ## Features diff --git a/usage/authentication.en-us.md b/usage/authentication.en-us.md index adc936df..963f03a0 100644 --- a/usage/authentication.en-us.md +++ b/usage/authentication.en-us.md @@ -236,7 +236,7 @@ configure this, set the fields below: - Restrict what domains can log in if using a public SMTP host or SMTP host with multiple domains. - - Example: `gitea.io,mydomain.com,mydomain2.com` + - Example: `gitea.com,mydomain.com,mydomain2.com` - Force SMTPS diff --git a/usage/authentication.zh-cn.md b/usage/authentication.zh-cn.md index d1cfeeb8..00a24531 100644 --- a/usage/authentication.zh-cn.md +++ b/usage/authentication.zh-cn.md @@ -194,7 +194,7 @@ PAM提供了一种机制,通过对用户进行PAM认证来自动将其添加 - 如果使用公共 SMTP 主机或有多个域的 SMTP 主机,限制哪些域可以登录 限制哪些域可以登录。 - - 示例: `gitea.io,mydomain.com,mydomain2.com` + - 示例: `gitea.com,mydomain.com,mydomain2.com` - 强制使用 SMTPS - 默认情况下将使用SMTPS连接到端口465.如果您希望将smtp用于其他端口,自行设置 diff --git a/usage/issue-pull-request-templates.en-us.md b/usage/issue-pull-request-templates.en-us.md index e203c0d3..5220e0c7 100644 --- a/usage/issue-pull-request-templates.en-us.md +++ b/usage/issue-pull-request-templates.en-us.md @@ -308,7 +308,7 @@ This is a example for a issue config file blank_issues_enabled: true contact_links: - name: Gitea - url: https://gitea.io + url: https://gitea.com about: Visit the Gitea Website ``` From e7c9a190a4a6446626eaa36679ff53d9e7c19e96 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 31 May 2024 21:08:04 +0800 Subject: [PATCH 11/11] Fix URL In Gitea Actions Badge Docs (#31191) (#31198) Backport #31191 by @TheBrokenRail The example URL given in the documentation leads to a 404. For instance, `https://your-gitea-instance.com/{owner}/{repo}/actions/workflows/{workflow_file}?branch={branch}&event={event}` translates to `https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/actions/workflows/build.yml`, which is a 404. I had to check the [linked GitHub docs](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge) to learn that you have to add `/badge.svg` to the URL. Example: https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/actions/workflows/build.yml/badge.svg Co-authored-by: TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com> --- usage/actions/badge.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/actions/badge.en-us.md b/usage/actions/badge.en-us.md index de7a34f4..57e5d9d3 100644 --- a/usage/actions/badge.en-us.md +++ b/usage/actions/badge.en-us.md @@ -25,7 +25,7 @@ It is designed to be compatible with [GitHub Actions workflow badge](https://doc You can use the following URL to get the badge: ``` -https://your-gitea-instance.com/{owner}/{repo}/actions/workflows/{workflow_file}?branch={branch}&event={event} +https://your-gitea-instance.com/{owner}/{repo}/actions/workflows/{workflow_file}/badge.svg?branch={branch}&event={event} ``` - `{owner}`: The owner of the repository.