782 Commits
v1.21 ... main

Author SHA1 Message Date
Renovate Bot
45165ceb22 chore(deps): update pnpm to v10.34.1 (#430)
Reviewed-on: https://gitea.com/gitea/docs/pulls/430
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-06-10 15:01:24 +00:00
Renovate Bot
fb856b8432 chore(deps): update dependency @easyops-cn/docusaurus-search-local to v0.55.2 (#431)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@easyops-cn/docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local) ([source](https://github.com/easyops-cn/docusaurus-search-local/tree/HEAD/packages/docusaurus-search-local)) | [`0.55.1` → `0.55.2`](https://renovatebot.com/diffs/npm/@easyops-cn%2fdocusaurus-search-local/0.55.1/0.55.2) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@easyops-cn%2fdocusaurus-search-local/0.55.2?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@easyops-cn%2fdocusaurus-search-local/0.55.1/0.55.2?slim=true) |

---

### Release Notes

<details>
<summary>easyops-cn/docusaurus-search-local (@&#8203;easyops-cn/docusaurus-search-local)</summary>

### [`v0.55.2`](https://github.com/easyops-cn/docusaurus-search-local/releases/tag/v0.55.2)

[Compare Source](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.55.1...v0.55.2)

##### Bug Fixes

- some languages need lunr wordcut ([1e60641](1e60641f5d))
- some languages need lunr wordcut ([d871555](d87155582f)), closes [#&#8203;438](https://github.com/easyops-cn/docusaurus-search-local/issues/438)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- 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.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTEuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://gitea.com/gitea/docs/pulls/431
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-06-10 02:17:40 +00:00
Renovate Bot
8bb0e9f105 chore(deps): update react monorepo to v19.2.7 (#432)
Reviewed-on: https://gitea.com/gitea/docs/pulls/432
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-06-09 14:01:39 +00:00
nico-i
eb5204f658 Added project config to issue template example (#428)
I have updated the docs since this feature is now supported.

Reviewed-on: https://gitea.com/gitea/docs/pulls/428
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: nico-i <nico@ismaili.de>
Co-committed-by: nico-i <nico@ismaili.de>
2026-05-29 16:52:56 +00:00
Zettat123
95106c08e9 docs: split MAX_CREATION_LIMIT into USER_MAX_CREATION_LIMIT and ORG_MAX_CREATION_LIMIT (#427)
Related https://github.com/go-gitea/gitea/pull/37872

Reviewed-on: https://gitea.com/gitea/docs/pulls/427
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: Zettat123 <39446+zettat123@noreply.gitea.com>
Co-committed-by: Zettat123 <39446+zettat123@noreply.gitea.com>
2026-05-28 17:29:35 +00:00
wxiaoguang
478059a7ed Update SSH_PORT comment 2026-05-27 06:01:42 +00:00
harryzcy
69e92d33ec docs: update conan login command for conan v2 (#426)
Conan v1 reached end-of-life. https://blog.conan.io/2024/09/30/Conan-Center-will-stop-receiving-updates-for-Conan-1.html
The command for conan v2 login has changed to `conan remote login`. https://docs.conan.io/2/reference/commands/remote.html#conan-remote-login

I briefly looked at Gitea codebase. Gitea supports conan v2 cli (given functions like `DeleteRecipeV2` and `SearchPackagesV2`)

---------

Co-authored-by: Chongyi Zheng <git@zcy.dev>
Reviewed-on: https://gitea.com/gitea/docs/pulls/426
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: harryzcy <37645+harryzcy@noreply.gitea.com>
Co-committed-by: harryzcy <37645+harryzcy@noreply.gitea.com>
2026-05-26 07:53:05 +00:00
Lunny Xiao
21aad7f5d1 update 1.26.2 (#424)
Reviewed-on: https://gitea.com/gitea/docs/pulls/424
Reviewed-by: Nicolas <bircni@icloud.com>
2026-05-20 21:59:25 +00:00
wxiaoguang
8b31adbc6f fix: make DEFAULT_TITLE_SOURCE default to auto 2026-05-19 08:07:42 +00:00
Renovate Bot
eea1d90216 chore(deps): update react monorepo to v19.2.6 (#423)
Reviewed-on: https://gitea.com/gitea/docs/pulls/423
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-05-14 16:52:34 +00:00
Renovate Bot
19c2342e2f chore(deps): update dependency @mui/material to v9.0.1 (#422)
Reviewed-on: https://gitea.com/gitea/docs/pulls/422
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-05-14 16:36:03 +00:00
Renovate Bot
d9effabc6c chore(deps): update pnpm to v10.33.4 (#418)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm)) | [`10.33.2` → `10.33.4`](https://renovatebot.com/diffs/npm/pnpm/10.33.2/10.33.4) | ![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/10.33.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/10.33.2/10.33.4?slim=true) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/114) for more information.

---

### Configuration

📅 **Schedule**: (UTC)

- 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.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjAuNiIsInVwZGF0ZWRJblZlciI6IjQzLjE2NS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <2021+silverwind@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/418
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-05-07 17:23:56 +00:00
Lunny Xiao
54af905d63 rename act runner to runner (#390)
Depends on gitea/runner#850

---------

Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Reviewed-on: https://gitea.com/gitea/docs/pulls/390
Reviewed-by: techknowlogick <9+techknowlogick@noreply.gitea.com>
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Reviewed-by: Nicolas <bircni@icloud.com>
2026-05-07 17:18:58 +00:00
wxiaoguang
b6b8dbcc64 Update SQLITE_TIMEOUT (#419)
Reviewed-on: https://gitea.com/gitea/docs/pulls/419
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
Co-committed-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
2026-05-07 12:59:34 +00:00
silverwind
5bab08db10 Note OpenSearch compatibility for elasticsearch indexer (#417)
https://github.com/go-gitea/gitea/pull/37411

---
This PR was written with the help of Claude Opus 4.7

Reviewed-on: https://gitea.com/gitea/docs/pulls/417
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-05-04 11:38:21 +00:00
Renovate Bot
173bc20908 chore(deps): update docusaurus monorepo to v3.10.1 (#392)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@docusaurus/core](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus)) | [`3.10.0` → `3.10.1`](https://renovatebot.com/diffs/npm/@docusaurus%2fcore/3.10.0/3.10.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2fcore/3.10.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2fcore/3.10.0/3.10.1?slim=true) |
| [@docusaurus/faster](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-faster)) | [`3.10.0` → `3.10.1`](https://renovatebot.com/diffs/npm/@docusaurus%2ffaster/3.10.0/3.10.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2ffaster/3.10.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2ffaster/3.10.0/3.10.1?slim=true) |
| [@docusaurus/module-type-aliases](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-module-type-aliases)) | [`3.10.0` → `3.10.1`](https://renovatebot.com/diffs/npm/@docusaurus%2fmodule-type-aliases/3.10.0/3.10.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2fmodule-type-aliases/3.10.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2fmodule-type-aliases/3.10.0/3.10.1?slim=true) |
| [@docusaurus/plugin-content-docs](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-plugin-content-docs)) | [`3.10.0` → `3.10.1`](https://renovatebot.com/diffs/npm/@docusaurus%2fplugin-content-docs/3.10.0/3.10.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2fplugin-content-docs/3.10.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2fplugin-content-docs/3.10.0/3.10.1?slim=true) |
| [@docusaurus/preset-classic](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic)) | [`3.10.0` → `3.10.1`](https://renovatebot.com/diffs/npm/@docusaurus%2fpreset-classic/3.10.0/3.10.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2fpreset-classic/3.10.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2fpreset-classic/3.10.0/3.10.1?slim=true) |

---

### Release Notes

<details>
<summary>facebook/docusaurus (@&#8203;docusaurus/core)</summary>

### [`v3.10.1`](https://github.com/facebook/docusaurus/blob/HEAD/CHANGELOG.md#3101-2026-04-30)

[Compare Source](https://github.com/facebook/docusaurus/compare/v3.10.0...v3.10.1)

##### 🐛 Bug Fix

- `docusaurus-bundler`
  - [#&#8203;11981](https://github.com/facebook/docusaurus/pull/11981) fix(bundler): fix v3 webpackbar bug due to webpack breaking change ([@&#8203;slorber](https://github.com/slorber))

##### 🔧 Maintenance

- `docusaurus`
  - [#&#8203;11982](https://github.com/facebook/docusaurus/pull/11982) chore: cherry-pick commits for v3.10.1 patch release ([@&#8203;slorber](https://github.com/slorber))

##### Committers: 1

- Sébastien Lorber ([@&#8203;slorber](https://github.com/slorber))

</details>

---

Reviewed-on: https://gitea.com/gitea/docs/pulls/392
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-05-02 02:05:18 +00:00
Lunny Xiao
14b76120b4 update webhook documentation (#393)
Reviewed-on: https://gitea.com/gitea/docs/pulls/393
2026-05-01 16:40:27 +00:00
wxiaoguang
f550d33ad7 Update SSH_ROOT_PATH / attachment comment (#373)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <2021+silverwind@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/373
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
Co-committed-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
2026-04-28 21:56:14 +00:00
0xGREG
e0fcc861f2 Document DEFAULT_TITLE_SOURCE pull request title setting (#391)
Adds documentation for the `DEFAULT_TITLE_SOURCE` setting.

- Added `DEFAULT_TITLE_SOURCE` to the config cheat sheet under `[repository.pull-request]`
- Added a "Default pull request title" section to the pull request usage docs explaining both modes (`first-commit` and `auto`)

---------

Co-authored-by: Nicolas <bircni@icloud.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/391
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: 0xGREG <gitea@freespeech.work>
Co-committed-by: 0xGREG <gitea@freespeech.work>
2026-04-28 21:45:22 +00:00
Renovate Bot
a0802c6748 chore(deps): update pnpm to v10.33.2 (#388)
Reviewed-on: https://gitea.com/gitea/docs/pulls/388
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-04-28 16:31:48 +00:00
Lunny Xiao
49a6f7649a update 1.26.1 2026-04-25 11:28:59 -07:00
Zettat123
3ef08b184a Add MAX_RERUN_ATTEMPTS to config cheat sheet (#383)
Related https://github.com/go-gitea/gitea/pull/37119

Reviewed-on: https://gitea.com/gitea/docs/pulls/383
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: Zettat123 <39446+zettat123@noreply.gitea.com>
Co-committed-by: Zettat123 <39446+zettat123@noreply.gitea.com>
2026-04-25 18:25:14 +00:00
silverwind
58d5c6c5e3 Add X_CONTENT_TYPE_OPTIONS (#389)
https://github.com/go-gitea/gitea/pull/37354

---
This PR was written with the help of Claude Opus 4.7

---------

Co-authored-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/389
Reviewed-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-04-24 10:54:21 +00:00
wxiaoguang
76b9c25b6d Add CUSTOM_SCHEMES (#387)
https://github.com/go-gitea/gitea/pull/37356
Reviewed-on: https://gitea.com/gitea/docs/pulls/387
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
Co-committed-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
2026-04-22 22:10:57 +00:00
Lunny Xiao
fd5cb8bb44 Follow blog to use blue color for links (#385)
Reviewed-on: https://gitea.com/gitea/docs/pulls/385
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
2026-04-20 17:36:38 +00:00
Lunny Xiao
b5e28002f4 release 1.26.0 (#384)
Reviewed-on: https://gitea.com/gitea/docs/pulls/384
Reviewed-by: techknowlogick <9+techknowlogick@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-04-19 00:46:51 +00:00
Renovate Bot
9fe613c7de chore(deps): update react monorepo to v19.2.5 (#379)
Reviewed-on: https://gitea.com/gitea/docs/pulls/379
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-04-15 15:29:34 +00:00
Renovate Bot
3c6ead6e59 chore(deps): update pnpm/action-setup action to v6 (#382)
Reviewed-on: https://gitea.com/gitea/docs/pulls/382
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-04-15 15:17:51 +00:00
Renovate Bot
c2b6f71085 chore(deps): update docusaurus monorepo to v3.10.0 (#374)
Reviewed-on: https://gitea.com/gitea/docs/pulls/374
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-04-15 15:17:27 +00:00
techknowlogick
4a63d1ea7f update deprecated config option 2026-04-15 14:51:35 +00:00
wxiaoguang
a939f44e37 fix typo
# Conflicts:
#	docs/administration/reverse-proxies.md
2026-04-14 16:09:39 +08:00
silverwind
128cbae023 Sync zh-cn/zh-tw config cheat sheet with English (#381)
Sync the zh-cn and zh-tw `config-cheat-sheet.md` translations with the English source for current and 1.26 versions.

Changes:
- Add 17 missing sections (`qos`, `mailer.override_header`, `markup.external-render-name`, `lfs_client`, `storage_minio`, `storage_azureblob`, `storage_override`, and 10 cron task subsections including the `Actions` cron tasks group)
- Add ~30 missing individual settings across existing sections
- Restructure storage sections to match English (separate Minio/Azure/Override subsections)
- Remove stale settings (`TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`, old inline MINIO duplicates, removed git timeout settings)
- Fix `MERMAID_MAX_SOURCE_CHARACTERS` default value (5000 -> 50000)
- Replace full-width Unicode punctuation (U+FF1A, U+FF08, U+FF09) with ASCII equivalents

All 4 i18n files now have 745 settings matching the English source.

---
This PR was written with the help of Claude Opus 4.6

Reviewed-on: https://gitea.com/gitea/docs/pulls/381
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-04-10 17:39:20 +00:00
silverwind
59bd79347e Document REVERSE_PROXY_LOGOUT_REDIRECT setting (#380)
Add documentation for the new `REVERSE_PROXY_LOGOUT_REDIRECT` setting in the `[security]` section, which allows redirecting users to an external URL or relative path after logout when using reverse proxy authentication.

For Gitea 1.26, ref https://github.com/go-gitea/gitea/pull/36085.

---
This PR was written with the help of Claude Opus 4.6

Reviewed-on: https://gitea.com/gitea/docs/pulls/380
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-04-10 16:50:43 +00:00
Lunny Xiao
a7ab7af00f 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>
2026-04-09 19:27:32 +00:00
Renovate Bot
b339770f3c fix(deps): update dependency @mui/material to v9 (#375)
Reviewed-on: https://gitea.com/gitea/docs/pulls/375
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-04-09 14:15:29 +00:00
silverwind
5e4cd3b577 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 <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-04-08 23:08:20 +00:00
wxiaoguang
57fc84f003 remove "rootful" from title 2026-04-07 17:33:41 +08:00
kmanwar89
9cc5cfd388 Updated various docker compose commands & references (#361)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: kmanwar89 <139654+kmanwar89@noreply.gitea.com>
Co-committed-by: kmanwar89 <139654+kmanwar89@noreply.gitea.com>
2026-04-07 09:24:36 +00:00
TheFox0x7
1568bfa1e9 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>
2026-04-06 20:41:42 +00:00
wxiaoguang
efa6607558 GitHub-like theme-based image display (#372) 2026-04-03 18:25:12 +00:00
silverwind
25dce1df62 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.<name> }}`)

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 <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-03-28 09:27:06 +00:00
TheFox0x7
8660c68d8c 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 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2026-03-27 23:38:53 +00:00
Renovate Bot
c39f423da6 chore(deps): update pnpm to v10.33.0 (#370)
Reviewed-on: https://gitea.com/gitea/docs/pulls/370
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-03-26 21:37:00 +00:00
wxiaoguang
9a00f8ea0c 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>
2026-03-24 15:44:11 +00:00
Excellencedev
0c17ed264d 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 <xiaolunwen@gmail.com>
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Reviewed-by: Nicolas <173651+bircni@noreply.gitea.com>
Co-authored-by: Excellencedev <ademiluyisuccessandexcellence@gmail.com>
Co-committed-by: Excellencedev <ademiluyisuccessandexcellence@gmail.com>
2026-03-24 11:11:25 +00:00
Renovate Bot
74c1904736 chore(deps): update pnpm/action-setup action to v5 (#365)
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

<details>
<summary>pnpm/action-setup (pnpm/action-setup)</summary>

### [`v5`](https://github.com/pnpm/action-setup/compare/v4...v5)

[Compare Source](https://github.com/pnpm/action-setup/compare/v4...v5)

</details>

---

### 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.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My43Ni41IiwidXBkYXRlZEluVmVyIjoiNDMuNzYuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

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 <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-03-24 11:11:06 +00:00
silverwind
47ef41da3b 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 <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-03-23 19:12:49 +00:00
silverwind
eb8ade10c7 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>
2026-03-17 18:19:18 +00:00
Lunny Xiao
162127170b upgrade to 1.25.5 2026-03-16 17:06:04 -07:00
brlin
e7ddef6ed3 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 <xiaolunwen@gmail.com>
Co-authored-by: brlin <buo.ren.lin@gmail.com>
Co-committed-by: brlin <buo.ren.lin@gmail.com>
2026-03-13 22:10:47 +00:00
acrewgame
51d28e66eb 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 <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/362
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: acrewgame <183300+acrewgame@noreply.gitea.com>
Co-committed-by: acrewgame <183300+acrewgame@noreply.gitea.com>
2026-03-13 16:43:56 +00:00
Renovate Bot
243178ce69 chore(deps): update pnpm to v10.32.1 (#363)
Reviewed-on: https://gitea.com/gitea/docs/pulls/363
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-03-12 14:52:51 +00:00
Renovate Bot
22834c60c8 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 <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-03-10 20:00:46 +00:00
Renovate Bot
29908bd89a chore(deps): update pnpm to v10.32.0 (#358)
Reviewed-on: https://gitea.com/gitea/docs/pulls/358
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-03-10 20:00:36 +00:00
crrdean
6cd29ccce0 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>
2026-03-10 20:00:25 +00:00
silverwind
8809db41d8 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 <xiaolunwen@gmail.com>
2026-03-08 18:20:51 +00:00
Renovate Bot
4ca96900ee chore(deps): update pnpm to v10.31.0 (#345)
Reviewed-on: https://gitea.com/gitea/docs/pulls/345
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-03-08 15:31:11 +00:00
Renovate Bot
9aac00df18 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 <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-03-08 15:30:58 +00:00
Zettat123
dc136aa31b 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 <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2026-03-01 19:00:35 +00:00
iqre8
d6bd3c6fb9 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 <xiaolunwen@gmail.com>
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
Co-authored-by: iqre8 <iqre8@noreply.gitea.com>
Co-committed-by: iqre8 <iqre8@noreply.gitea.com>
2026-02-25 20:20:32 +00:00
silverwind
44c6a0fa20 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 <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-02-22 20:27:19 +00:00
TheFox0x7
d26bbc9794 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 <wxiaoguang@noreply.gitea.com>
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2026-02-22 07:39:17 +00:00
silverwind
84bc4f138d 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 <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-02-19 19:02:58 +00:00
Renovate Bot
6c587e819f fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.55.0 (#344)
Reviewed-on: https://gitea.com/gitea/docs/pulls/344
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-14 15:32:03 +00:00
Renovate Bot
4b8bf4a2cd chore(deps): update dependency @mui/material to v7.3.8 (#343)
Reviewed-on: https://gitea.com/gitea/docs/pulls/343
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-13 00:50:51 +00:00
Renovate Bot
d071d5ed50 chore(deps): update pnpm to v10.29.3 (#342)
Reviewed-on: https://gitea.com/gitea/docs/pulls/342
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-12 17:30:02 +00:00
Renovate Bot
d5e2f3ed5b chore(deps): update dependency @easyops-cn/docusaurus-search-local to v0.54.1 (#341)
Reviewed-on: https://gitea.com/gitea/docs/pulls/341
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-11 06:48:54 +00:00
techknowlogick
1d21543b66 update ssh signing docs to reference draft RFC 2026-02-10 17:31:10 +00:00
Renovate Bot
672ae2ae2f chore(deps): update pnpm to v10.29.2 (#339)
Reviewed-on: https://gitea.com/gitea/docs/pulls/339
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-09 05:23:25 +00:00
Renovate Bot
2357df4a5d fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.54.0 (#338)
Reviewed-on: https://gitea.com/gitea/docs/pulls/338
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-09 05:23:12 +00:00
Renovate Bot
be69b0e820 chore(deps): update pnpm to v10.29.1 (#335)
Reviewed-on: https://gitea.com/gitea/docs/pulls/335
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-08 21:05:52 +00:00
Lunny Xiao
066080cf7b Add documentation for ssh keys for http access (#336)
Fix #331

Reviewed-on: https://gitea.com/gitea/docs/pulls/336
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-02-08 21:05:42 +00:00
osndok
2b96323137 Note differing default value for concurrency.cancel-in-progress (#337)
Whereas this bit me pretty hard, and [I don't seem to be the only one](https://forum.gitea.com/t/job-stopping-on-new-push/8142), the least we could do is let people know.

---------

Co-authored-by: Robert Hailey <git@osndok.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/337
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: osndok <osndok@noreply.gitea.com>
Co-committed-by: osndok <osndok@noreply.gitea.com>
2026-02-08 03:08:05 +00:00
Renovate Bot
28c7352a3a fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.53.0 (#334)
Reviewed-on: https://gitea.com/gitea/docs/pulls/334
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-06 04:34:43 +00:00
Renovate Bot
4ae4299d5c chore(deps): update aws-actions/configure-aws-credentials action to v6 (#333)
Reviewed-on: https://gitea.com/gitea/docs/pulls/333
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-05 00:03:37 +00:00
Renovate Bot
bff1114ff6 chore(deps): update pnpm to v10.28.2 (#332)
Reviewed-on: https://gitea.com/gitea/docs/pulls/332
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-04 00:12:12 +00:00
techknowlogick
2fe3b3a114 switch to use pnpm (#330)
Reviewed-on: https://gitea.com/gitea/docs/pulls/330
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-committed-by: techknowlogick <techknowlogick@gitea.com>
2026-02-03 03:29:59 +00:00
Peter Ryszkiewicz
8a40822acd Fix act runner doc typos and errors and simplify some grammar. (#328)
Fix act runner doc typos and errors and simplify some grammar.

Co-authored-by: Peter Ryszkiewicz <prizz@noreply.gitea.com>
Co-committed-by: Peter Ryszkiewicz <prizz@noreply.gitea.com>
2026-02-03 00:52:06 +00:00
Renovate Bot
ed033ac9ed chore(deps): update dependency node to v24 (#329)
Reviewed-on: https://gitea.com/gitea/docs/pulls/329
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-03 00:49:30 +00:00
silverwind
516a0af047 Add FOLDER_ICON_THEME (#326)
Available in 1.26 with https://github.com/go-gitea/gitea/pull/36496

Reviewed-on: https://gitea.com/gitea/docs/pulls/326
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-02-02 15:50:25 +00:00
Renovate Bot
91f0151966 fix(deps): update dependency @easyops-cn/docusaurus-search-local to v0.52.3 (#325)
Reviewed-on: https://gitea.com/gitea/docs/pulls/325
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-02-02 15:49:53 +00:00
TheFox0x7
c0384ba59a update autocompletion help for v1.25 up (#327)
addresses: https://github.com/go-gitea/gitea/issues/36501
Reviewed-on: https://gitea.com/gitea/docs/pulls/327
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2026-01-30 23:32:03 +00:00
Thomas Beutlich
96940ee764 Bump Online3DViewer and mention curl as option (#320)
Reviewed-on: https://gitea.com/gitea/docs/pulls/320
Co-authored-by: Thomas Beutlich <thbeu@noreply.gitea.com>
Co-committed-by: Thomas Beutlich <thbeu@noreply.gitea.com>
2026-01-27 19:31:16 +00:00
Renovate Bot
ac0bb5e71d fix(deps): update react monorepo to v19.2.4 (#324)
Reviewed-on: https://gitea.com/gitea/docs/pulls/324
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-01-27 19:23:19 +00:00
Renovate Bot
228b6be436 fix(deps): update dependency @mui/material to v7.3.7 (#319)
Reviewed-on: https://gitea.com/gitea/docs/pulls/319
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-01-26 20:04:30 +00:00
Lunny Xiao
feca0d2d17 Update to 1.25.4 2026-01-22 12:18:11 -08:00
dosenpils
49cc18e096 fixed broken link (#322)
There's a broken link in the documentation in the chapter [Use environment variables to setup Gitea](https://docs.gitea.com/administration/config-cheat-sheet#use-environment-variables-to-setup-gitea) (Docs >> Administration >> Configuration Cheat Sheet).

This pull requests will fix this.

Reviewed-on: https://gitea.com/gitea/docs/pulls/322
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: dosenpils <dosenpils@donotdevelopmyapp.com>
Co-committed-by: dosenpils <dosenpils@donotdevelopmyapp.com>
2026-01-21 01:55:21 +00:00
wxiaoguang
8550cc4de1 remove unused git timeout config options 2026-01-21 01:36:27 +00:00
techknowlogick
f5141b5e65 remove passthrough from the docs 2026-01-15 15:35:57 +00:00
techknowlogick
0709ce3d44 remove passthrough from the docs 2026-01-15 15:35:34 +00:00
techknowlogick
56c7d4ee30 remove passthrough from the docs 2026-01-15 15:35:12 +00:00
techknowlogick
6f2a1a40a3 remove passthrough from the docs 2026-01-15 15:34:56 +00:00
techknowlogick
4086fa5d93 remove passthrough from the docs 2026-01-15 15:34:20 +00:00
techknowlogick
8c018493b7 remove passthrough from the docs 2026-01-15 15:33:54 +00:00
techknowlogick
1172e40117 remove passthrough from the docs 2026-01-15 15:33:23 +00:00
techknowlogick
211fa624b3 Update versioned_docs/version-1.25/installation/with-docker-rootless.md 2026-01-15 15:32:56 +00:00
techknowlogick
6fe333ba07 remove passthrough from the docs 2026-01-15 15:32:21 +00:00
techknowlogick
9fbcdbbd60 remove passthrough from the docs 2026-01-15 15:31:47 +00:00
Renovate Bot
188314ea14 chore(deps): update actions/cache action to v5 (#314)
Reviewed-on: https://gitea.com/gitea/docs/pulls/314
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-12-19 18:02:17 +00:00
Renovate Bot
44db30edac fix(deps): update react monorepo to v19.2.3 (#313)
Reviewed-on: https://gitea.com/gitea/docs/pulls/313
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-12-19 17:57:09 +00:00
Lunny Xiao
0b31573d47 upgrade 1.25.2 -> 1.25.3 2025-12-18 11:09:05 -08:00
silverwind
18d05903c7 Add DIFF_RENAME_SIMILARITY_THRESHOLD (#316)
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2025-12-17 10:57:54 +00:00
andriibratanin
5ee3dd40ff Fix env-to-ini link (#315)
Original Gitea's repository no longer contains "Environment to INI" document referenced in "Managing Deployments With Environment Variables" section.

This commit fixes the reference by pointing the link to the last commit where needed doc was still present.

Reviewed-on: https://gitea.com/gitea/docs/pulls/315
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: andriibratanin <andriibratanin@noreply.gitea.com>
Co-committed-by: andriibratanin <andriibratanin@noreply.gitea.com>
2025-12-17 02:42:07 +00:00
Renovate Bot
d62d758d36 fix(deps): update dependency @easyops-cn/docusaurus-search-local to v0.52.2 (#310)
Reviewed-on: https://gitea.com/gitea/docs/pulls/310
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-12-04 16:33:52 +00:00
Renovate Bot
4c7d0220c9 fix(deps): update dependency @mui/material to v7.3.6 (#311)
Reviewed-on: https://gitea.com/gitea/docs/pulls/311
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-12-04 16:33:20 +00:00
Renovate Bot
e0888b2130 fix(deps): update react monorepo to v19.2.1 (#312)
Reviewed-on: https://gitea.com/gitea/docs/pulls/312
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-12-04 16:33:16 +00:00
wxiaoguang
b3335013da Update docs/administration/mail-templates.md (#309)
Reviewed-on: https://gitea.com/gitea/docs/pulls/309
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@noreply.gitea.com>
Co-committed-by: wxiaoguang <wxiaoguang@noreply.gitea.com>
2025-11-28 19:24:29 +00:00
Lunny Xiao
d4181abf75 Upgrade to 1.25.2 (#306)
Reviewed-on: https://gitea.com/gitea/docs/pulls/306
2025-11-23 19:23:37 +00:00
Lunny Xiao
d3d546fa3b Fix updating swagger failure caused by no content to change 2025-11-23 10:59:46 -08:00
Lunny Xiao
cd0347dc76 make update_api_docs.sh work for macOS 2025-11-23 10:53:03 -08:00
TheFox0x7
e3cc4ec689 update api docs (#297)
script is now standalone instead of being CI only.
Added a post 1.25 rule for templates since the variables in template changed after https://gitea.com/gitea/gitea-mirror/commit/3533263ced8
Fixes: https://github.com/go-gitea/gitea/issues/35964

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/297
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2025-11-23 18:43:58 +00:00
Lunny Xiao
826ff60fd4 Add missing translations (#305)
Reviewed-on: https://gitea.com/gitea/docs/pulls/305
2025-11-23 07:13:19 +00:00
Lunny Xiao
2e86ec6898 Fix ci 2025-11-22 21:09:13 -08:00
Lunny Xiao
ce76fd3b2e Fix ci 2025-11-22 21:04:31 -08:00
Lunny Xiao
4ddfcd6aaf Remove outdated versions and keep the latest 5 versions(include the current developing version and latest 4 stable versions (#304)
Resolve #302

Reviewed-on: https://gitea.com/gitea/docs/pulls/304
Reviewed-by: delvh <dev.lh@web.de>
2025-11-22 05:36:55 +00:00
Renovate Bot
8ba2066894 chore(deps): update actions/checkout action to v6 (#303)
Reviewed-on: https://gitea.com/gitea/docs/pulls/303
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-11-21 21:30:18 +00:00
FrostKiwi
072331ecae Clarify package permissions and tokens scopes as discussed in https://github.com/go-gitea/gitea/issues/32048 (#72)
This adds explanations, that were missing regarding Token scopes and the packages feature requiring a token with said scope. Also added a missing explanation, that tokens can be created in the user interface, not just the API. The reason this PR is created was due to misunderstandings around the package feature, that arose during the discussion in https://github.com/go-gitea/gitea/issues/32048 .
This PR aims to clarify the misunderstood points around tokens, scopes and the package feature.

During the creation of this PR bug https://github.com/go-gitea/gitea/issues/32078 was found, the scopes are always reported as `null` during the response of the initial `POST` to create the token.

Co-authored-by: Wladislav ヴラド Artsimovich <wladislav.artsimovich@dmgmori.co.jp>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/72
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: FrostKiwi <frostkiwi@noreply.gitea.com>
Co-committed-by: FrostKiwi <frostkiwi@noreply.gitea.com>
2025-11-20 22:16:00 +00:00
gabriel_radureau
98a7ea3f53 correct mentionned "gitea-repositories" directory with actual folder "repositories" (#266)
The mentionned gitea-repositories folder doesn't exist in the recent version. Correct it to the existing repositories folder.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/266
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: gabriel_radureau <gabriel_radureau@noreply.gitea.com>
Co-committed-by: gabriel_radureau <gabriel_radureau@noreply.gitea.com>
2025-11-20 22:09:30 +00:00
Lunny Xiao
df8b7a7581 Upgrade docusarus and fix broken links (#301)
Reviewed-on: https://gitea.com/gitea/docs/pulls/301
2025-11-20 22:02:05 +00:00
Schallbert
0868bd41a4 Minor update for act_runner documentation: Update execution options, clarify docker run (#256)
- add act_runner options (host, docker, DinD)
- modify `docker run` command to include volume
- minor formulation updates

Reviewed-on: https://gitea.com/gitea/docs/pulls/256
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Schallbert <schallbert@mailbox.org>
Co-committed-by: Schallbert <schallbert@mailbox.org>
2025-11-20 21:52:54 +00:00
Vladimir Vitkov
c117cba701 add static resource config to the apache section (#81)
Add a section showing how to avoid proxying of static resources by Apache HTTPD

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/81
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Vladimir Vitkov <vvitkov@gmail.com>
Co-committed-by: Vladimir Vitkov <vvitkov@gmail.com>
2025-11-20 21:43:40 +00:00
Zettat123
2b99f48d47 Share actions and reusable workflows from private repositories (#107)
Update docs for https://github.com/go-gitea/gitea/pull/32562

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/107
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2025-11-20 19:57:50 +00:00
SnowballXueQiu
f12e3675b1 更新 i18n/zh-cn/docusaurus-plugin-content-docs/version-1.24/usage/actions/act-runner.md (#234)
Signed-off-by: SnowballXueQiu <snowballxueqiu@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/234
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: SnowballXueQiu <snowballxueqiu@noreply.gitea.com>
Co-committed-by: SnowballXueQiu <snowballxueqiu@noreply.gitea.com>
2025-11-20 19:51:36 +00:00
Lunny Xiao
9baa98ec3f Move usage directories (#300)
Reviewed-on: https://gitea.com/gitea/docs/pulls/300
2025-11-20 19:49:24 +00:00
Renovate Bot
00a36086b0 fix(deps): update docusaurus monorepo to v3.9.2 (#276)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [@docusaurus/core](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus)) | [`3.8.1` -> `3.9.2`](https://renovatebot.com/diffs/npm/@docusaurus%2fcore/3.8.1/3.9.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2fcore/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2fcore/3.8.1/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@docusaurus/faster](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-faster)) | [`3.8.1` -> `3.9.2`](https://renovatebot.com/diffs/npm/@docusaurus%2ffaster/3.8.1/3.9.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2ffaster/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2ffaster/3.8.1/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@docusaurus/module-type-aliases](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-module-type-aliases)) | [`3.8.1` -> `3.9.2`](https://renovatebot.com/diffs/npm/@docusaurus%2fmodule-type-aliases/3.8.1/3.9.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2fmodule-type-aliases/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2fmodule-type-aliases/3.8.1/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@docusaurus/preset-classic](https://github.com/facebook/docusaurus) ([source](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic)) | [`3.8.1` -> `3.9.2`](https://renovatebot.com/diffs/npm/@docusaurus%2fpreset-classic/3.8.1/3.9.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@docusaurus%2fpreset-classic/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@docusaurus%2fpreset-classic/3.8.1/3.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>facebook/docusaurus (@&#8203;docusaurus/core)</summary>

### [`v3.9.2`](https://github.com/facebook/docusaurus/blob/HEAD/CHANGELOG.md#392-2025-10-17)

[Compare Source](https://github.com/facebook/docusaurus/compare/v3.9.1...v3.9.2)

##### 🐛 Bug Fix

- `docusaurus-plugin-content-docs`
  - [#&#8203;11490](https://github.com/facebook/docusaurus/pull/11490) fix(docs): add support for missing `sidebar_key` front matter attribute ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-cssnano-preset`
  - [#&#8203;11487](https://github.com/facebook/docusaurus/pull/11487) fix(cssnano-preset): disable CSS counter minification ([@&#8203;YDKK](https://github.com/YDKK))
- `docusaurus-theme-search-algolia`
  - [#&#8203;11468](https://github.com/facebook/docusaurus/pull/11468) fix(theme-search-algolia): Fix Algolia AskAI validation logic ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-translations`
  - [#&#8203;11431](https://github.com/facebook/docusaurus/pull/11431) fix(theme-translation): add missing Polish (pl) theme translations ([@&#8203;mariuszkrzaczkowski](https://github.com/mariuszkrzaczkowski))
- `docusaurus-theme-classic`, `docusaurus-theme-common`
  - [#&#8203;11466](https://github.com/facebook/docusaurus/pull/11466) fix(theme): Fix CSS `scroll-margin-top` when clicking footnote items, factorize code ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus`
  - [#&#8203;11452](https://github.com/facebook/docusaurus/pull/11452) fix(core): allow `i18n.localeConfigs.translate` in validation ([@&#8203;trofim24](https://github.com/trofim24))
- `docusaurus-theme-mermaid`
  - [#&#8203;11437](https://github.com/facebook/docusaurus/pull/11437) fix(theme-mermaid): Fix Mermaid ELK layout dependency required bug on v3.9 ([@&#8203;slorber](https://github.com/slorber))

##### :running\_woman: Performance

- `docusaurus-theme-mermaid`
  - [#&#8203;11438](https://github.com/facebook/docusaurus/pull/11438) perf(theme-mermaid): lazy load the Mermaid library ([@&#8203;slorber](https://github.com/slorber))

##### :nail\_care: Polish

- `docusaurus-theme-classic`
  - [#&#8203;11463](https://github.com/facebook/docusaurus/pull/11463) fix(theme): remove "Edit this page" button from print view ([@&#8203;richk21](https://github.com/richk21))

##### 🤖 Dependencies

- [#&#8203;11479](https://github.com/facebook/docusaurus/pull/11479) chore(deps): bump stefanzweifel/git-auto-commit-action from 6 to 7 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11480](https://github.com/facebook/docusaurus/pull/11480) chore(deps): bump github/codeql-action from 3.26.5 to 4.30.8 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11481](https://github.com/facebook/docusaurus/pull/11481) chore(deps): bump actions/dependency-review-action from 4.8.0 to 4.8.1 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11446](https://github.com/facebook/docusaurus/pull/11446) chore(deps): bump actions/dependency-review-action from 4.7.3 to 4.8.0 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))

##### :globe\_with\_meridians: Translations

- `docusaurus-theme-translations`
  - [#&#8203;11484](https://github.com/facebook/docusaurus/pull/11484) fix(translations): improve Arabic theme translations ([@&#8203;maysara-elshewehy](https://github.com/maysara-elshewehy))

##### Committers: 9

- Alexander Trofimov ([@&#8203;trofim24](https://github.com/trofim24))
- Dan Roscigno ([@&#8203;DanRoscigno](https://github.com/DanRoscigno))
- Eleni Grosdouli ([@&#8203;egrosdou01](https://github.com/egrosdou01))
- Ethan ([@&#8203;ethanppl](https://github.com/ethanppl))
- Mariusz Krzaczkowski ([@&#8203;mariuszkrzaczkowski](https://github.com/mariuszkrzaczkowski))
- Maysara ([@&#8203;maysara-elshewehy](https://github.com/maysara-elshewehy))
- Richa Kiran ([@&#8203;richk21](https://github.com/richk21))
- Sébastien Lorber ([@&#8203;slorber](https://github.com/slorber))
- [@&#8203;YDKK](https://github.com/YDKK)

### [`v3.9.1`](https://github.com/facebook/docusaurus/blob/HEAD/CHANGELOG.md#391-2025-09-26)

[Compare Source](https://github.com/facebook/docusaurus/compare/v3.9.0...v3.9.1)

##### 🐛 Bug Fix

- `docusaurus`
  - [#&#8203;11434](https://github.com/facebook/docusaurus/pull/11434) fix(core): fix Docusaurus outDir for sites using baseUrl ([@&#8203;slorber](https://github.com/slorber))

##### Committers: 1

- Sébastien Lorber ([@&#8203;slorber](https://github.com/slorber))

### [`v3.9.0`](https://github.com/facebook/docusaurus/blob/HEAD/CHANGELOG.md#390-2025-09-25)

[Compare Source](https://github.com/facebook/docusaurus/compare/v3.8.1...v3.9.0)

##### 🚀 New Feature

- `docusaurus-theme-search-algolia`
  - [#&#8203;11421](https://github.com/facebook/docusaurus/pull/11421) feat(theme-search-algolia): use DocSearch v4.1, optimize integration ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-plugin-content-blog`, `docusaurus-theme-classic`
  - [#&#8203;11425](https://github.com/facebook/docusaurus/pull/11425) feat(blog): Add support for email social icon + resize default social icon a bit ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-classic`, `docusaurus-theme-common`
  - [#&#8203;11426](https://github.com/facebook/docusaurus/pull/11426) feat(theme): Add theme-tabs-container stable className ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-classic`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`
  - [#&#8203;11327](https://github.com/facebook/docusaurus/pull/11327) feat(search): add runtime support for DocSearch v4 ([@&#8203;dylantientcheu](https://github.com/dylantientcheu))
- `docusaurus-faster`, `docusaurus`
  - [#&#8203;11415](https://github.com/facebook/docusaurus/pull/11415) feat(faster): upgrade Rspack to 1.5, use lazyBarrel experiment, remove deprecated option ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11294](https://github.com/facebook/docusaurus/pull/11294) feat(faster): Upgrade to Rspack 1.4 ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-utils`
  - [#&#8203;11397](https://github.com/facebook/docusaurus/pull/11397) feat(mdx): resolve `@site/*` markdown links, fix resolution priority bugs ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-mermaid`
  - [#&#8203;11357](https://github.com/facebook/docusaurus/pull/11357) feat(mermaid): support elk layout ([@&#8203;Feez2403](https://github.com/Feez2403))
- `docusaurus-plugin-pwa`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-types`, `docusaurus-utils`, `docusaurus`
  - [#&#8203;11316](https://github.com/facebook/docusaurus/pull/11316) feat(core): Add `i18n.localeConfigs[locale].{url,baseUrl}` config options, fix multi-domain deployments ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-types`, `docusaurus-utils`, `docusaurus`
  - [#&#8203;11304](https://github.com/facebook/docusaurus/pull/11304) feat(core): add `i18n.localeConfigs.translate` + skip translation process if `i18n/<locale>` dir doesn't exist ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-plugin-content-docs`
  - [#&#8203;11228](https://github.com/facebook/docusaurus/pull/11228) feat(docs): sidebar item `key` attribute - fix docs translations key conflicts ([@&#8203;slorber](https://github.com/slorber))
- `create-docusaurus`
  - [#&#8203;11293](https://github.com/facebook/docusaurus/pull/11293) feat(create-docusaurus): use respectPrefersColorScheme in init template ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-mdx-loader`, `docusaurus-types`, `docusaurus`
  - [#&#8203;11282](https://github.com/facebook/docusaurus/pull/11282) feat(core): add `siteConfig.markdown.emoji` config option to disable `remark-emoji` ([@&#8203;slorber](https://github.com/slorber))
- `create-docusaurus`, `docusaurus-mdx-loader`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-types`, `docusaurus`
  - [#&#8203;11283](https://github.com/facebook/docusaurus/pull/11283) feat(core): Add `siteConfig.markdown.hooks`, deprecate `siteConfig.onBrokenMarkdownLinks` ([@&#8203;slorber](https://github.com/slorber))

##### 🐛 Bug Fix

- `docusaurus-theme-classic`, `docusaurus`
  - [#&#8203;11422](https://github.com/facebook/docusaurus/pull/11422) fix(theme): fix copy of indented code blocks, replace copy-text-to-clipboard by clipboard API ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-classic`
  - [#&#8203;11407](https://github.com/facebook/docusaurus/pull/11407) fix(theme): remove hardcoded fill from Bluesky and LinkedIn icons ([@&#8203;Simek](https://github.com/Simek))
  - [#&#8203;11389](https://github.com/facebook/docusaurus/pull/11389) fix(theme): render sidebar category index with unlisted children as a simple doc/link item ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11360](https://github.com/facebook/docusaurus/pull/11360) fix(theme): Add translate no to heading anchors and blog authors ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11356](https://github.com/facebook/docusaurus/pull/11356) fix(theme): Doc sidebar links/categories with long labels should display properly ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11338](https://github.com/facebook/docusaurus/pull/11338) fix(theme-classic): fix collapsed sidebar category expansion when navigating to another link within that category ([@&#8203;qqq614](https://github.com/qqq614))
  - [#&#8203;11289](https://github.com/facebook/docusaurus/pull/11289) fix(theme): Fix footnote ref scrolling behind the navbar when footnote back reference clicked ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus`
  - [#&#8203;11410](https://github.com/facebook/docusaurus/pull/11410) fix(deps): upgrade webpack-dev-server to v5, fix security warning ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11347](https://github.com/facebook/docusaurus/pull/11347) fix(core): Fix docusaurus start on macOS when exec throws a synchronous error ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11271](https://github.com/facebook/docusaurus/pull/11271) fix(dev-server): use correct dev server HTML lang attribute ([@&#8203;enumura1](https://github.com/enumura1))
- `docusaurus-theme-common`
  - [#&#8203;11405](https://github.com/facebook/docusaurus/pull/11405) fix(theme): fix `useColorMode()` visual glitches due to provider unmounts/remounts ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11280](https://github.com/facebook/docusaurus/pull/11280) fix(theme-common): Export FooterColumnItem type ([@&#8203;stubinubin](https://github.com/stubinubin))
- `docusaurus-bundler`, `docusaurus-faster`
  - [#&#8203;11383](https://github.com/facebook/docusaurus/pull/11383) fix(ssg): HTML minifier should preserve `<head>` for `og:image` crawlers ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-classic`, `docusaurus-theme-translations`
  - [#&#8203;11331](https://github.com/facebook/docusaurus/pull/11331) fix(theme): Add `aria-label` to `IconExternalLink` with value `'(opens in new tab)'` ([@&#8203;WestonThayer](https://github.com/WestonThayer))
- `docusaurus-plugin-content-docs`
  - [#&#8203;11281](https://github.com/facebook/docusaurus/pull/11281) fix(docs): Fix empty sidebar item category `className` lost when post-processed to a doc ([@&#8203;slorber](https://github.com/slorber))
  - [#&#8203;11251](https://github.com/facebook/docusaurus/pull/11251) fix(docs): prevent docs ids conflicts within a version ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-classic`, `docusaurus-theme-common`
  - [#&#8203;11263](https://github.com/facebook/docusaurus/pull/11263) fix(theme): make `useHistorySelector()` hydration-safe + use it read search/hash in theme ([@&#8203;slorber](https://github.com/slorber))

##### 📝 Documentation

- [#&#8203;11339](https://github.com/facebook/docusaurus/pull/11339) docs: clarify impact of document ID on the URL ([@&#8203;shanti2530](https://github.com/shanti2530))

##### 🤖 Dependencies

- [#&#8203;11402](https://github.com/facebook/docusaurus/pull/11402) chore(deps): bump actions/github-script from 7.0.1 to 8.0.0 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11401](https://github.com/facebook/docusaurus/pull/11401) chore(deps): bump actions/dependency-review-action from 4.7.2 to 4.7.3 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11403](https://github.com/facebook/docusaurus/pull/11403) chore(deps): bump actions/setup-node from 4.4.0 to 5.0.0 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11373](https://github.com/facebook/docusaurus/pull/11373) chore(deps): bump actions/dependency-review-action from 4.7.1 to 4.7.2 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11365](https://github.com/facebook/docusaurus/pull/11365) chore(deps): bump actions/checkout from 4 to 5 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11342](https://github.com/facebook/docusaurus/pull/11342) chore(deps): bump form-data from 4.0.1 to 4.0.4 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11341](https://github.com/facebook/docusaurus/pull/11341) chore(deps): bump marocchino/sticky-pull-request-comment from 2.9.3 to 2.9.4 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11285](https://github.com/facebook/docusaurus/pull/11285) chore(deps): bump marocchino/sticky-pull-request-comment from 2.9.2 to 2.9.3 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11272](https://github.com/facebook/docusaurus/pull/11272) chore(deps): bump stefanzweifel/git-auto-commit-action from 5 to 6 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))
- [#&#8203;11273](https://github.com/facebook/docusaurus/pull/11273) chore(deps): bump treosh/lighthouse-ci-action from 12.1.0 to 12.6.1 ([@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot))

##### 🔧 Maintenance

- `create-docusaurus`, `docusaurus-babel`, `docusaurus-bundler`, `docusaurus-cssnano-preset`, `docusaurus-faster`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-css-cascade-layers`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-google-tag-manager`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-rsdoctor`, `docusaurus-plugin-sitemap`, `docusaurus-plugin-svgr`, `docusaurus-plugin-vercel-analytics`, `docusaurus-preset-classic`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-mermaid`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `eslint-plugin`, `lqip-loader`
  - [#&#8203;11408](https://github.com/facebook/docusaurus/pull/11408) chore: drop support for Node 18, that reached End-of-Life ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-theme-classic`
  - [#&#8203;11317](https://github.com/facebook/docusaurus/pull/11317) chore: minor reduction to inline svg/js code ([@&#8203;SethFalco](https://github.com/SethFalco))
- `docusaurus-plugin-content-docs`
  - [#&#8203;11307](https://github.com/facebook/docusaurus/pull/11307) test(docs): fix docs tests issues ([@&#8203;slorber](https://github.com/slorber))
- `docusaurus-bundler`
  - [#&#8203;11290](https://github.com/facebook/docusaurus/pull/11290) chore: upgrade website to Rspack 1.4 + fix Rspack internal performance tracing ([@&#8203;slorber](https://github.com/slorber))
- Other
  - [#&#8203;11287](https://github.com/facebook/docusaurus/pull/11287) chore(website): split changelog per version + adjust changelog plugin implementation ([@&#8203;slorber](https://github.com/slorber))

##### :globe\_with\_meridians: Translations

- `docusaurus-theme-translations`
  - [#&#8203;11315](https://github.com/facebook/docusaurus/pull/11315) fix(theme-translations): Add missing Portuguese (pt-BR) theme translations and improve some of it. ([@&#8203;marcelocell](https://github.com/marcelocell))
  - [#&#8203;11305](https://github.com/facebook/docusaurus/pull/11305) fix(translations): Add missing Ukrainian translations ([@&#8203;maluke](https://github.com/maluke))

##### Committers: 18

- Akshat Sinha ([@&#8203;akshatsinha0](https://github.com/akshatsinha0))
- Bartosz Kaszubowski ([@&#8203;Simek](https://github.com/Simek))
- Dylan Tientcheu ([@&#8203;dylantientcheu](https://github.com/dylantientcheu))
- Guo Ci ([@&#8203;guoci](https://github.com/guoci))
- Jaime Iniesta ([@&#8203;jaimeiniesta](https://github.com/jaimeiniesta))
- Joshua Chen ([@&#8203;Josh-Cena](https://github.com/Josh-Cena))
- Marcelo Junior ([@&#8203;marcelocell](https://github.com/marcelocell))
- Maria Stellini ([@&#8203;shanti2530](https://github.com/shanti2530))
- Riccardo ([@&#8203;3v0k4](https://github.com/3v0k4))
- Sergey Schetinin ([@&#8203;maluke](https://github.com/maluke))
- Seth Falco ([@&#8203;SethFalco](https://github.com/SethFalco))
- Sébastien Lorber ([@&#8203;slorber](https://github.com/slorber))
- Weston Thayer ([@&#8203;WestonThayer](https://github.com/WestonThayer))
- [@&#8203;Feez2403](https://github.com/Feez2403)
- [@&#8203;stubinubin](https://github.com/stubinubin)
- [@&#8203;ya-dvorovenko](https://github.com/ya-dvorovenko)
- enumura ([@&#8203;enumura1](https://github.com/enumura1))
- hjcho ([@&#8203;qqq614](https://github.com/qqq614))

</details>

---

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/276
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-11-20 18:22:17 +00:00
Lunny Xiao
c05b0cec34 Add protected branches usage documentation (#298)
Fix https://github.com/go-gitea/gitea/issues/35972

Reviewed-on: https://gitea.com/gitea/docs/pulls/298
2025-11-20 18:07:29 +00:00
Lunny Xiao
dcb9b9b450 Use category instead of place holder markdown file as directory (#299)
Reviewed-on: https://gitea.com/gitea/docs/pulls/299
2025-11-20 18:02:34 +00:00
Renovate Bot
0787ea1fbe chore(deps): update dependency ubuntu to v24 (#172)
Reviewed-on: https://gitea.com/gitea/docs/pulls/172
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-11-15 21:06:23 +00:00
Renovate Bot
4ca7e068c2 fix(deps): update dependency @mui/material to v7.3.5 (#294)
Reviewed-on: https://gitea.com/gitea/docs/pulls/294
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-11-15 21:03:07 +00:00
dangjinghao
fd8beed04d Fix formatting for Mailer.FROM address example in configuration cheat sheet (#296)
This example is incorrect.

wrong:

<img width="1058" alt="wrong-1.png" src="attachments/1cb3b95b-c3e4-4213-aeff-13e518021536">

<img width="442" alt="wrong-2.png" src="attachments/212aa79f-bbb7-457a-a0b8-fc7572f6d497">

<img width="1201" alt="wrong-3.png" src="attachments/32fde98a-d987-475c-9f88-d563c177ad24">

correct:

<img width="1034" alt="correct-1.png" src="attachments/b4993846-eec2-4e7c-8adc-11fc335216dc">

<img width="410" alt="correct-2.png" src="attachments/419ad32c-4080-462e-af5e-8fc9f63727a7">

Reviewed-on: https://gitea.com/gitea/docs/pulls/296
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: dangjinghao <dangjinghaoemail@163.com>
Co-committed-by: dangjinghao <dangjinghaoemail@163.com>
2025-11-15 03:43:02 +00:00
kairosys-dev
ffc8c044a3 Correct port 465 for SMTPS, not 587 for STARTTLS (#295)
The SMTPS protocol uses port 465, not 587. Port 587 is instead used for STARTTLS.
Helps getting administrators stuck in cryptic errors such as:

Failed to send a testing email to "user@mydomain.com": could not initiate SMTP session: tls: first record does not look like a TLS handshake

Reviewed-on: https://gitea.com/gitea/docs/pulls/295
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: kairosys-dev <me@arch-on.top>
Co-committed-by: kairosys-dev <me@arch-on.top>
2025-11-11 19:35:01 +00:00
Cory Sanin
a77b0937cf Corrections for Arch package registry page (#291)
pairs nicely with https://github.com/go-gitea/gitea/pull/35825

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/291
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
Co-authored-by: Cory Sanin <corysanin@outlook.com>
Co-committed-by: Cory Sanin <corysanin@outlook.com>
2025-11-05 17:26:38 +00:00
Lunny Xiao
7e8cd4df86 upgrade to 1.25.1 2025-11-04 13:21:39 -08:00
dangjinghao
0c7fce4512 Remove run-name section from Comparison to GitHub Actions (#290)
Since `run-name` support was added in [v1.25.0](https://github.com/go-gitea/gitea/releases/tag/v1.25.0), I've removed the outdated `run-name` section from `usage/actions/comparison.md`.

Reviewed-on: https://gitea.com/gitea/docs/pulls/290
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: dangjinghao <dangjinghaoemail@163.com>
Co-committed-by: dangjinghao <dangjinghaoemail@163.com>
2025-11-01 21:11:55 +00:00
Lunny Xiao
7d50e32ba8 Add 1.25.0 documentation (#289)
Reviewed-on: https://gitea.com/gitea/docs/pulls/289
2025-11-01 06:48:53 +00:00
Snowball_233
d5eac4f23d chore(docker-compose): remove obsolete version parament & remove useless default external=false (#288)
- Removed deprecated `version` key from docker-compose.yaml
- Cleaned up unnecessary `external: false` declarations for networks/volumes

Signed-off-by: Snowball_233 <snowballxueqiu@noreply.gitea.com>

Reviewed-on: https://gitea.com/gitea/docs/pulls/288
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Snowball_233 <snowballxueqiu@noreply.gitea.com>
Co-committed-by: Snowball_233 <snowballxueqiu@noreply.gitea.com>
2025-10-30 14:07:06 +00:00
drabart
f954c6e7b8 Fix typo in CAD preview supported extensions list (#286) (#287)
Fixes small typo that caused copied code to not work.

Reviewed-on: https://gitea.com/gitea/docs/pulls/287
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: drabart <drabart@noreply.gitea.com>
Co-committed-by: drabart <drabart@noreply.gitea.com>
2025-10-28 01:40:09 +00:00
Lunny Xiao
cf9b8dce28 uprade 1.24.7 2025-10-25 21:03:20 -07:00
wxiaoguang
12293b604e Update docs/administration/config-cheat-sheet.md (#285)
Reviewed-on: https://gitea.com/gitea/docs/pulls/285
2025-10-25 03:47:14 +00:00
dangjinghao
bb7b7fe5bf Add frontmatter and TOC rendering support for markdown files (#284)
<https://github.com/go-gitea/gitea/issues/14411#issuecomment-764871702>

Reviewed-on: https://gitea.com/gitea/docs/pulls/284
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: dangjinghao <dangjinghaoemail@163.com>
Co-committed-by: dangjinghao <dangjinghaoemail@163.com>
2025-10-23 17:55:14 +00:00
juls0730
b6af199508 Clarify Setting up a push mirror from Gitea to GitHub in repo mirror docs (#275)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/275
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: juls0730 <juls0730@noreply.gitea.com>
Co-committed-by: juls0730 <juls0730@noreply.gitea.com>
2025-10-16 22:09:44 +00:00
Renovate Bot
dedfbf1f27 chore(deps): update dependency cross-env to v10.1.0 (#277)
Reviewed-on: https://gitea.com/gitea/docs/pulls/277
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-10-16 14:53:32 +00:00
Renovate Bot
f9ff323873 fix(deps): update dependency @mui/material to v7.3.4 (#278)
Reviewed-on: https://gitea.com/gitea/docs/pulls/278
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-10-16 14:51:56 +00:00
Renovate Bot
1046625638 fix(deps): update react monorepo to v19.2.0 (#279)
Reviewed-on: https://gitea.com/gitea/docs/pulls/279
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-10-16 14:50:44 +00:00
Renovate Bot
200479a1a3 chore(deps): update actions/setup-node action to v6 (#282)
Reviewed-on: https://gitea.com/gitea/docs/pulls/282
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-10-16 14:44:29 +00:00
DiegoBM
bd38456e4b Fix home reference (#281)
~ points to the logged user's home, not to /home

Co-authored-by: Diego de Blas Mateo <1613216+DiegoBM@users.noreply.github.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/281
Reviewed-by: TheFox0x7 <thefox0x7@noreply.gitea.com>
Co-authored-by: DiegoBM <diegobm@noreply.gitea.com>
Co-committed-by: DiegoBM <diegobm@noreply.gitea.com>
2025-10-16 14:43:55 +00:00
vincentkersten
3578007c38 Update docs/administration/reverse-proxies.md (#280)
Using a full certificate chain will prevent errors from using git directly on the URL to be pulled/cloned.
 (Error: 'fatal: unable to access 'https://git.example.net/git/sarah/test.git': server certificate verification failed. CAfile: none CRLfile: none')

Reviewed-on: https://gitea.com/gitea/docs/pulls/280
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: vincentkersten <vincentkersten@noreply.gitea.com>
Co-committed-by: vincentkersten <vincentkersten@noreply.gitea.com>
2025-10-08 16:30:48 +00:00
johny-mnemonic
c586a396b8 Add Nginx Proxy Manager instructions (#274)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/274
Co-authored-by: johny-mnemonic <johny-mnemonic@noreply.gitea.com>
Co-committed-by: johny-mnemonic <johny-mnemonic@noreply.gitea.com>
2025-09-15 03:09:06 +00:00
Lunny Xiao
de6d4374b0 Upgrade to 1.24.6 2025-09-11 20:20:46 -07:00
Johan Van de Wauw
c9bf137a23 Add TWO_FACTOR_AUTH documentation (#273)
Reviewed-on: https://gitea.com/gitea/docs/pulls/273
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Johan Van de Wauw <johanvdw@noreply.gitea.com>
Co-committed-by: Johan Van de Wauw <johanvdw@noreply.gitea.com>
2025-09-10 20:48:36 +00:00
Renovate Bot
83da675c59 chore(deps): update actions/setup-node action to v5 (#270)
Reviewed-on: https://gitea.com/gitea/docs/pulls/270
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-09-07 11:11:18 +00:00
Renovate Bot
135f34d09a chore(deps): update aws-actions/configure-aws-credentials action to v5 (#271)
Reviewed-on: https://gitea.com/gitea/docs/pulls/271
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-09-07 11:11:07 +00:00
baikuarch
3eda094305 更新 i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/backup-and-restore.md (#272)
Reviewed-on: https://gitea.com/gitea/docs/pulls/272
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: baikuarch <baikuarch@sina.com>
Co-committed-by: baikuarch <baikuarch@sina.com>
2025-09-06 00:57:20 +00:00
Renovate Bot
312cbc2a6e fix(deps): update dependency @mdx-js/react to v3.1.1 (#267)
Reviewed-on: https://gitea.com/gitea/docs/pulls/267
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-09-03 21:01:10 +00:00
Renovate Bot
4164f4df06 fix(deps): update dependency @mui/material to v7.3.2 (#268)
Reviewed-on: https://gitea.com/gitea/docs/pulls/268
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-09-03 21:00:45 +00:00
ifurther
cb462089e9 docs: update zh-tw (#265)
Reviewed-on: https://gitea.com/gitea/docs/pulls/265
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ifurther <55025025+ifurther@users.noreply.github.com>
Co-committed-by: ifurther <55025025+ifurther@users.noreply.github.com>
2025-09-03 21:00:35 +00:00
desysoft
908a27589d Update versioned_docs/version-1.24/development/api-usage.md (#269)
Fix JSON syntax error in token creation request

The previous JSON was malformed:

{"name":test_token","scopes":[...]}

The value of "name" was missing opening quotes, causing the error:
invalid character 't' looking for beginning of value

Fixed by enclosing the string in double quotes:

{"name":"test_token","scopes":[...]}

Reviewed-on: https://gitea.com/gitea/docs/pulls/269
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: desysoft <desysoft@noreply.gitea.com>
Co-committed-by: desysoft <desysoft@noreply.gitea.com>
2025-09-03 21:00:09 +00:00
Renovate Bot
6b64b97e3b chore(deps): update actions/checkout action to v5 (#261)
Reviewed-on: https://gitea.com/gitea/docs/pulls/261
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-09-01 01:38:35 +00:00
Renovate Bot
90ab1c20c2 fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.52.0 (#230)
Reviewed-on: https://gitea.com/gitea/docs/pulls/230
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-08-29 18:47:35 +00:00
Renovate Bot
d61eaecbb1 fix(deps): update docusaurus monorepo to v3.8.1 (#225)
Reviewed-on: https://gitea.com/gitea/docs/pulls/225
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-08-27 16:12:37 +00:00
Renovate Bot
b30993162c fix(deps): update dependency @mui/material to v7.3.1 (#242)
Reviewed-on: https://gitea.com/gitea/docs/pulls/242
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-08-27 16:11:50 +00:00
Renovate Bot
004bebe6b4 fix(deps): update react monorepo to v19.1.1 (#254)
Reviewed-on: https://gitea.com/gitea/docs/pulls/254
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-08-27 16:11:08 +00:00
techknowlogick
ed59125e25 Enable v4 future 2025-08-27 16:10:19 +00:00
Lunny Xiao
c699d12a55 upgrade to 1.24.5 2025-08-14 18:52:32 -07:00
kmanwar89
4d5fd1f6fb Clarified GPG signature validation instructions to be more clear (#262)
Added instructions on how to download the signature file using wget, and fixed a typo in the wget commands that would have caused the command to fail when copied/pasted.

Reviewed-on: https://gitea.com/gitea/docs/pulls/262
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: kmanwar89 <kmanwar89@noreply.gitea.com>
Co-committed-by: kmanwar89 <kmanwar89@noreply.gitea.com>
2025-08-14 21:51:45 +00:00
Lunny Xiao
c13d82ccc3 Update gpg check command to use hkps by default (#260)
Fix #255

Reviewed-on: https://gitea.com/gitea/docs/pulls/260
2025-08-12 16:57:24 +00:00
nero-dv
0552f4523c Update versioned_docs/version-1.24/installation/from-binary.md (#259)
The main branch is missing the directory where the autocompletion scripts were in. Version 1.24 does still have the scripts, so linked directly to them.

Reviewed-on: https://gitea.com/gitea/docs/pulls/259
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: nero-dv <nero-dv@noreply.gitea.com>
Co-committed-by: nero-dv <nero-dv@noreply.gitea.com>
2025-08-08 21:55:21 +00:00
Lunny Xiao
03c98878cf upgrade to 1.24.4 2025-08-04 17:00:13 -07:00
Christopher Homberger
cf33eee47f Initial Ephemeral Runners Documentation (#239)
Document this feature for 1.24 onwards.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/239
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2025-07-28 20:40:59 +00:00
Christopher Homberger
201f0f3ef8 Document workflow_dispatch workflow_run (#238)
Document missing workflow triggers of 1.23..1.25-dev

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/238
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2025-07-28 20:39:01 +00:00
Christopher Homberger
e8a6c4281d Add ssh commit signing to docs of 1.25-dev (#241)
Documentation for my changes to ssh commit signing in <https://github.com/go-gitea/gitea/pull/34341>.

* Renames "GPG Commit Signatures" to "GPG/SSH Commit Signatures", since the url is called just signing and creating a new page would duplicate a lot
* _"The default option and repository specific signing keys are not supported for ssh keys"_
   * the original draft implementation did support this for ssh keys
   * this warning should avoid people expecting this gitconfig style things to work for ssh keys, since verifying is disabled in this case (e.g. pre 1.25 undocumented behavior preserved).

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/241
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2025-07-28 20:37:52 +00:00
Karthik-Bhandary
641977c93a Updated the docs and versioned_docs (#253)
This closes #251

Co-authored-by: karthik.bhandary <karthik.bhandary@kfintech.com>
Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/253
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Karthik-Bhandary <karthik-bhandary@noreply.gitea.com>
Co-committed-by: Karthik-Bhandary <karthik-bhandary@noreply.gitea.com>
2025-07-28 19:46:12 +00:00
Renovate Bot
fbd73fd263 chore(deps): update dependency cross-env to v10 (#250)
Reviewed-on: https://gitea.com/gitea/docs/pulls/250
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-07-28 19:45:22 +00:00
dr-1
a6fc8044b0 Make language adjustments on index page (#244)
Some minor adjustments on the landing page.

- Fix grammatical errors
- Fix a capitalization error and inconsistent capitalization in a heading
- Remove a redundant sentence

Co-authored-by: Dominik Rubo <dominik.rubo@posteo.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/244
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: dr-1 <dr-1@noreply.gitea.com>
Co-committed-by: dr-1 <dr-1@noreply.gitea.com>
2025-07-18 03:18:05 +00:00
ChristopherHX
fa11851d67 Fix formatting of email setup (#249)
Sorry I incorrectly used the :::note syntax in one PR merged recently, missing `:::` to end the quote

CC @lunny

Picture of the bug I introduced appended.

Reviewed-on: https://gitea.com/gitea/docs/pulls/249
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-committed-by: ChristopherHX <christopher.homberger@web.de>
2025-07-18 03:10:58 +00:00
ChristopherHX
f9ff184ee3 Mention smtp+starttls not only in the config cheat sheet (#247)
I almost entered STARTTLS under PROTOCOLS, better to mention the correct solution without needing to check the config cheat sheet.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/247
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-committed-by: ChristopherHX <christopher.homberger@web.de>
2025-07-16 17:48:45 +00:00
ChristopherHX
cbbf31f1d5 Provide a hint for ENABLE_NOTIFY_MAIL in email setup (#246)
* some people like me might wonder why the email-setup didn't work

While reviewing https://github.com/go-gitea/gitea/pull/34982#pullrequestreview-3013995449, I enabled the mailer the first time and found this solution in the debugger not in the docs.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/246
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-committed-by: ChristopherHX <christopher.homberger@web.de>
2025-07-16 17:48:12 +00:00
Lunny Xiao
47594bba97 upgrade gitea to 1.24.3 2025-07-15 09:44:13 -07:00
Renovate Bot
63c75a97c6 fix(deps): update dependency @emotion/styled to v11.14.1 (#240)
Reviewed-on: https://gitea.com/gitea/docs/pulls/240
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-06-30 16:06:46 +00:00
Renovate Bot
50aad0431b fix(deps): update dependency @mui/material to v7.1.2 (#233)
Reviewed-on: https://gitea.com/gitea/docs/pulls/233
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-06-30 16:06:40 +00:00
paultibbetts
164f1c837f Update URL for Caddy reverse proxy HTTPS guide (#236)
Reviewed-on: https://gitea.com/gitea/docs/pulls/236
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: paultibbetts <paultibbetts@noreply.gitea.com>
Co-committed-by: paultibbetts <paultibbetts@noreply.gitea.com>
2025-06-25 14:17:33 +00:00
Lunny Xiao
870f30e886 upgrade to 1.24.2 2025-06-21 10:13:34 -07:00
Lunny Xiao
33ec7a49df upgrade to 1.24.1 2025-06-19 15:31:41 -07:00
gnscc
bc606bd422 Fix typo in api-usage.md (#232)
Fix breaking typo in api-usage.

Reviewed-on: https://gitea.com/gitea/docs/pulls/232
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: gnscc <gnscc@noreply.gitea.com>
Co-committed-by: gnscc <gnscc@noreply.gitea.com>
2025-06-17 19:38:09 +00:00
recoolcz
3a82ab51f3 bugfix: Fix O3DV script since it broke in 1.24.0 (#231)
Reviewed-on: https://gitea.com/gitea/docs/pulls/231
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: recoolcz <recoolcz@noreply.gitea.com>
Co-committed-by: recoolcz <recoolcz@noreply.gitea.com>
2025-06-16 17:10:30 +00:00
Lunny Xiao
c8ebd4e896 Fix latest stable version 2025-06-10 15:46:23 -07:00
techknowlogick
a320f53087 1.24.0 2025-06-10 15:21:23 +00:00
Renovate Bot
95544e7847 fix(deps): update dependency @mui/material to v7.1.1 (#228)
Reviewed-on: https://gitea.com/gitea/docs/pulls/228
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-06-10 15:20:44 +00:00
Renovate Bot
af373024a0 fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.50.0 (#229)
Reviewed-on: https://gitea.com/gitea/docs/pulls/229
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-06-10 15:19:21 +00:00
techknowlogick
57ed041528 bump to 1.24.0 2025-06-10 15:08:01 +00:00
recoolcz
43ad642ef2 bugfix (3d viewer): fixed a typo that prevented the script from working (#227)
Reviewed-on: https://gitea.com/gitea/docs/pulls/227
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: recoolcz <recoolcz@noreply.gitea.com>
Co-committed-by: recoolcz <recoolcz@noreply.gitea.com>
2025-06-03 18:16:12 +00:00
Renovate Bot
753dbfb4aa fix(deps): update dependency redocusaurus to v2.5.0 (#226)
Reviewed-on: https://gitea.com/gitea/docs/pulls/226
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-06-01 00:25:13 +00:00
Schallbert
5d9094adb0 Clarify customization's folder structure when using non-standard install like docker (#219)
customizing: add backlink to install for variations
install-with-docker: add example for customization
Reviewed-on: https://gitea.com/gitea/docs/pulls/219
Co-authored-by: Schallbert <schallbert@mailbox.org>
Co-committed-by: Schallbert <schallbert@mailbox.org>
2025-05-26 16:11:47 +00:00
Renovate Bot
7ec1b19826 fix(deps): update dependency redocusaurus to v2.3.0 (#223)
Reviewed-on: https://gitea.com/gitea/docs/pulls/223
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-05-26 16:11:03 +00:00
dmitri.karpovich
f58dfff5e4 Update docs/usage/actions/quickstart.md (#222)
Fix typo

Reviewed-on: https://gitea.com/gitea/docs/pulls/222
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: dmitri.karpovich <dmitri.karpovich@noreply.gitea.com>
Co-committed-by: dmitri.karpovich <dmitri.karpovich@noreply.gitea.com>
2025-05-26 00:07:58 +00:00
Renovate Bot
5bf02bcd9c fix(deps): update dependency @mui/material to v7.1.0 (#221)
Reviewed-on: https://gitea.com/gitea/docs/pulls/221
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-05-15 16:28:02 +00:00
Lunny Xiao
e1ed1a6280 Upgrade Gitea from 1.23.7 -> 1.23.8 2025-05-13 09:51:20 -07:00
Lunny Xiao
6e63ddb901 Add 1.24.0-rc0 documentation (#220)
Reviewed-on: https://gitea.com/gitea/docs/pulls/220
2025-05-05 16:47:20 +00:00
Kerwin Bryant
e1500d23c7 Optimize the 404 page (#216)
Fix 404 party of #213

<img width="1386" alt="2743f73507eb76ce0b749e9d804e34c.png" src="attachments/7dbeeab8-6e31-405e-8dc8-917e4a843657">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/216
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
Co-committed-by: Kerwin Bryant <kerwin612@qq.com>
2025-04-30 18:40:22 +00:00
techknowlogick
2a39f74205 add oidc introspection endpoint to list (#217)
Reviewed-on: https://gitea.com/gitea/docs/pulls/217
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-committed-by: techknowlogick <techknowlogick@gitea.com>
2025-04-28 03:48:45 +00:00
Lunny Xiao
1d51bc6814 Update token scopes example (#215)
Reviewed-on: https://gitea.com/gitea/docs/pulls/215
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-26 04:27:13 +00:00
Lunny Xiao
eed3454a8a Update token scopes example (#214)
Reviewed-on: https://gitea.com/gitea/docs/pulls/214
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-26 04:21:26 +00:00
wxiaoguang
14d48e6834 Update PUBLIC_URL_DETECTION (#212)
https://github.com/go-gitea/gitea/pull/34250
Reviewed-on: https://gitea.com/gitea/docs/pulls/212
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@noreply.gitea.com>
Co-committed-by: wxiaoguang <wxiaoguang@noreply.gitea.com>
2025-04-21 23:10:45 +00:00
Rowan Bohde
c299483551 Add documentation for request prioritization middleware (#208)
This is the documentation side of https://github.com/go-gitea/gitea/pull/33951

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/208
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Rowan Bohde <rowan@allspice.io>
Co-committed-by: Rowan Bohde <rowan@allspice.io>
2025-04-20 23:41:58 +00:00
wxiaoguang
f29075ebeb Update ROOT_URL document (#210)
Reviewed-on: https://gitea.com/gitea/docs/pulls/210
Reviewed-by: hiifong <i@hiif.ong>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-20 23:35:21 +00:00
bytedream
df3f3f8dab Action badge style query (#209)
Add dcos for the new style query for action badges (https://github.com/go-gitea/gitea/pull/34062).

Reviewed-on: https://gitea.com/gitea/docs/pulls/209
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: bytedream <bytedream@protonmail.com>
Co-committed-by: bytedream <bytedream@protonmail.com>
2025-04-13 17:54:09 +00:00
juke
1a85ffdab8 Expand new Usage/Markdown Docu (#203)
As promised in [Gitea Pull #34105](https://github.com/go-gitea/gitea/pull/34105), I wanted to contribute documentation for MarkDown.

You were so fast in adding the page that I had to start over my local-only draft 😄 🚀

I'm not sure how you prefer your commits (I'm new to Gitea), so I've split them for simplest review and dropping of unwanted changes.

Co-authored-by: Jules Kerssemakers <j.kerssemakers@gsi.de>
Reviewed-on: https://gitea.com/gitea/docs/pulls/203
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: juke <juke@noreply.gitea.com>
Co-committed-by: juke <juke@noreply.gitea.com>
2025-04-10 20:15:37 +00:00
Renovate Bot
ac2186b6fb fix(deps): update dependency redocusaurus to v2.2.3 (#205)
Reviewed-on: https://gitea.com/gitea/docs/pulls/205
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-04-10 18:25:53 +00:00
Renovate Bot
b2b64a0401 fix(deps): update dependency @mui/material to v7.0.2 (#204)
Reviewed-on: https://gitea.com/gitea/docs/pulls/204
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-04-10 18:25:46 +00:00
Kerwin Bryant
d5945b5091 add og:image/logo meta (#206)
Reviewed-on: https://gitea.com/gitea/docs/pulls/206
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
Co-committed-by: Kerwin Bryant <kerwin612@qq.com>
2025-04-10 01:51:07 +00:00
wxiaoguang
cc53afc60e Update MERMAID_MAX_SOURCE_CHARACTERS (#202)
Reviewed-on: https://gitea.com/gitea/docs/pulls/202
2025-04-09 07:58:18 +00:00
recoolcz
330f8b808b CAD File Preview - Last Change (markup, spelling, script) (#201)
Fixed all remaining issues (spelling mistakes, markup, etc.)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/201
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: recoolcz <recoolcz@noreply.gitea.com>
Co-committed-by: recoolcz <recoolcz@noreply.gitea.com>
2025-04-08 15:13:15 +00:00
recoolcz
a6305438b9 Fix CAD Files Preview section (#200)
CAD Preview section is broken on live website (bad markup usage). Hopefully fixed it :D
Thanks a lot

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/200
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: recoolcz <petrvanek31@gmail.com>
Co-committed-by: recoolcz <petrvanek31@gmail.com>
2025-04-08 06:48:11 +00:00
Lunny Xiao
ae186bfdcc Update to 1.23.7 2025-04-07 15:41:45 -07:00
recoolcz
718d024fe9 Change STL preview to CAD file preview (#199)
Based on [this Issue on GitHub]([url](https://github.com/go-gitea/gitea/issues/34135)) I created a pull request.

This implementation allows for all other kinds CAD files to be previewed in Gitea.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/199
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: recoolcz <petrvanek31@gmail.com>
Co-committed-by: recoolcz <petrvanek31@gmail.com>
2025-04-07 18:50:51 +00:00
wxiaoguang
e3d58503ca Add markdown usage (#198)
First simple version

Reviewed-on: https://gitea.com/gitea/docs/pulls/198
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-05 05:08:06 +00:00
Bo-Yi Wu (吳柏毅)
802aeb1e0c docs: update zh-tw (#197)
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/197
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-05 01:51:55 +00:00
Lunny Xiao
abc5be48cc Fix language selection 2025-04-04 18:45:25 -07:00
appleboy
ac801c4790 docs: update zh-tw (#197)
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/197
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-04-05 00:57:20 +00:00
appleboy
dbfa0ba454 docs: add zh-tw folder (#195)
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/195
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-04-04 23:28:16 +00:00
Renovate Bot
3275094871 fix(deps): update dependency @easyops-cn/docusaurus-search-local to v0.49.2 (#192)
Reviewed-on: https://gitea.com/gitea/docs/pulls/192
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-04-01 21:04:49 +00:00
Renovate Bot
10e315d235 fix(deps): update dependency @mui/material to v7.0.1 (#193)
Reviewed-on: https://gitea.com/gitea/docs/pulls/193
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-04-01 21:04:28 +00:00
ManInDark
bec3fc4398 SSH multiple IPs (#194)
Added documentation for alternative ssh setup if multiple IPs are available.

Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/194
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: ManInDark <ManInDark@noreply.gitea.com>
Co-committed-by: ManInDark <ManInDark@noreply.gitea.com>
2025-04-01 20:31:35 +00:00
Renovate Bot
10c3198134 fix(deps): update dependency @mui/material to v7 (#189)
Reviewed-on: https://gitea.com/gitea/docs/pulls/189
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-03-31 15:43:57 +00:00
Renovate Bot
aedc957200 fix(deps): update react monorepo to v19.1.0 (#190)
Reviewed-on: https://gitea.com/gitea/docs/pulls/190
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-03-31 15:43:20 +00:00
wxiaoguang
d432fb57ac Update config option: REQUIRE_SIGNIN_VIEW (#191)
Reviewed-on: https://gitea.com/gitea/docs/pulls/191
2025-03-30 05:37:25 +00:00
yp05327
2757101442 doc: ENABLE_PASSKEY_AUTHENTICATION (#187)
fix: https://github.com/go-gitea/gitea/issues/34021
Reviewed-on: https://gitea.com/gitea/docs/pulls/187
Reviewed-by: wxiaoguang <wxiaoguang@noreply.gitea.com>
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: yp05327 <576951401@qq.com>
Co-committed-by: yp05327 <576951401@qq.com>
2025-03-26 14:43:41 +00:00
Lunny Xiao
ba60733fd9 upgrade to gitea 1.23.6 2025-03-24 14:53:49 -07:00
Renovate Bot
8d3a6af0de fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.49.0 (#184)
Reviewed-on: https://gitea.com/gitea/docs/pulls/184
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-03-24 04:39:54 +00:00
Renovate Bot
3c69e687b4 fix(deps): update dependency @mui/material to v6.4.8 (#185)
Reviewed-on: https://gitea.com/gitea/docs/pulls/185
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-03-24 02:17:12 +00:00
Renovate Bot
4809b3d4c8 fix(deps): update dependency redocusaurus to v2.2.2 (#186)
Reviewed-on: https://gitea.com/gitea/docs/pulls/186
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-03-24 02:16:59 +00:00
techknowlogick
714b9dd6b7 fix launchctl example
thanks for #183 that reported and fixed this issue in versioned docs
2025-03-14 02:14:01 +00:00
BenoitDuffez
1a8c4f0836 fix typo in LaunchAgent sample (#183)
the typo makes the file invalid and launchctl refuses to start with very little details as to why

Reviewed-on: https://gitea.com/gitea/docs/pulls/183
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: BenoitDuffez <benoitduffez@noreply.gitea.com>
Co-committed-by: BenoitDuffez <benoitduffez@noreply.gitea.com>
2025-03-13 22:00:07 +00:00
wxiaoguang
2b1f9ff532 Add FILE_ICON_THEME (#181)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/181
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-10 21:25:11 +00:00
wxiaoguang
a64bf5f8e3 Update custom theme guide (#180)
For https://github.com/go-gitea/gitea/pull/30671

Reviewed-on: https://gitea.com/gitea/docs/pulls/180
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-10 15:55:10 +00:00
Renovate Bot
4cacad97aa fix(deps): update dependency @mui/material to v6.4.7 (#178)
Reviewed-on: https://gitea.com/gitea/docs/pulls/178
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-03-07 03:29:13 +00:00
wethinkagile
3f023b3b62 fix/get-tokens-example (#179)
Users reported issues at https://github.com/go-gitea/gitea/issues/28820

Co-authored-by: Stephan Kristyn <account@stevek.pro>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/179
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: wethinkagile <wethinkagile@noreply.gitea.com>
Co-committed-by: wethinkagile <wethinkagile@noreply.gitea.com>
2025-03-07 03:28:59 +00:00
Felix Sommer
8c7577a67c EMBED_ATTACHMENT_IMAGES: Docs for PR https://github.com/go-gitea/gitea/pull/32061 (#69)
Co-authored-by: Felix Sommer <felix.sommer@ludofact.de>
Co-committed-by: Felix Sommer <felix.sommer@ludofact.de>
2025-03-05 16:14:07 +00:00
Lunny Xiao
41bc13f04f Release of Gitea 1.23.5 (#177)
Reviewed-on: https://gitea.com/gitea/docs/pulls/177
2025-03-05 01:28:46 +00:00
TheFox0x7
eaeb29f827 Add warning about actions under subpath (#176)
in reference to: https://github.com/go-gitea/gitea/issues/33629

Reviewed-on: https://gitea.com/gitea/docs/pulls/176
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2025-03-02 17:52:04 +00:00
Renovate Bot
003bc73398 fix(deps): update dependency @mui/material to v6.4.6 (#171)
Reviewed-on: https://gitea.com/gitea/docs/pulls/171
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-02-28 15:38:57 +00:00
techknowlogick
52933671d8 use docker.gitea.com docker URLs (#175)
Reviewed-on: https://gitea.com/gitea/docs/pulls/175
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-committed-by: techknowlogick <techknowlogick@gitea.com>
2025-02-28 15:36:37 +00:00
Lunny Xiao
045ad3fd8c Add missing cron items content (#174)
Reviewed-on: https://gitea.com/gitea/docs/pulls/174
2025-02-25 20:13:15 +00:00
b-nagaj
540072fa39 FIX: DB Prep Docs - Step #1 (#173)
## Description

Fix step 1 of the [Database Preparation](https://docs.gitea.com/installation/database-prep) docs.

## Changes

When a user modifies the */etc/mysql/my.cnf* config file as instructed in step 1 of the database preparation guide, they get an error message from MySQL when trying to log in as the root user after saving changes.

```shell
mysql: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf at line 37.
mysql: [ERROR] Fatal error in defaults handling. Program aborted!
```
The solution is to include precede `bind-address` with a group like this.

```ini
[mysqld]
bind-address = 203.0.113.3
```

Reviewed-on: https://gitea.com/gitea/docs/pulls/173
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: b-nagaj <bryce.nagaj@proton.me>
Co-committed-by: b-nagaj <bryce.nagaj@proton.me>
2025-02-25 19:39:31 +00:00
Lunny Xiao
ed742f54da Fix ci 2025-02-19 15:40:23 -08:00
Lunny Xiao
235e1199d8 Fix ci 2025-02-19 15:37:15 -08:00
Lunny Xiao
674911fecd Fix ci 2025-02-19 11:56:34 -08:00
Lunny Xiao
bc2618cea3 Fix ci 2025-02-19 11:37:23 -08:00
Lunny Xiao
88ff15b0f5 Fix ci 2025-02-19 11:30:35 -08:00
Lunny Xiao
04b38c7f3a Fix ci 2025-02-19 11:26:48 -08:00
Lunny Xiao
bb149ae308 upgrade to 1.23.4 2025-02-19 11:05:44 -08:00
Renovate Bot
a7d3ff1ea1 fix(deps): update dependency @easyops-cn/docusaurus-search-local to v0.48.5 (#169)
Reviewed-on: https://gitea.com/gitea/docs/pulls/169
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-02-16 17:47:17 +00:00
Renovate Bot
eb0c2f7ccc fix(deps): update dependency @mui/material to v6.4.4 (#165)
Reviewed-on: https://gitea.com/gitea/docs/pulls/165
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-02-16 17:46:36 +00:00
Lunny Xiao
452b13ec63 upgrade to 1.23.3 (#168)
Reviewed-on: https://gitea.com/gitea/docs/pulls/168
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-02-06 19:34:36 +00:00
Lunny Xiao
cea3a053b7 upgrade to 1.23.2 (#166)
Reviewed-on: https://gitea.com/gitea/docs/pulls/166
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-02-05 21:50:46 +00:00
Renovate Bot
93d5d77bfd fix(deps): update dependency @mui/material to v6.4.2 (#161)
Reviewed-on: https://gitea.com/gitea/docs/pulls/161
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-31 16:58:53 +00:00
Renovate Bot
6ebfe37c28 fix(deps): update dependency @easyops-cn/docusaurus-search-local to v0.48.4 (#157)
Reviewed-on: https://gitea.com/gitea/docs/pulls/157
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-31 16:58:48 +00:00
Lunny Xiao
bbbb9091bf Update act runner status (#163)
Fix #162

Reviewed-on: https://gitea.com/gitea/docs/pulls/163
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-01-29 05:12:05 +00:00
Brandon Philips
59ef598b49 fix admin url for 1.23.0 (#164)
I am running the release candidate and found the admin URL changed.
https://github.com/go-gitea/gitea/pull/32189

Reviewed-on: https://gitea.com/gitea/docs/pulls/164
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Brandon Philips <brandon@ifup.org>
Co-committed-by: Brandon Philips <brandon@ifup.org>
2025-01-28 16:33:32 +00:00
strathmeyer
e5057c6a83 Correct verb tense in index.md (#159)
Reviewed-on: https://gitea.com/gitea/docs/pulls/159
Reviewed-by: KN4CK3R <kn4ck3r@noreply.gitea.com>
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: strathmeyer <strathmeyer@noreply.gitea.com>
Co-committed-by: strathmeyer <strathmeyer@noreply.gitea.com>
2025-01-18 20:01:46 +00:00
99rgosse
b84e09cd7b Add the "--skip-index" parameter for dump command (#158)
Hello
This PR is only to show up the "--skip-index" parameter missing from the documentation from the "dump" command

Reference in code : https://github.com/go-gitea/gitea/blob/main/cmd/dump.go#L267

Reviewed-on: https://gitea.com/gitea/docs/pulls/158
Co-authored-by: 99rgosse <99rgosse@noreply.gitea.com>
Co-committed-by: 99rgosse <99rgosse@noreply.gitea.com>
2025-01-17 17:43:21 +00:00
Lunny Xiao
b5245578b5 Fix API 404 (#156)
Fix #154

Reviewed-on: https://gitea.com/gitea/docs/pulls/156
2025-01-16 07:01:43 +00:00
woshishabii
56cbea7928 a typo i guess (#155)
Reviewed-on: https://gitea.com/gitea/docs/pulls/155
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: woshishabii <woshishabii@noreply.gitea.com>
Co-committed-by: woshishabii <woshishabii@noreply.gitea.com>
2025-01-16 00:16:26 +00:00
Renovate Bot
9acb2b3eb7 fix(deps): update dependency redocusaurus to v2.2.1 (#151)
Reviewed-on: https://gitea.com/gitea/docs/pulls/151
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-14 17:21:55 +00:00
Renovate Bot
93b1d04dab fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.48.0 (#152)
Reviewed-on: https://gitea.com/gitea/docs/pulls/152
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-14 17:21:48 +00:00
Renovate Bot
aeb506659c fix(deps): update dependency @mui/material to v6.4.0 (#153)
Reviewed-on: https://gitea.com/gitea/docs/pulls/153
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-14 17:21:34 +00:00
yp05327
192a773da3 Fix update swagger json (#150)
I can not understand the old logic:
- download the web page (not the raw data) from GitHub
- replace `AppVer`
- remove the file???

It does nothing.

The correct logic:
- download the raw file from GitHub
- replace `AppVer` and `AppSubUrl`
- move the file to the correct place

As the script is not correct for a long time, added the support for all version since 1.19.

Fix #142

Reviewed-on: https://gitea.com/gitea/docs/pulls/150
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: yp05327 <576951401@qq.com>
Co-committed-by: yp05327 <576951401@qq.com>
2025-01-14 03:00:44 +00:00
TheFox0x7
301154989a Add docusaurus faster (#149)
Leads to about half the build time.

Reviewed-on: https://gitea.com/gitea/docs/pulls/149
Co-authored-by: TheFox0x7 <thefox0x7@noreply.gitea.com>
Co-committed-by: TheFox0x7 <thefox0x7@noreply.gitea.com>
2025-01-10 19:15:45 +00:00
Lunny Xiao
1ddf6a1822 upgrade to 1.23.1 (#148)
Reviewed-on: https://gitea.com/gitea/docs/pulls/148
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-01-10 18:58:33 +00:00
Renovate Bot
a9fdbab409 fix(deps): update react monorepo to v19 (major) (#121)
Reviewed-on: https://gitea.com/gitea/docs/pulls/121
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-10 18:11:48 +00:00
Renovate Bot
e05a89ff18 fix(deps): update dependency redocusaurus to v2.2.0 (#117)
Reviewed-on: https://gitea.com/gitea/docs/pulls/117
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-10 17:53:57 +00:00
Renovate Bot
3c21d98474 fix(deps): update docusaurus monorepo to v3.7.0 (#118)
Reviewed-on: https://gitea.com/gitea/docs/pulls/118
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-10 16:20:11 +00:00
Renovate Bot
4c47d3b921 fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.47.0 (#140)
Reviewed-on: https://gitea.com/gitea/docs/pulls/140
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-10 16:08:26 +00:00
Lunny Xiao
67e83400bd update version to 1.23.0 (#141)
Reviewed-on: https://gitea.com/gitea/docs/pulls/141
2025-01-10 05:28:14 +00:00
yp05327
4183476129 Fix CI error in update swagger files (#145)
If there's no changes, the CI will end with exit 1.
<img width="689" alt="image.png" src="attachments/62248c28-6767-4b56-9e06-571e13feb867">

Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/145
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: yp05327 <576951401@qq.com>
Co-committed-by: yp05327 <576951401@qq.com>
2025-01-09 18:48:57 +00:00
Zettat123
a97908040d Update some docs (#144)
Close #143

- Add `ORG_PAGING_NUM`
- Remove `hashFiles` from unsupported workflows syntax

Reviewed-on: https://gitea.com/gitea/docs/pulls/144
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2025-01-09 05:27:03 +00:00
wxiaoguang
5c11efcedf Improve config cheat sheet and update SSH_USER (#138)
Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/138
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-07 22:40:06 +00:00
TheFox0x7
d97b557d9f Remove dead marketplace links (#139)
both have removed gitea from their marketplaces

Reviewed-on: https://gitea.com/gitea/docs/pulls/139
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2025-01-05 18:33:08 +00:00
Renovate Bot
3724f66b6d fix(deps): update dependency @mui/material to v6.3.1 (#137)
Reviewed-on: https://gitea.com/gitea/docs/pulls/137
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-01-05 03:37:08 +00:00
kerwin612
2e4a4281ff fix api-version hidden issue (#136)
Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/136
Co-authored-by: kerwin612 <kerwin612@noreply.gitea.com>
Co-committed-by: kerwin612 <kerwin612@noreply.gitea.com>
2024-12-27 02:28:31 +00:00
Renovate Bot
80359e274d fix(deps): update dependency prism-react-renderer to v2.4.1 (#116)
Reviewed-on: https://gitea.com/gitea/docs/pulls/116
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-12-27 01:55:22 +00:00
Renovate Bot
d6936415c8 fix(deps): update dependency @mui/material to v6 (#120)
Reviewed-on: https://gitea.com/gitea/docs/pulls/120
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-12-27 01:54:35 +00:00
Lunny Xiao
e691a131c1 Follow #75 to update all variables (#135)
Reviewed-on: https://gitea.com/gitea/docs/pulls/135
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-12-27 00:58:11 +00:00
hype8912
8433f055a1 Update docs/usage/actions/variables.md (#75)
Updated text to say action variables cannot not start with "CI"

Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/75
Co-authored-by: hype8912 <hype8912@noreply.gitea.com>
Co-committed-by: hype8912 <hype8912@noreply.gitea.com>
2024-12-27 00:47:29 +00:00
Lunny Xiao
ef66eb0882 Update storage docs to make less confusing (#131)
Reviewed-on: https://gitea.com/gitea/docs/pulls/131
Reviewed-by: Zettat123 <zettat123@noreply.gitea.com>
Reviewed-by: Bo-Yi Wu (吳柏毅) <appleboy.tw@gmail.com>
2024-12-27 00:12:07 +00:00
Lunny Xiao
433c930127 Introduce runner documentations (#133)
This PR introduces documentation for Runner.

<img width="959" alt="图片.png" src="attachments/5ad6a8af-d799-4718-9d33-56bf91a8852e">

Co-authored-by: kerwin612 <kerwin612@qq.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/133
Reviewed-by: Bo-Yi Wu (吳柏毅) <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-12-26 23:44:25 +00:00
Zettat123
8f872a636d Document for GITEA_RUNNER_REGISTRATION_TOKEN env (#132)
Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/132
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2024-12-24 20:32:57 +00:00
Renovate Bot
1e528b6616 fix(deps): update dependency @mui/material to v5.16.12 (#115)
Reviewed-on: https://gitea.com/gitea/docs/pulls/115
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-12-24 04:28:52 +00:00
vmmello
57ee3a4653 FAQ: improves answer of question "Push Hook / Webhook / Actions aren't running" (#130)
On FAQ item: "Push Hook / Webhook / Actions aren't running"

The action suggested in the original answer is not enough to fix the issue when the hooks are not running. For example, when none of the hooks is running, and branches and tags are not in the database, re-running only the update/receive hooks will not have any effect.

This change adds two additional actions: sync branches and tags before running re-running the sync of update/receive hooks.

Also added a comment about filesystems mounted with `no-exec` option.

Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/130
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: vmmello <vmmello@noreply.gitea.com>
Co-committed-by: vmmello <vmmello@noreply.gitea.com>
2024-12-23 03:44:44 +00:00
shugen
dc5a65d91a fix: add space for url (#129)
![image.png](/attachments/cb407e73-014e-41d5-be43-2571f1dfcde1)

Resolve the problem that was wrongly detected as a URL.

Co-authored-by: shugen002 <10257291+shugen002@users.noreply.github.com>
Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/129
Reviewed-by: blumia <blumia@noreply.gitea.com>
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: shugen <shugen@noreply.gitea.com>
Co-committed-by: shugen <shugen@noreply.gitea.com>
2024-12-19 20:33:24 +00:00
Renovate Bot
0d073f07c4 fix(deps): update emotion monorepo to v11.14.0 (#119)
Reviewed-on: https://gitea.com/gitea/docs/pulls/119
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-12-19 15:13:19 +00:00
Lunny Xiao
a0feb8c4fc Add new version 1.23.0-rc0 (#128)
Reviewed-on: https://gitea.com/gitea/docs/pulls/128
2024-12-18 07:44:42 +00:00
wxiaoguang
177b9d8d87 Add ALLOW_FORK_INTO_SAME_OWNER and fix legacy syntax (#122)
Co-authored-by: Lunny Xiao <lunny@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/122
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-18 07:20:36 +00:00
TheFox0x7
43b15f49b7 Add a warning about sha256 support in actions (#126)
Closes: https://gitea.com/gitea/docs/issues/74

Reviewed-on: https://gitea.com/gitea/docs/pulls/126
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-12-18 02:18:37 +00:00
TheFox0x7
7a4e79c937 use fqin for container images (#125)
It's generally considered a better practice and it's more portable allowing podman to work without having to modify the name.

Reviewed-on: https://gitea.com/gitea/docs/pulls/125
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-12-17 20:23:46 +00:00
Lunny Xiao
2b9cc256ea Remove compare with Gogs because of the Gogs development is almost stopped (#124)
Reviewed-on: https://gitea.com/gitea/docs/pulls/124
Reviewed-by: Bo-Yi Wu (吳柏毅) <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-12-16 17:14:08 +00:00
Lunny Xiao
dc2b857cac Upgrade to 1.22.6 2024-12-13 00:09:11 -08:00
Renovate Bot
bc57251835 fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.46.0 (#112)
Reviewed-on: https://gitea.com/gitea/docs/pulls/112
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-12-12 05:29:33 +00:00
Renovate Bot
b33e1fd696 fix(deps): update dependency @mdx-js/react to v3.1.0 2024-12-12 05:16:08 +00:00
Lunny Xiao
869fb8d4e5 Upgrade to 1.22.5 2024-12-11 13:05:31 -08:00
KN4CK3R
6b1cd2beeb Add Arch package registry (#111)
Docs for https://github.com/go-gitea/gitea/pull/32692

Close #47

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/111
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-committed-by: KN4CK3R <admin@oldschoolhack.me>
2024-12-07 04:15:16 +00:00
tobiasbp
9a204d82a1 Add info on STATIC_URL_PREFIX gotcha in cheat sheet (#99)
When using *STATIC_URL_PREFIX* to load assets, some UI elements will stop working, as described on the Gitea server on Discord: https://discord.com/channels/322538954119184384/322910365237248000/1305896452400218122

The fix is, to disable *ui.notification.EVENT_SOURCE_UPDATE_TIME* by setting it to *-1*.

This PR adds that information to the _configuration cheat sheet_.

The fix is needed in Gitea 1.22.3. I do not know about previous versions.

Co-authored-by: tobias.petersen <tobias.petersen@unity3d.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/99
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: tobiasbp <tobiasbp@noreply.gitea.com>
Co-committed-by: tobiasbp <tobiasbp@noreply.gitea.com>
2024-12-04 01:50:30 +00:00
wxiaoguang
e80ea3d8e7 doc: ENABLE_PASSWORD_LOGIN_FORM (#110)
Reviewed-on: https://gitea.com/gitea/docs/pulls/110
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-01 19:40:53 +00:00
pasmophobia
f857051cdc fix mistake in docs/usage/actions/act-runner.md#365 (#97)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/97
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: pasmophobia <pasmophobia@noreply.gitea.com>
Co-committed-by: pasmophobia <pasmophobia@noreply.gitea.com>
2024-12-01 06:22:57 +00:00
mowoc-ocp
ed69343d70 Update docs/administration/config-cheat-sheet.md for MINIO_IAM_ENDPOINT (#103)
Targeting issue [#32271](https://github.com/go-gitea/gitea/issues/32271)

## Summary
This PR adds information about MINIO_IAM_ENDPOINT to the configuration cheat sheet, related to PR https://github.com/go-gitea/gitea/pull/32581

## Changes
- Adds MINIO_IAM_ENDPOINT to all examples referencing `MinioStorageConfig`

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/103
Co-authored-by: mowoc-ocp <mowoc-ocp@noreply.gitea.com>
Co-committed-by: mowoc-ocp <mowoc-ocp@noreply.gitea.com>
2024-11-26 08:03:34 +00:00
Lunny Xiao
3e404a348f Upgrade to 1.22.4 (#109)
Reviewed-on: https://gitea.com/gitea/docs/pulls/109
2024-11-26 04:38:25 +00:00
Konstantin Podsvirov
683e72aed1 Fix in delete debian package example (#98)
Delete extra `s` symbol in api entrypoint.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/98
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Konstantin Podsvirov <podsvirov@noreply.gitea.com>
Co-committed-by: Konstantin Podsvirov <podsvirov@noreply.gitea.com>
2024-11-26 02:07:48 +00:00
justinsb
4ebeaff28f Fix typo: Advantage -> Advanced (#101)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/101
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: justinsb <justinsb@noreply.gitea.com>
Co-committed-by: justinsb <justinsb@noreply.gitea.com>
2024-11-25 21:12:48 +00:00
Lunny Xiao
1edaf07b36 Update comparasion because of merge queue has been implemented. (#104)
Since https://github.com/go-gitea/gitea/pull/9307 and https://github.com/go-gitea/gitea/pull/19648, merge queue has been introduced.

Reviewed-on: https://gitea.com/gitea/docs/pulls/104
2024-11-25 21:10:09 +00:00
Lunny Xiao
fc7bdfc7b6 Improve the signing documentations (#108)
Reviewed-on: https://gitea.com/gitea/docs/pulls/108
2024-11-25 05:36:44 +00:00
Lunny Xiao
ddc1db3637 Move authentication from usage to administration (#105)
Reviewed-on: https://gitea.com/gitea/docs/pulls/105
2024-11-24 02:32:42 +00:00
Marcell Mars
541fa954bb Enhancing Gitea OAuth2 Provider with Granular Scopes for Resource Access (#102)
The documentation update for enhancing the OAuth2 Provider with granular scopes for resource access includes a practical use case with step-by-step guidance supported by screenshots.

Doc for https://github.com/go-gitea/gitea/pull/32573

Reviewed-on: https://gitea.com/gitea/docs/pulls/102
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Marcell Mars <ki.ber@kom.uni.st>
Co-committed-by: Marcell Mars <ki.ber@kom.uni.st>
2024-11-22 04:07:17 +00:00
wxiaoguang
79767d83a7 Update ALLOWED_TYPES (#96)
Reviewed-on: https://gitea.com/gitea/docs/pulls/96
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-15 05:53:35 +00:00
Zettat123
5e9c955979 Add DEFAULT_MIRROR_REPO_UNITS and DEFAULT_TEMPLATE_REPO_UNITS options (#91)
Related to https://github.com/go-gitea/gitea/pull/32416

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/91
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2024-11-13 00:26:38 +00:00
talltechy
06c7f7f975 docs: Add ProtonMail SMTP configuration instructions (#93)
#### Summary
This pull request adds detailed instructions for configuring ProtonMail's SMTP server in the `email-setup.md` documentation. The new section provides step-by-step guidance on generating SMTP tokens and configuring the `app.ini` file for ProtonMail.

#### Changes
- Added a new section under the "ProtonMail" heading in `email-setup.md`.
- Included instructions for generating SMTP tokens in ProtonMail settings.
- Provided an example configuration for the `app.ini` file to use ProtonMail's SMTP server.

Reviewed-on: https://gitea.com/gitea/docs/pulls/93
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: talltechy <matt@mattwyen.me>
Co-committed-by: talltechy <matt@mattwyen.me>
2024-11-12 19:36:54 +00:00
philipparndt
e8344b03cb Document Reverse Proxy authentication for API (#84)
I figured out that the reverse proxy authentication for the API is supported (implemented with https://github.com/go-gitea/gitea/pull/26703). This will update the documentation to the current state.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Philipp Arndt <2f.mail@gmx.de>
Reviewed-on: https://gitea.com/gitea/docs/pulls/84
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: philipparndt <philipparndt@noreply.gitea.com>
Co-committed-by: philipparndt <philipparndt@noreply.gitea.com>
2024-11-12 19:35:18 +00:00
Lunny Xiao
8d114d7c6b Add license back following the content when it moved from main repository 2024-11-06 12:04:06 -08:00
wxiaoguang
43da98e72c update BATCH_OPERATION_CONCURRENCY to 8 (#90)
Reviewed-on: https://gitea.com/gitea/docs/pulls/90
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-06 18:40:50 +00:00
wxiaoguang
ae3a7fade6 Update FAQ (#92)
* add `How to find the config file "app.ini"`
* remove outdated ones

Reviewed-on: https://gitea.com/gitea/docs/pulls/92
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-committed-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-06 00:00:49 +00:00
Asadbek Karimov
be4c144777 Update docs/administration/config-cheat-sheet.md 2024-11-05 18:34:05 +00:00
Asad
75c7efc23d docs: Update gitea cron job documentation for repository archive deletion
- Added detailed documentation for `cron.delete_repo_archives` settings.
- Documented configuration options including `ENABLED`, `RUN_AT_START`, `NOTICE_ON_SUCCESS`, and `SCHEDULE`.
- Ensured consistent formatting across cron job documentation.

This update improves clarity on how to configure periodic deletion of repository archives within Gitea.
2024-11-04 20:20:06 -05:00
rremer
82c020a3cb Document [lfs_client].BATCH_OPERATION_CONCURRENCY (#88)
re: https://github.com/go-gitea/gitea/pull/32369
Co-authored-by: Royce Remer <rremer@salesforce.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/88
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: rremer <rremer@noreply.gitea.com>
Co-committed-by: rremer <rremer@noreply.gitea.com>
2024-11-04 17:58:03 +00:00
Royce Remer
26b5b9448f Document configurable LFS BATCH_SIZE and MAX_BATCH_SIZE.
Signed-off-by: Royce Remer <royceremer@gmail.com>
2024-10-30 23:05:58 +00:00
jbalonso
ce0d8b898b Document missing "packages" scope feature for GITEA_TOKEN (#77)
As per https://github.com/go-gitea/gitea/issues/23642#issuecomment-2119876692, this documents a missing feature for `GITEA_TOKEN` authorizing access to the package repository.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/77
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: jbalonso <jbalonso@noreply.gitea.com>
Co-committed-by: jbalonso <jbalonso@noreply.gitea.com>
2024-10-30 22:27:35 +00:00
Lunny Xiao
05271fd4e6 Update faq for actions to correct wrong documentations. (#85)
- [x] User-level runners are supported from 1.20
- [x] Actions are enabled by default from 1.21

Reviewed-on: https://gitea.com/gitea/docs/pulls/85
2024-10-28 18:04:52 +00:00
thezzisu
d527654df3 Update docs for USER_DISABLED_FEATURES (#76)
Update docs for this PR: https://github.com/go-gitea/gitea/pull/31959

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/76
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: thezzisu <thezzisu@gmail.com>
Co-committed-by: thezzisu <thezzisu@gmail.com>
2024-10-26 03:33:01 +00:00
Lunny Xiao
5bfca46fd6 Merge branch 'main' into lunny/update_agit_forcepush 2024-10-22 06:42:24 +00:00
Zettat123
0c55d89c91 update cn docs 2024-10-18 09:55:29 +08:00
Zettat123
76cb5ec6ea add DISABLE_ORGANIZATIONS_PAGE and DISABLE_CODE_PAGE 2024-10-18 09:46:41 +08:00
Lunny Xiao
5f07f6c79a Update old versions 2024-10-11 00:06:36 -07:00
Lunny Xiao
6fc2decd0c update agit forcepush 2024-10-11 00:02:19 -07:00
eliroca
19dc1eccd2 Add force-push usage for agit workflow (#78)
```
git push origin HEAD:refs/for/main -o force-push=true -o topic="agit-workflow-usage" -o title="Add force-push usage for agit workflow"
```

Co-authored-by: Elisei Roca <eroca@suse.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/78
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: eliroca <eliroca@noreply.gitea.com>
Co-committed-by: eliroca <eliroca@noreply.gitea.com>
2024-10-10 21:31:09 +00:00
Lunny Xiao
610e9d0e1c Disable docusarus cache 2024-10-09 11:36:02 -07:00
Lunny Xiao
16ae5821e7 Fix docuactions cache moved 2024-10-09 11:34:47 -07:00
Lunny Xiao
d2ff4a6117 more changes 2024-10-08 23:03:32 -07:00
Lunny Xiao
610b028ba9 upgrade to 1.22.3 2024-10-08 21:39:53 -07:00
ConcurrentCrab
9cee5acb6b administration: Add docs for server.LFS_ALLOW_PURE_SSH (#49)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/49
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: ConcurrentCrab <ishan1939.be21@chitkara.edu.in>
Co-committed-by: ConcurrentCrab <ishan1939.be21@chitkara.edu.in>
2024-09-28 07:33:44 +00:00
Lunny Xiao
bea0fb7387 Use camo.Always instead of camo.Allways (#73)
ref: https://github.com/go-gitea/gitea/pull/32097
Reviewed-on: https://gitea.com/gitea/docs/pulls/73
2024-09-25 17:11:33 +00:00
wxiaoguang
bbaeadb0c8 Update docs/administration/reverse-proxies.md 2024-09-18 07:09:48 +00:00
wxiaoguang
6eb17fcd29 Update versioned_docs/version-1.22/administration/reverse-proxies.md 2024-09-18 07:09:29 +00:00
Lunny Xiao
05a0760f6b fix bug 2024-09-13 14:39:59 -07:00
Lunny Xiao
3ac151749b fix bug 2024-09-13 14:25:00 -07:00
Lunny Xiao
98633d3b32 Use deploy token rather than deploy key 2024-09-13 12:03:35 -07:00
Lunny Xiao
c12effbaff Improve update swagger workflow 2024-09-13 11:46:34 -07:00
Lunny Xiao
3ed7b49467 Improve update swagger workflow 2024-09-13 11:44:39 -07:00
Lunny Xiao
e67590e0e2 Fix bug 2024-09-13 10:40:37 -07:00
Lunny Xiao
b0efb07c3f Fix bug when update swagger 2024-09-12 11:00:02 -07:00
Lunny Xiao
6564f98656 Merge branch 'main' into lunny/update_swagger 2024-09-11 06:35:27 +00:00
Zettat123
a74adaaefd Documentation for migrating from AWS CodeCommit (#65)
Related to https://github.com/go-gitea/gitea/pull/31981

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/65
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2024-09-11 03:25:40 +00:00
Jason Song
d9cc7c43c0 Enable compression for Actions logs by default (#66)
Follow https://github.com/go-gitea/gitea/pull/32013

Reviewed-on: https://gitea.com/gitea/docs/pulls/66
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-committed-by: Jason Song <i@wolfogre.com>
2024-09-10 02:32:33 +00:00
Lunny Xiao
75bb2f36ff make act runner documentation more easy to use (#64)
Reviewed-on: https://gitea.com/gitea/docs/pulls/64
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-09-07 19:40:47 +00:00
Lunny Xiao
1257064c05 Improve agit usage (#63)
Reviewed-on: https://gitea.com/gitea/docs/pulls/63
2024-09-06 19:46:32 +00:00
Lunny Xiao
e84a95f4da Update swagger files on schedule 2024-09-05 23:57:00 -07:00
Lunny Xiao
96da2d0d34 Upgrade 1.22.1 -> 1.22.2 2024-09-05 18:47:25 -07:00
Lunny Xiao
bdacdf6594 Merge pull request 'Adjust sequences of actions and packages articles in the sidebar' (#61) from lunny/adjust_sequence into main
Reviewed-on: https://gitea.com/gitea/docs/pulls/61
2024-09-03 04:25:51 +00:00
Lunny Xiao
97339dc250 Remove unnecessary _index.md 2024-09-02 17:57:43 -07:00
Lunny Xiao
7a8bc94a8a Adjust packages and actions articles' sequence on the sidebar 2024-09-02 17:52:58 -07:00
Lunny Xiao
488e0e4355 Merge pull request 'Replace all global variables with right value' (#60) from lunny/fix_global_variables into main
Reviewed-on: https://gitea.com/gitea/docs/pulls/60
2024-09-01 06:47:31 +00:00
Lunny Xiao
2f7d104417 Fix some versions 2024-08-31 23:36:04 -07:00
Lunny Xiao
1f23956442 replace all global variables with right value 2024-08-31 23:14:38 -07:00
Lunny Xiao
f1ce141716 Merge pull request 'add database conversion example' (#57) from sbourdeauducq/docs:dbconv into main
Reviewed-on: https://gitea.com/gitea/docs/pulls/57
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-08-29 17:45:48 +00:00
Lunny Xiao
843174579e Merge branch 'main' into dbconv 2024-08-28 17:47:48 +00:00
Lunny Xiao
4a0a06cc0c Merge pull request 'add warning about choice of database type' (#56) from sbourdeauducq/docs:main into main
Reviewed-on: https://gitea.com/gitea/docs/pulls/56
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-08-28 17:42:37 +00:00
Lunny Xiao
5ecafa9a56 Fix outdated cheat sheet about ALLOWED_DOMAINS (#55)
Reviewed-on: https://gitea.com/gitea/docs/pulls/55
Reviewed-by: yp05327 <yp05327@noreply.gitea.com>
2024-08-22 04:09:23 +00:00
sbourdeauducq
e81f343beb fix typo 2024-08-21 04:51:33 +00:00
sbourdeauducq
b062e4a754 add database conversion example 2024-08-21 04:48:19 +00:00
sbourdeauducq
0e7d152165 add warning about choice of database type 2024-08-21 04:23:27 +00:00
pangliang
9003c4a604 'workflow_dispatch' unsupported description removed (#54)
For PR: [go-gitea/gitea#28163](https://github.com/go-gitea/gitea/pull/28163)

I saw that there was no description of the use of a single syntax in the original document, so I simply deleted the description that 'workflow_dispatch does not support'

Co-authored-by: pangliang <418094911@qq.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/54
Reviewed-by: Denys Konovalov <denyskon@noreply.gitea.com>
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: pangliang <pangliang@noreply.gitea.com>
Co-committed-by: pangliang <pangliang@noreply.gitea.com>
2024-08-19 20:31:59 +00:00
Zettat123
56e5cc026b Update issue template for issue assignees (#48)
Related to https://github.com/go-gitea/gitea/pull/31083

Reviewed-on: https://gitea.com/gitea/docs/pulls/48
Reviewed-by: Jason Song <wolfogre@noreply.gitea.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2024-08-13 02:27:18 +00:00
Jason Song
4d7c41947b Add LOG_COMPRESSION (#50)
Follow https://github.com/go-gitea/gitea/pull/31761

Reviewed-on: https://gitea.com/gitea/docs/pulls/50
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-committed-by: Jason Song <i@wolfogre.com>
2024-08-09 16:24:28 +00:00
Lunny Xiao
eebb6b1528 Add storage configuration hint to simplify the configuration (#44)
Reviewed-on: https://gitea.com/gitea/docs/pulls/44
2024-08-09 02:29:24 +00:00
davama
ed0fa59c0e add information on additional supported redis connections (#38)
Was told to put this PR here
https://github.com/go-gitea/gitea/issues/31618

Please let me know if i need to do anything else.

Best,
Dave

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/38
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: davama <davama@noreply.gitea.com>
Co-committed-by: davama <davama@noreply.gitea.com>
2024-08-07 06:25:17 +00:00
Lunny Xiao
b7d3335676 Add more description for LFS_JWT_SECRET (#46)
Fix https://github.com/go-gitea/gitea/issues/22727

Reviewed-on: https://gitea.com/gitea/docs/pulls/46
2024-08-07 01:51:54 +00:00
Lunny Xiao
54bc810c46 Merge branch 'main' of gitea.com:gitea/docs 2024-08-06 16:44:54 -07:00
Lunny Xiao
af22422e1a Update meta data of docs 2024-08-06 16:44:42 -07:00
Matt Van Hest
1cf8f6f58d Clarified installation instructions between binary package and docker container (#41)
Made the act runner installation instructions a little bit clearer when using docker. This distinction was not immediately clear and caused some confusion.

Co-authored-by: Jason Song <wolfogre@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/41
Reviewed-by: Jason Song <wolfogre@noreply.gitea.com>
Co-authored-by: Matt Van Hest <notusedfordaily@gmail.com>
Co-committed-by: Matt Van Hest <notusedfordaily@gmail.com>
2024-08-05 03:17:01 +00:00
josh-stengg
5d7fbcc47f Clarify the valid values for COMPRESSION_LEVEL (#42)
Remove the comment that values must be preceded with a `-` and add details about default and Huffman compression along with links to the Golang documentation.

Reviewed-on: https://gitea.com/gitea/docs/pulls/42
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: josh-stengg <josh-stengg@noreply.gitea.com>
Co-committed-by: josh-stengg <josh-stengg@noreply.gitea.com>
2024-08-05 00:34:56 +00:00
Lunny Xiao
4917bd18ae Add a note for docker compose version (#43)
Reviewed-on: https://gitea.com/gitea/docs/pulls/43
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
2024-08-03 03:08:33 +00:00
Jason Song
56e120e1d8 Add LOG_RETENTION_DAYS (#40)
Related to https://github.com/go-gitea/gitea/pull/31735

Reviewed-on: https://gitea.com/gitea/docs/pulls/40
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-committed-by: Jason Song <i@wolfogre.com>
2024-08-02 03:33:18 +00:00
ifurther
fa80574eb7 external-renders: add agrs --global for pipx (#33)
Add `--global` to fix jupyter to /usr/local/bin

Reviewed-on: https://gitea.com/gitea/docs/pulls/33
Reviewed-by: yp05327 <yp05327@noreply.gitea.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ifurther <55025025+ifurther@users.noreply.github.com>
Co-committed-by: ifurther <55025025+ifurther@users.noreply.github.com>
2024-07-28 03:46:04 +00:00
Lunny Xiao
a49bcbf20d Fix editUrl (#31)
Fix #9

Reviewed-on: https://gitea.com/gitea/docs/pulls/31
2024-07-17 04:22:05 +00:00
zeauw
5df20429a2 docs(reverse-proxies.md): Update zh-cn translation of reverse-proxies.md (#29)
Update the zh-cn translation of reverse-proxies.md of current version and version 1.22 (since reverse-proxies.md of them are same). The translation is based on English version of reverse-proxies.md of current version.

Resolve [issue 24](https://gitea.com/gitea/docs/issues/24)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/29
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeauw <me@zeauw.dev>
Co-committed-by: zeauw <me@zeauw.dev>
2024-07-17 03:08:53 +00:00
6543
d0bfff96d4 Add option to change mail from user display name (#31528) (#23)
https://github.com/go-gitea/gitea/pull/31528
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/23
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-07-14 21:27:36 +00:00
6543
8635300595 Document "Issue Templates: add option to have dropdown printed list (#31577)" (#19)
https://github.com/go-gitea/gitea/pull/31577

Reviewed-on: https://gitea.com/gitea/docs/pulls/19
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: KN4CK3R <kn4ck3r@noreply.gitea.com>
2024-07-14 14:39:31 +00:00
Oscar Ward
8b8500091a Document launchd process for act runners (#28) (#30)
Reviewed-on: https://gitea.com/gitea/docs/pulls/30
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Oscar Ward <oscarward95@gmail.com>
Co-committed-by: Oscar Ward <oscarward95@gmail.com>
2024-07-14 06:19:53 +00:00
xor-gate
c94a135d4a Add note about how to use secrets in workflow (#17)
Document how to use secrets in workflow

Co-authored-by: Jerry Jacobs <jerry.jacobs@xor-gate.org>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/17
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: xor-gate <xor-gate@noreply.gitea.com>
Co-committed-by: xor-gate <xor-gate@noreply.gitea.com>
2024-07-12 15:25:32 +00:00
webracer999
26f2306525 fail2ban-setup: *.local instead of *.conf (#14)
`man 5 jail.conf`:
CONFIGURATION FILES FORMAT
       *.conf  files  are distributed by Fail2Ban.  It is recommended that *.conf files should remain unchanged to ease upgrades.  If needed,
       customizations should be provided in *.local files.  For example, if you would like to enable the [ssh-iptables-ipset] jail  specified
       in jail.conf, create jail.local containing

Reviewed-on: https://gitea.com/gitea/docs/pulls/14
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: webracer999 <webracer999@noreply.gitea.com>
Co-committed-by: webracer999 <webracer999@noreply.gitea.com>
2024-07-12 15:20:08 +00:00
Lunny Xiao
ac6de8756f Add wrong submittion doc (#16)
copied from https://github.com/go-gitea/gitea/pull/31521/files#diff-9b5d4cdddaeeb1b9a0f6aab7ea1964c5e59c7823d9966229c387a3f6a107b9c6

Contributor: @silverwind

Reviewed-on: https://gitea.com/gitea/docs/pulls/16
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-07-12 15:15:22 +00:00
Lunny Xiao
81d1f77b2d Fix wrong description about cron default enable value (#26)
Reviewed-on: https://gitea.com/gitea/docs/pulls/26
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-07-12 15:13:41 +00:00
James Skemp
95b53a89bf Update spelling and language on main page (#20)
This fixes a couple minor spelling mistakes and tweaks the grammar in the Gogs warning.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/docs/pulls/20
Reviewed-by: kemzeb <kemzeb@noreply.gitea.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: James Skemp <jamesskemp@noreply.gitea.com>
Co-committed-by: James Skemp <jamesskemp@noreply.gitea.com>
2024-07-12 10:59:48 +00:00
delvh
a986d0f393 Document YEAR, MONTH, MONTH_ENGLISH, DAY vars for template repos (#22)
Depends on gitea#31584

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/22
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <leon@kske.dev>
Co-committed-by: delvh <leon@kske.dev>
2024-07-11 03:23:33 +00:00
Lunny Xiao
83e0a1822d Add missing doc from https://github.com/go-gitea/gitea/pull/31535 (#25)
Reviewed-on: https://gitea.com/gitea/docs/pulls/25
2024-07-10 03:51:15 +00:00
6543
a7978f9d54 Document "hide_label" attribute at Issue-Templates (#18)
Document https://github.com/go-gitea/gitea/pull/22589 as it was not jet

---
*Sponsored by Kithara Software GmbH*

Reviewed-on: https://gitea.com/gitea/docs/pulls/18
Reviewed-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2024-07-09 04:09:47 +00:00
Lunny Xiao
1e7126f597 Upgrade 1.22.0 -> 1.22.1 2024-07-05 19:54:03 -04:00
Lunny Xiao
7dc54af200 Remove unnecessary meta data on markdown files (#12)
Reviewed-on: https://gitea.com/gitea/docs/pulls/12
2024-06-28 19:50:37 +00:00
Lunny Xiao
628a0b9863 Cache for release (#7)
Follow #5

Reviewed-on: https://gitea.com/gitea/docs/pulls/7
2024-06-15 13:02:18 +00:00
Lunny Xiao
b1d0f63998 Make CI faster with docusaurus cache actions (#5)
Reviewed-on: https://gitea.com/gitea/docs/pulls/5
2024-06-15 05:16:46 +00:00
Lunny Xiao
7e77e7fb39 Add missing doc from main repository (#4)
Copy from https://github.com/go-gitea/gitea/pull/31211/files
Author: @MaxWipfli

Add missing documentation for https://github.com/go-gitea/gitea/pull/30268

Reviewed-on: https://gitea.com/gitea/docs/pulls/4
2024-06-15 03:10:51 +00:00
Lunny Xiao
ab2cdde840 Fix more links and problems (#3)
Reviewed-on: https://gitea.com/gitea/docs/pulls/3
2024-06-14 08:53:10 +00:00
Lunny Xiao
9a8396aa29 Fix broken links (#1)
- Always use a relative markdown link so that we can jump even if we edit it in local env or read it in code hosting server.

Reviewed-on: https://gitea.com/gitea/docs/pulls/1
2024-06-14 05:53:15 +00:00
Lunny Xiao
b4dddf8804 Use docusaurus warning/note syntax instead markdown 2024-06-07 18:03:08 +08:00
Lunny Xiao
91cd95dba0 Fix links 2024-06-07 00:21:50 +08:00
Lunny Xiao
abee93bf42 Add missing static files 2024-06-06 22:59:23 +08:00
Lunny Xiao
bc23f733d8 Fix CI 2024-06-06 22:53:58 +08:00
Lunny Xiao
c88deee1a6 Some small improvements 2024-06-06 22:49:46 +08:00
Lunny Xiao
3d26dfa42d Fix broken links 2024-06-06 22:05:38 +08:00
Lunny Xiao
d7af5c0f58 Upgrade docusaurus from 3.3.2 -> 3.4.0 2024-06-06 21:09:01 +08:00
Lunny Xiao
a33c704da8 Remove unnecessary files 2024-06-06 21:08:01 +08:00
Lunny Xiao
b9e0a85c9b Use a formal docusaurus i18n structure 2024-06-06 20:44:06 +08:00
Lunny Xiao
089f2a0b46 Make the index page default 2024-06-06 17:10:46 +08:00
Lunny Xiao
7c1ce71ffc Subtree 1.22 merged in docs
Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-06-06 16:53:05 +08:00
Lunny Xiao
1b2ab918a3 Subtree 1.21 merged in docs
Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-06-06 16:52:39 +08:00
Lunny Xiao
8762d457c8 Subtree 1.20 merged in docs
Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-06-06 16:52:15 +08:00
Lunny Xiao
c0f640e0a1 Subtree 1.19 merged in docs
Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-06-06 16:51:26 +08:00
Lunny Xiao
5e93e1d614 Subtree merged in docs
Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-06-06 16:47:07 +08:00
silverwind
97172dadda Replace gt-word-break with tw-break-anywhere (#31183)
`overflow-wrap: anywhere` is a superior alternative to `word-wrap:
break-word` and we were already setting it in the class. I tested a few
cases, all look good.
2024-06-04 13:57:11 +00:00
6543
e75261128c Add option for mailer to override mail headers (#27860)
Add option to override headers of mails, gitea send out

---
*Sponsored by Kithara Software GmbH*
2024-06-03 20:42:52 +02:00
Lunny Xiao
897fd52cf7 Add ini syntax highlight 2024-06-03 21:29:38 +08:00
Giteabot
e7c9a190a4 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>
2024-05-31 21:08:04 +08:00
TheBrokenRail
fad5583c15 Fix URL In Gitea Actions Badge Docs (#31191)
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
2024-05-31 19:41:44 +08:00
Lunny Xiao
a178cb528d Azure blob storage support (#30995)
This PR implemented object storages(LFS/Packages/Attachments and etc.)
for Azure Blob Storage. It depends on azure official golang SDK and can
support both the azure blob storage cloud service and azurite mock
server.

Replace #25458
Fix #22527 

- [x] CI Tests
- [x] integration test, MSSQL integration tests will now based on
azureblob
  - [x] unit test 
- [x] CLI Migrate Storage
- [x] Documentation for configuration added

------

TODO (other PRs):
- [ ] Improve performance of `blob download`.

---------

Co-authored-by: yp05327 <576951401@qq.com>
2024-05-30 07:33:50 +00:00
Giteabot
4e3fa99205 Update demo site location from try.gitea.io -> demo.gitea.com (#31054) (#31146)
Backport #31054 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-05-29 01:05:07 +00:00
Giteabot
368cd48a39 Remove duplicate ProxyPreserveHost in Apache httpd doc (#31143) (#31147)
Backport #31143 by @HorlogeSkynet

---

(fix up for #31003)

Co-authored-by: Samuel FORESTIER <HorlogeSkynet@users.noreply.github.com>
2024-05-29 08:54:14 +08:00
Samuel FORESTIER
443be398f6 Remove duplicate ProxyPreserveHost in Apache httpd doc (#31143)
---

(fix up for #31003)
2024-05-29 00:35:21 +00:00
Giteabot
29fa46e86e Move documents under actions (#31110) (#31116)
Backport #31110 by @lunny

Move secrets and badge under actions

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-05-27 23:05:49 +08:00
Lunny Xiao
42680ba9ee Update demo site location from try.gitea.io -> demo.gitea.com (#31054) 2024-05-27 15:05:12 +00:00
Lunny Xiao
d20aa0d14a Move documents under actions (#31110)
Move secrets and badge under actions
2024-05-27 14:53:48 +00:00
Lunny Xiao
57040f7486 Fix api of 1.22 2024-05-27 22:16:26 +08:00
Giteabot
6e0c43227b Update pip related commands for docker (#31106) (#31111)
Backport #31106 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-05-27 21:54:19 +08:00
wxiaoguang
f3505e94f6 Update pip related commands for docker (#31106)
Thanks to graelo and silverwind for figuring out the problem.

Fix #31101
2024-05-27 13:53:33 +00:00
Lunny Xiao
377f435a2b Add version of 1.22 (#137)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/137
2024-05-27 13:52:22 +00:00
Lunny Xiao
0274225b2a Add route for stable API 2024-05-26 13:01:44 +08:00
Renovate Bot
bddadc41e9 fix(deps): update dependency @mui/material to v5.15.18 (#135)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/135
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-05-25 20:06:47 +00:00
Renovate Bot
6ea7bb2cdb fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.41.0 (#136)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/136
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-05-25 20:04:49 +00:00
Lunny Xiao
ce9a51ca67 Update README.md 2024-05-23 13:49:08 +00:00
Giteabot
a7dda04aff 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 <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: yp05327 <576951401@qq.com>
2024-05-22 15:04:40 +00:00
Giteabot
487aa24915 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>
2024-05-22 11:02:34 -04:00
Giteabot
17747f61be 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 <wxiaoguang@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-05-19 15:22:54 +00:00
Renovate Bot
af8e2975c0 fix(deps): update docusaurus monorepo to v3.3.2 (#132)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/132
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-05-15 01:11:31 +00:00
Renovate Bot
3c26fd40ae fix(deps): update dependency @mui/material to v5.15.17 (#133)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/133
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-05-15 01:11:25 +00:00
Giteabot
c0872a2a90 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 <yanghongday369@gmail.com>
2024-05-13 18:14:31 +02:00
Lunny Xiao
0e78b128ff Update API version 2024-05-10 09:29:16 +08:00
Lunny Xiao
3144bbb42b Fix outdate links for API docs 2024-05-10 09:25:08 +08:00
Renovate Bot
04ab9ab951 fix(deps): update react monorepo to v18.3.1 (#129)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-05-02 17:26:37 +00:00
Renovate Bot
0ecdabc313 fix(deps): update dependency @mui/material to v5.15.16 (#131)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-05-02 17:25:17 +00:00
Kemal Zebari
eb4194bc05 Don't have redis-cluster as possible cache/session adapter in docs (#30794) (#30806) 2024-05-01 18:24:38 -04:00
Giteabot
b3713f5780 Gitea with first upper case + typos (#30739) (#30747)
Backport #30739 by @mainboarder

* Corrected gitea to Gitea
* fixed some typos

Co-authored-by: mainboarder <git@mainboarder.de>
2024-04-28 23:51:42 +00:00
Lunny Xiao
4c2653c03a Upgrade v1.22.0-rc0 -> v1.22.0-rc1 (#130)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/130
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
2024-04-28 13:24:49 +00:00
Giteabot
a45952a397 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 <xiaolunwen@gmail.com>
2024-04-28 21:02:38 +08:00
Lunny Xiao
a5479d165f Upgrade to v1.21.11 2024-04-24 12:38:19 +08:00
Christoph Lange
c38c81f2ae DOC: in ssh forwarding, user git must be allowed to run docker (#29634)
Added to doc for rootless Docker installation: for SSH passthrough, the
ssh user (git) has to be able to run docker.

---------

Co-authored-by: techknowlogick <matti@mdranta.net>
2024-04-23 14:08:58 -04:00
Giteabot
77574b22e7 Fixup app.example.ini for task section, which is now queue.task (#30555) (#30562)
Backport #30555 by xor-gate

Config section `[task]` has been deprecated in favor of `[queue.task]`

Co-authored-by: Jerry Jacobs <xor-gate@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-04-18 15:15:50 +02:00
techknowlogick
c6c62ade65 rc0 2024-04-12 06:48:52 +00:00
techknowlogick
65e02270ba rc0 2024-04-12 06:47:43 +00:00
Giteabot
7185aa5b9f Update actions variables documents (#30394) (#30404)
Backport #30394 by @lunny

Fix #30393

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Zettat123 <zettat123@gmail.com>
2024-04-11 12:04:21 +08:00
techknowlogick
b02bb3fe8a 1.21.10 2024-04-11 02:32:45 +00:00
techknowlogick
99e9763808 1.21.10 2024-04-11 02:32:18 +00:00
Renovate Bot
6ddfcefa5d fix(deps): update dependency @mui/material to v5.15.15 (#120)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/120
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-04-05 16:28:31 +00:00
Renovate Bot
327710577e fix(deps): update dependency @emotion/styled to v11.11.5 (#123)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-04-05 15:53:40 +00:00
Renovate Bot
88b3e332e7 fix(deps): update docusaurus monorepo to v3.2.1 (#124)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-04-05 15:52:41 +00:00
Lunny Xiao
f3534b1b86 Update .gitea/workflows/test.yaml 2024-04-05 04:03:10 +00:00
Lunny Xiao
a5f2835d4a Update .gitea/workflows/build-and-publish.yaml 2024-04-05 02:43:08 +00:00
Lunny Xiao
5a958215fd Update .gitea/workflows/test.yaml (#126)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/126
2024-04-05 02:41:44 +00:00
Giteabot
356e6c2c62 Add -u git to docs when using docker exec with root installation (#29314) (#30258)
Backport #29314 by @scribblemaniac

This fixes a minor issue in the documentation for SSH Container
Passthrough for non-rootless installs. The non-rootless Dockerfile and
docker-compose do not set `USER`/`user` instructions so `docker exec`
will run as root by default. While running as root, gitea commands will
refuse to execute, breaking these approaches. For containers built with
the rootless instructions, `docker exec` will run as git by default so
this is not necessary in that case.

This issue was already discussed in #19065, but it does not appear this
part of the issue was ever added to the documentation.

Co-authored-by: scribblemaniac <scribblemaniac@users.noreply.github.com>
2024-04-03 01:44:13 -04:00
Giteabot
efb3905c5b Fix the wrong default value of ENABLE_OPENID_SIGNIN on docs (#29925) (#29927)
Backport #29925 by @lunny

Fix #29923

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-03-20 05:08:24 +00:00
liuyu
bd6c7af320 add gtag configuration (#119)
Co-authored-by: HEREYUA <1240335630@qq.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/119
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: liuyu <liuyu@noreply.gitea.com>
Co-committed-by: liuyu <liuyu@noreply.gitea.com>
2024-03-19 13:39:51 +00:00
yp05327
90d5800117 Fix incorrect command order of prepare-docs (#92)
The command order of prepare-docs is incorrect.
We should prepare same version with different locale at once, otherwise the doc files for `zh-cn` in `i18n` folder will be incorrect.

Before: (files in current is as same as version 1.19)
![image](/attachments/81a25d85-ec8e-45dc-b1a1-31d945ae3bfa)

After:
![image](/attachments/31831db4-4f89-45a0-8685-5252665d747b)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/92
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
Co-authored-by: yp05327 <576951401@qq.com>
Co-committed-by: yp05327 <576951401@qq.com>
2024-03-16 13:11:41 +00:00
Lunny Xiao
370bb063b7 Update CI (#117)
Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/117
Reviewed-by: delvh <dev.lh@web.de>
2024-03-16 03:52:16 +00:00
techknowlogick
9e2261d549 Bring back trans-copy.sh (#118)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/118
Reviewed-by: delvh <dev.lh@web.de>
2024-03-16 02:43:09 +00:00
Renovate Bot
4c86e23080 fix(deps): update dependency @mui/material to v5.15.13 (#115)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@mui/material](https://mui.com/material-ui/) ([source](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material)) | dependencies | patch | [`5.15.12` -> `5.15.13`](https://renovatebot.com/diffs/npm/@mui%2fmaterial/5.15.12/5.15.13) |

---

### Release Notes

<details>
<summary>mui/material-ui (@&#8203;mui/material)</summary>

### [`v5.15.13`](https://github.com/mui/material-ui/blob/HEAD/CHANGELOG.md#v51513)

[Compare Source](https://github.com/mui/material-ui/compare/v5.15.12...v5.15.13)

<!-- generated comparing v5.15.12..master -->

*Mar 13, 2024*

A big thanks to the 18 contributors who made this release possible. Here are some highights 

-   The Material UI free Checkout template got a design uplift ([#&#8203;41447](https://github.com/mui/material-ui/issues/41447)) [@&#8203;zanivan](https://github.com/zanivan)

##### `@mui/material@5.15.13`

-   \[Alert] Add `slots` and `slotProps` type to theme ([#&#8203;41324](https://github.com/mui/material-ui/issues/41324)) [@&#8203;sai6855](https://github.com/sai6855)
-   \[Autocomplete] Fix the options list being added to the DOM in `freeSolo` mode even when there are no options, causing style problems ([#&#8203;41300](https://github.com/mui/material-ui/issues/41300)) [@&#8203;rakeshmusturi](https://github.com/rakeshmusturi)
-   Add `paperChannel` token ([#&#8203;41447](https://github.com/mui/material-ui/issues/41447)) [@&#8203;siriwatknp](https://github.com/siriwatknp)
-   \[Switch] Convert to support CSS extraction ([#&#8203;41367](https://github.com/mui/material-ui/issues/41367)) [@&#8203;alexfauquette](https://github.com/alexfauquette)
-   \[Tooltip] Support event handlers with extra parameters ([#&#8203;41320](https://github.com/mui/material-ui/issues/41320)) [@&#8203;LukasTy](https://github.com/LukasTy)

##### `@mui/system@5.15.13`

-   \[RtlProvider] Add component & hook ([#&#8203;41241](https://github.com/mui/material-ui/issues/41241)) [@&#8203;mnajdova](https://github.com/mnajdova)

##### `@mui/utils@5.15.13`

-   \[utils] Fix visually hidden styles' margin unit ([#&#8203;41477](https://github.com/mui/material-ui/issues/41477)) [@&#8203;michaldudak](https://github.com/michaldudak)

##### `@mui/codemod@5.15.13`

-   Fix merging of slotProps and componentProps ([#&#8203;41323](https://github.com/mui/material-ui/issues/41323)) [@&#8203;sai6855](https://github.com/sai6855)

##### `@mui/base@5.0.0-beta.39`

-   \[material-ui]\[joy-ui]\[Autocomplete] Keep in sync highlighted index when the option still exists ([#&#8203;41306](https://github.com/mui/material-ui/issues/41306)) [@&#8203;CGNonofr](https://github.com/CGNonofr)
-   \[FormControl] Export `FormControlOwnerState` type from index ([#&#8203;41287](https://github.com/mui/material-ui/issues/41287)) [@&#8203;michaeldfoley](https://github.com/michaeldfoley)
-   \[material-ui]\[TextareaAutosize] Fix inline style not getting applied ([#&#8203;41369](https://github.com/mui/material-ui/issues/41369)) [@&#8203;ZeeshanTamboli](https://github.com/ZeeshanTamboli)

##### `@pigment-css/react@0.0.2`

-   Handle more scenarios while transforming sx prop ([#&#8203;41372](https://github.com/mui/material-ui/issues/41372)) [@&#8203;brijeshb42](https://github.com/brijeshb42)
-   Improve testing of fixtures ([#&#8203;41389](https://github.com/mui/material-ui/issues/41389)) [@&#8203;brijeshb42](https://github.com/brijeshb42)
-   Fix `keyframes` serialize styles error ([#&#8203;41395](https://github.com/mui/material-ui/issues/41395)) [@&#8203;siriwatknp](https://github.com/siriwatknp)
-   Use class selector instead of class value ([#&#8203;41442](https://github.com/mui/material-ui/issues/41442)) [@&#8203;brijeshb42](https://github.com/brijeshb42)
-   \[next] Warn about unsupported turbo mode in Next.js ([#&#8203;41445](https://github.com/mui/material-ui/issues/41445)) [@&#8203;brijeshb42](https://github.com/brijeshb42)

##### Docs

-   \[material-ui] Refine checkout template ([#&#8203;40967](https://github.com/mui/material-ui/issues/40967)) [@&#8203;zanivan](https://github.com/zanivan)
-   \[material-ui] Add docs for complementary List components ([#&#8203;41329](https://github.com/mui/material-ui/issues/41329)) [@&#8203;anle9650](https://github.com/anle9650)
-   \[material-ui] Add docs for complementary Dialog components ([#&#8203;41313](https://github.com/mui/material-ui/issues/41313)) [@&#8203;jwithington](https://github.com/jwithington)
-   \[material-ui] Fix Templates live preview link ([#&#8203;41467](https://github.com/mui/material-ui/issues/41467)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[material-ui] Polish out the templates page ([#&#8203;41468](https://github.com/mui/material-ui/issues/41468)) [@&#8203;zanivan](https://github.com/zanivan)
-   \[material-ui] Adjust the Templates card design ([#&#8203;41450](https://github.com/mui/material-ui/issues/41450)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[joy-ui] Remove unnecessary styles in color inversion footer demo ([#&#8203;41419](https://github.com/mui/material-ui/issues/41419)) [@&#8203;cipherlogs](https://github.com/cipherlogs)
-   \[joy-ui] Update case studies chip background color ([#&#8203;41413](https://github.com/mui/material-ui/issues/41413)) [@&#8203;cipherlogs](https://github.com/cipherlogs)
-   \[joy-ui] Remove wrong CSS prop from the Sign-in-side template ([#&#8203;41383](https://github.com/mui/material-ui/issues/41383)) [@&#8203;cipherlogs](https://github.com/cipherlogs)
-   \[joy-ui] Fix broken link on the Color Inversion page ([#&#8203;41407](https://github.com/mui/material-ui/issues/41407)) [@&#8203;cipherlogs](https://github.com/cipherlogs)
-   \[pigment] Add example and guide section ([#&#8203;41249](https://github.com/mui/material-ui/issues/41249)) [@&#8203;siriwatknp](https://github.com/siriwatknp)
-   \[pigment-css] Brand name nonbreaking space ([#&#8203;41438](https://github.com/mui/material-ui/issues/41438)) [@&#8203;oliviertassinari](https://github.com/oliviertassinari)
-   \[pigment-css] Fix import on the README ([#&#8203;41411](https://github.com/mui/material-ui/issues/41411)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[pigment-css] Edit starter template links on README ([#&#8203;41409](https://github.com/mui/material-ui/issues/41409)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[pigment-css] Tweak the examples and edit READMEs ([#&#8203;41408](https://github.com/mui/material-ui/issues/41408)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[pigment-css] Adjust the bit about CSS vars on the README ([#&#8203;41463](https://github.com/mui/material-ui/issues/41463)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   Finish brand name fixes [#&#8203;41438](https://github.com/mui/material-ui/issues/41438) [@&#8203;oliviertassinari](https://github.com/oliviertassinari)
-   Remove noreferrer [@&#8203;oliviertassinari](https://github.com/oliviertassinari)
-   Fix v4 docs `<b>` appearing in notifications ([#&#8203;41390](https://github.com/mui/material-ui/issues/41390)) [@&#8203;peterwangsc](https://github.com/peterwangsc)
-   Update GitHub project links ([#&#8203;41370](https://github.com/mui/material-ui/issues/41370)) [@&#8203;danilo-leal](https://github.com/danilo-leal)

##### Core

-   \[pigment] Make all Pigment CSS packages public ([#&#8203;41404](https://github.com/mui/material-ui/issues/41404)) [@&#8203;brijeshb42](https://github.com/brijeshb42)
-   \[pigment] Rename directories to match package names ([#&#8203;41453](https://github.com/mui/material-ui/issues/41453)) [@&#8203;brijeshb42](https://github.com/brijeshb42)
-   \[pigment-css] Example fix leading spaces ([#&#8203;41439](https://github.com/mui/material-ui/issues/41439)) [@&#8203;oliviertassinari](https://github.com/oliviertassinari)
-   \[code-infra] Add short note about e2e-website workflow schedule ([#&#8203;41355](https://github.com/mui/material-ui/issues/41355)) [@&#8203;Janpot](https://github.com/Janpot)
-   \[code-infra] Add alias for icon types ([#&#8203;41248](https://github.com/mui/material-ui/issues/41248)) [@&#8203;Janpot](https://github.com/Janpot)
-   \[code-infra] Reduce concurrency of typescript:ci further ([#&#8203;41392](https://github.com/mui/material-ui/issues/41392)) [@&#8203;Janpot](https://github.com/Janpot)
-   \[code-infra] Reduce concurrency for test_types ci job ([#&#8203;41385](https://github.com/mui/material-ui/issues/41385)) [@&#8203;Janpot](https://github.com/Janpot)
-   \[code-infra] Adapt API code generator to Base UI repo needs ([#&#8203;41475](https://github.com/mui/material-ui/issues/41475)) [@&#8203;michaldudak](https://github.com/michaldudak)
-   \[docs-infra] Don't generate preview files for the templates ([#&#8203;41379](https://github.com/mui/material-ui/issues/41379)) [@&#8203;mnajdova](https://github.com/mnajdova)
-   \[docs-infra] Fix pigment css apps path in the render mui demos script ([#&#8203;41476](https://github.com/mui/material-ui/issues/41476)) [@&#8203;mnajdova](https://github.com/mnajdova)
-   \[docs-infra] move feedback to ESM ([#&#8203;41381](https://github.com/mui/material-ui/issues/41381)) [@&#8203;alexfauquette](https://github.com/alexfauquette)
-   \[docs-infra] Improve color contrast throughout ([#&#8203;41387](https://github.com/mui/material-ui/issues/41387)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[docs-infra] Simplify Algolia crawler config ([#&#8203;41312](https://github.com/mui/material-ui/issues/41312)) [@&#8203;oliviertassinari](https://github.com/oliviertassinari)
-   \[docs-infra] Adjust the tabs and layout selection design ([#&#8203;41084](https://github.com/mui/material-ui/issues/41084)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[blog] Update the Base UI post with links to dedicated repo ([#&#8203;41358](https://github.com/mui/material-ui/issues/41358)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[website] Update the Careers page role ([#&#8203;41384](https://github.com/mui/material-ui/issues/41384)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[website] Compress about images [@&#8203;oliviertassinari](https://github.com/oliviertassinari)
-   \[website] Improve color contrast on the homepage ([#&#8203;41465](https://github.com/mui/material-ui/issues/41465)) [@&#8203;danilo-leal](https://github.com/danilo-leal)
-   \[examples] Add pigment-css-vite-ts starter example ([#&#8203;41196](https://github.com/mui/material-ui/issues/41196)) [@&#8203;siriwatknp](https://github.com/siriwatknp)
-   \[examples] Add pigment-css-nextjs-ts starter project ([#&#8203;41105](https://github.com/mui/material-ui/issues/41105)) [@&#8203;siriwatknp](https://github.com/siriwatknp)

All contributors of this release in alphabetical order: [@&#8203;alexfauquette](https://github.com/alexfauquette), [@&#8203;anle9650](https://github.com/anle9650), [@&#8203;brijeshb42](https://github.com/brijeshb42), [@&#8203;CGNonofr](https://github.com/CGNonofr), [@&#8203;cipherlogs](https://github.com/cipherlogs), [@&#8203;danilo-leal](https://github.com/danilo-leal), [@&#8203;jwithington](https://github.com/jwithington), [@&#8203;Janpot](https://github.com/Janpot), [@&#8203;michaeldfoley](https://github.com/michaeldfoley), [@&#8203;michaldudak](https://github.com/michaldudak), [@&#8203;mnajdova](https://github.com/mnajdova), [@&#8203;oliviertassinari](https://github.com/oliviertassinari), [@&#8203;peterwangsc](https://github.com/peterwangsc), [@&#8203;rakeshmusturi](https://github.com/rakeshmusturi), [@&#8203;sai6855](https://github.com/sai6855), [@&#8203;siriwatknp](https://github.com/siriwatknp), [@&#8203;zanivan](https://github.com/zanivan), [@&#8203;ZeeshanTamboli](https://github.com/ZeeshanTamboli)

</details>

---

### 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.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjI0MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/115
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-03-14 01:40:35 +00:00
Renovate Bot
3745d3283e fix(deps): update dependency redocusaurus to v2.0.2 (#114)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [redocusaurus](https://redocusaurus.vercel.app/) ([source](https://github.com/rohit-gohri/redocusaurus)) | dependencies | patch | [`2.0.1` -> `2.0.2`](https://renovatebot.com/diffs/npm/redocusaurus/2.0.1/2.0.2) |

---

### Release Notes

<details>
<summary>rohit-gohri/redocusaurus (redocusaurus)</summary>

### [`v2.0.2`](https://github.com/rohit-gohri/redocusaurus/blob/HEAD/CHANGELOG.md#redocusaurus202)

[Compare Source](https://github.com/rohit-gohri/redocusaurus/compare/v2.0.1...v2.0.2)

-   [#&#8203;335](https://github.com/rohit-gohri/redocusaurus/pull/335) [`c5e534f`](c5e534f456) Thanks [@&#8203;rohit-gohri](https://github.com/rohit-gohri)! - Upgrade dependencies

-   Updated dependencies \[[`c5e534f`](c5e534f456)]:
    -   docusaurus-plugin-redoc@2.0.2
    -   docusaurus-theme-redoc@2.0.2

</details>

---

### 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.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/114
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-03-13 02:00:51 +00:00
liuyu
11617bdcb2 add enterprise (#113)
**before**

![image](/attachments/ec6b488a-12e0-498a-8bba-93b7073991ff)
**after**

![image](/attachments/f886af6c-ad44-4155-b453-c63162c57e56)

Co-authored-by: HEREYUA <1240335630@qq.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/113
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: liuyu <liuyu@noreply.gitea.com>
Co-committed-by: liuyu <liuyu@noreply.gitea.com>
2024-03-07 09:02:49 +00:00
Renovate Bot
373a67a584 fix(deps): update dependency @emotion/react to v11.11.4 (#112)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-03-07 04:04:54 +00:00
Renovate Bot
8b04b42f21 fix(deps): update docusaurus monorepo to v3.1.1 (#105)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-03-07 04:04:46 +00:00
Renovate Bot
2b3a967be3 fix(deps): update dependency @mui/material to v5.15.12 (#111)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-03-06 04:38:14 +00:00
Giteabot
46c81b6093 Update FAQ about git hook problems (#29495) (#29496)
Backport #29495 by @wolfogre

Close
https://github.com/go-gitea/gitea/issues/29338#issuecomment-1970363817

Co-authored-by: Jason Song <i@wolfogre.com>
2024-02-29 22:36:00 +08:00
Lunny Xiao
861c140e43 Upgrade to v1.21.7 2024-02-28 23:43:35 +08:00
Jason Song
35a789a523 Update docs about DEFAULT_ACTIONS_URL (#29442) (#29445)
Backport #29442.

Follow #25581.
2024-02-27 18:16:08 +08:00
Lunny Xiao
ac234b2622 upgrade version from 1.21.5 -> 1.21.6 2024-02-25 22:32:08 +08:00
Lunny Xiao
ba17d7db8f Docker Tag Information in Docs (#29047) (#29362)
Backport #29047 

Add more details for the docker tag when using container registry.

Co-authored-by: wienans <40465543+wienans@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-02-24 10:41:10 +00:00
Lunny Xiao
6c0604f96c Upgrade to v1.21.5 2024-02-21 22:54:19 +08:00
Renovate Bot
326210349c chore(deps): update aws-actions/configure-aws-credentials action to v4 (#108)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-02-19 23:56:49 +00:00
Renovate Bot
931864d5b8 fix(deps): update dependency @mui/material to v5.15.10 (#104)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-02-19 23:50:51 +00:00
jolheiser
a6008e65af fix: correct url for awesome-gitea "edit this page" (#109)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/109
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2024-02-19 16:13:00 +00:00
Km
da052f5d40 Explained where create issue/PR template (#29035)
For some user (as me), documentation lack of precision about where to
store issue/pr template.

I propose an enhancement about this point. With bold exergue and
precision about server itself.

I've found some user with same interrogation as :
https://forum.gitea.com/t/issue-template-directory/3328

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-02-19 15:57:25 +01:00
Lunny Xiao
0d53c62301 rm outdated docs from some languages (#27530) (#29208)
backport #27530 to make pull request lint happy
https://github.com/go-gitea/gitea/actions/runs/7939560756/job/21679856929?pr=29206
since #29106

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2024-02-17 12:44:33 +01:00
silverwind
c9f23e6121 Rework spellchecking, add lint-spell (#29112)
Backport clean cherry-picks of
9c39f8515f
and
c7a21cbb0c
onto 1.21.

- Use maintained fork https://github.com/golangci/misspell
- Rename `mispell-check` to `lint-spell`, add `lint-spell-fix`
- Run `lint-spell` in separate actions step
- Lint more files, fix discovered issues
- Remove inaccurate and outdated info in docs (we do not need GOPATH for
tools anymore)

Maybe later we can add more spellchecking tools, but I have not found
any good ones yet.
2024-02-16 02:42:26 +00:00
Renovate Bot
a85623f6d9 fix(deps): update dependency redocusaurus to v2.0.1 (#106)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-02-14 22:05:42 +00:00
Renovate Bot
ae94a75585 fix(deps): update dependency @mdx-js/react to v3.0.1 (#107)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-02-14 22:05:02 +00:00
CEnnis91
285c1efc79 Fix incorrect link to swift doc and swift package-registry login command (#29096) (#29103) 2024-02-08 18:05:10 +00:00
Wang
22277e34f2 Fix typos in the documentation (#29048) (#29056)
Backport #29048

Corrected two typos.
2024-02-05 21:15:49 +08:00
Km
c17a76065e labels and licenses are directories (#29037)
Be more explicit about custom path relative to licences and labels
content
2024-02-03 18:11:41 -05:00
techknowlogick
17221d56f8 1.21.4 2024-01-17 20:33:08 +00:00
techknowlogick
796a52d9aa 1.21.4 2024-01-17 20:32:41 +00:00
Renovate Bot
c528fac521 fix(deps): update dependency @mui/material to v5.15.3 (#102)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-01-07 05:49:56 +00:00
Giteabot
6b2ba53046 Improve frontend guideline (#28711) (#28713) 2024-01-06 12:30:36 -05:00
Renovate Bot
02e6a011bb fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.40.0 (#98)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-01-06 05:11:21 +00:00
Renovate Bot
c4bcda7bc7 fix(deps): update docusaurus monorepo to v3.1.0 (#103)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2024-01-06 05:10:42 +00:00
liuyu
1dc84f5a5a remove useless file (#101)
Co-authored-by: HEREYUA <1240335630@qq.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/101
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: liuyu <liuyu@noreply.gitea.com>
Co-committed-by: liuyu <liuyu@noreply.gitea.com>
2024-01-03 10:57:53 +00:00
liuyu
5df3667e70 add subscribe request (#100)
Co-authored-by: HEREYUA <1240335630@qq.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/100
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: liuyu <liuyu@noreply.gitea.com>
Co-committed-by: liuyu <liuyu@noreply.gitea.com>
2024-01-03 09:53:00 +00:00
Giteabot
dd79335bf9 Improve document for ARTIFACT_RETENTION_DAYS (#28646) (#28648)
Backport #28646 by wxiaoguang

Follow #28626

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-12-29 15:39:59 +08:00
Giteabot
7b2800cc59 switch destination directory for apt signing keys (#28639) (#28642)
Backport #28639 by @denyskon

According to [Debian
docs](https://wiki.debian.org/DebianRepository/UseThirdParty):

> The certificate MUST NOT be placed in /etc/apt/trusted.gpg.d or loaded
by apt-key add.
> ...
> If future updates to the certificate will be managed by an apt/dpkg
package as recommended below, then it SHOULD be downloaded into
/usr/share/keyrings using the same filename that will be provided by the
package. If it will be managed locally , it SHOULD be downloaded into
/etc/apt/keyrings instead.
> ...
> A sources.list entry SHOULD have the signed-by option set.

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
2023-12-29 05:44:47 +00:00
wxiaoguang
ac1dbc439c Improve 1.21 document for Database Preparation (#28643) (#28644)
Backport #28643

Fix #28247
2023-12-29 13:05:12 +08:00
Giteabot
b6622b248c Extend description for ARTIFACT_RETENTION_DAYS (#28626) (#28630)
Backport #28626 by @hakito

Make it clear that this value is just a default value and that every
artifact can have it's own value.

Co-authored-by: Gerd Katzenbeisser <hakito@users.noreply.github.com>
2023-12-28 18:21:46 +08:00
techknowlogick
747424bd6f 1.21.3 2023-12-28 02:09:10 +00:00
techknowlogick
3327d2a6a2 1.21.3 2023-12-28 02:08:54 +00:00
wxiaoguang
e1c0581954 Refactor CORS handler (#28587) (#28611)
Backport #28587, the only conflict is the test file.

The CORS code has been unmaintained for long time, and the behavior is
not correct.

This PR tries to improve it. The key point is written as comment in
code. And add more tests.

Fix #28515
Fix #27642
Fix #17098
2023-12-25 21:01:24 +08:00
Giteabot
bf36b7e953 Update actions document about comparsion as Github Actions (#28560) (#28564)
Backport #28560 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-12-20 16:00:30 -05:00
sillyguodong
7e2fe79f18 Set free trial days to 30 days (#99)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/99
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: sillyguodong <gedong_1994@163.com>
Co-committed-by: sillyguodong <gedong_1994@163.com>
2023-12-20 06:47:49 +00:00
wxiaoguang
7869e15ca2 Add option to disable ambiguous unicode characters detection (#28454) (#28499)
Backport #28454 (the only conflict is caused by some comments)

* Close #24483
* Close #28123
* Close #23682
* Close #23149
2023-12-18 12:20:37 +08:00
Giteabot
fa3267ce0d Update docs for DISABLE_QUERY_AUTH_TOKEN (#28485) (#28488)
Backport #28485 by @kdumontnu

As described
[here](https://github.com/go-gitea/gitea/pull/28390#issuecomment-1857553331).

Co-authored-by: Kyle D <kdumontnu@gmail.com>
2023-12-16 00:04:05 -05:00
Giteabot
94a7a8228f Fix Chinese translation of config cheat sheet[API] (#28472) (#28473)
Backport #28472 by @CaiCandong

Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
2023-12-15 07:54:32 +08:00
Giteabot
87a0cd6c50 Fix documents for "custom/public/assets/" (#28465) (#28467)
Backport #28465 by wxiaoguang

Fix #28463

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-12-14 17:00:39 +08:00
Lunny Xiao
532b5504e5 Upgrade to 1.21.2 2023-12-13 18:24:51 +08:00
yp05327
fa9b9f98e3 Fix docs links in v1.19 (#28431)
I'm sorry for the mistake in #28415

![image](https://github.com/go-gitea/gitea/assets/18380374/792eb1fa-7df7-4f13-a04b-4b705554b653)
https://gitea.com/gitea/gitea-docusaurus/actions/runs/764#jobstep-9-69

ps: it is `../administration/customizing-gitea/#labels` in current
version. Which is better?
2023-12-12 16:36:24 +08:00
Giteabot
435036701b Fix links in docs (#28302) (#28418)
Backport #28302 by @yp05327

Close #28287

## How to test it in local
convert Makefile L34 into:
```
cd .tmp/upstream-docs && git clean -f && git reset --hard && git fetch origin pull/28302/head:pr28302 && git switch pr28302
```

Co-authored-by: yp05327 <576951401@qq.com>
2023-12-11 22:53:59 +08:00
yp05327
0466686ca8 Fix docs links in v1.19 (#28415) 2023-12-10 23:40:19 -08:00
techknowlogick
0cdda9a463 add banner 2023-12-07 17:37:02 +00:00
lng2020
251c3ee97c Fix 1.20 minor version (#95)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/95
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: lng2020 <nanguanlin6@gmail.com>
Co-committed-by: lng2020 <nanguanlin6@gmail.com>
2023-11-29 07:49:37 +00:00
yp05327
ce87264561 Fix links in docs (#28234) (#28250)
Backport #28234
2023-11-28 14:30:45 +08:00
yp05327
7a7c698365 Revert move installation/upgrade-from-gogs.md in 1.21 (#28235)
https://github.com/go-gitea/gitea/pull/28233#discussion_r1405539630
2023-11-27 15:28:48 +01:00
yp05327
0b2d61ad8d Fix some incorrect links in docs (#28191) (#28233)
Backport https://github.com/go-gitea/gitea/pull/28191
2023-11-27 05:07:00 -05:00
Giteabot
b8acdc3a5c Fix links in docs (#28234) (#28238)
Backport #28234 by @yp05327

Follow #28191

Changes:
- `(doc/administration/config-cheat-sheet.md` is incorrect:

![image](https://github.com/go-gitea/gitea/assets/18380374/1c417dd7-61a0-49ba-8d50-871fd4c9bf20)
- remove `../../`

Co-authored-by: yp05327 <576951401@qq.com>
2023-11-27 15:36:15 +08:00
yp05327
d05841f64b Fix docs problems in 1.19 (#28236)
Follow #28191
2023-11-27 00:35:06 -05:00
techknowlogick
d9712e0fd6 Update loop_docs.sh 2023-11-27 04:43:43 +00:00
techknowlogick
52808369d4 Update docusaurus.config.js 2023-11-27 04:43:08 +00:00
Giteabot
804129d9ff Docs: Replace deprecated IS_TLS_ENABLED mailer setting in email setup (#28205) (#28208)
Backport #28205 by @CodeShakingSheep

In the [docs for email
setup](https://docs.gitea.com/administration/email-setup)
`mailer.IS_TLS_ENABLED` is mentioned which was replaced by
`mailer.PROTOCOL` in release 1.18.0 according to
https://blog.gitea.com/release-of-1.18.0/ . This change wasn't reflected
in the docs for email setup. I just replaced the deprecated mailer
setting.

Co-authored-by: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com>
2023-11-25 15:41:01 +08:00
Renovate Bot
e13745aa3f fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.38.0 (#91)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-11-25 04:17:25 +00:00
Giteabot
b024987618 Fix some incorrect links in docs (#28191) (#28201)
Backport #28191 by @yp05327


https://gitea.com/gitea/gitea-docusaurus/actions/runs/661/jobs/0#jobstep-9-39
I noticed that there are many warning logs in building docs.
It is causing 404 in docs.gitea.com now, so we need to fix it.
And there are also some other problems in v1.19 which can not be done in
this PR.

Co-authored-by: yp05327 <576951401@qq.com>
2023-11-24 19:55:08 +00:00
yp05327
be67d3f610 Remove misadded packages docs in 1.19 (#28192)
Follow #28191

There are some misadded docs in #24914's backport PR #25016.
The following package registries are all supported in 1.20, so we should
not have docs in v1.19

- Alpine (#23714)
- CRAN  (#22343)
- Debain (#24426)
- Go (#24687)
- RPM (#23380)
2023-11-24 01:09:17 -05:00
Giteabot
1c3dadcb1c Fix the description about the default setting for action in quick start document (#28160) (#28168)
Backport #28160 by @yp05327

Since #27054, Actions are enabled by default. so we should also edit the
document. 😃

ps: I think this should be backport to 1.21.0.

Co-authored-by: yp05327 <576951401@qq.com>
2023-11-22 16:46:11 +08:00
techknowlogick
6da93d0e87 rm announcement bar as docs have been live for half a year 2023-11-21 20:31:28 +00:00
techknowlogick
c4259b9a83 1.21 2023-11-20 05:35:14 +00:00
John Olheiser
79dfabcd5a Update docs for docusaurus v3 (#28128)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-11-20 00:25:22 -05:00
John Olheiser
163765d335 Update docs for docusaurus v3 (#28126)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-11-20 00:24:50 -05:00
John Olheiser
82ce3ded0a Update docs for docusaurus v3 (#28127)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-11-20 00:24:36 -05:00
jolheiser
52841fa1d9 Makefile enhancements (#89)
These are some things I changed to make local development easier, especially when having to update multiple versions of docs at once like the docusaurus v3 update.

i.e.
```makefile
GITEA_REMOTE := ~/code/code.gitea.io/gitea
GITEA_LATEST_BRANCH := docs-v3
GITEA_VERSION_BRANCH_PREFIX := docs-v3-
...
```
to run the Makefile against my local repo.

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/89
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-11-20 04:27:27 +00:00
Renovate Bot
213177e524 fix(deps): update dependency @easyops-cn/docusaurus-search-local to v0.37.4 (#87)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-11-16 01:43:21 +00:00
Renovate Bot
dc68e99a1a fix(deps): update dependency prism-react-renderer to v2.2.0 (#86)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-11-16 01:42:58 +00:00
Lunny Xiao
1f528ecb35 Update 1.21.0 version 2023-11-15 13:16:15 +08:00
Giteabot
7e1b2579a1 Change default size of issue/pr attachments and repo file (#27946) (#28017)
Backport #27946 by @lng2020

As title. Some attachments and file sizes can easily be larger than
these limits

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
2023-11-13 15:27:39 +01:00
techknowlogick
d669bc9720 fix theme import 2023-11-10 13:01:41 -05:00
techknowlogick
9c94c41125 bump to v3 of deps 2023-11-10 12:55:26 -05:00
Renovate Bot
8b09ee6be8 fix(deps): update docusaurus monorepo to v3 (major) (#82)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-11-10 17:14:05 +00:00
Renovate Bot
4772c875cd fix(deps): update react monorepo to v18 (major) (#80)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-11-10 17:11:19 +00:00
Giteabot
2d11206e9c Document REACTION_MAX_USER_NUM setting option (#27954) (#27959)
Backport #27954 by @6543

as title

---
*Sponsored by Kithara Software GmbH*

Co-authored-by: 6543 <m.huber@kithara.com>
2023-11-08 08:54:48 +08:00
Giteabot
0c06065ab4 Remove known issue section in Gitea Actions Doc (#27930) (#27938)
Backport #27930 by @lng2020

The bug has been fixed for several months in the
`docker/build-push-action`
The fix commit is
[d8823bfaed](d8823bfaed)
as the Gitea Actions Doc mentioned too.

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
2023-11-06 17:03:06 +01:00
Giteabot
7daad25fe2 refactor postgres connection string building (#27723) (#27869)
Backport #27723 by @mpldr

This patchset changes the connection string builder to use net.URL and
the host/port parser to use the stdlib function for splitting host from
port. It also adds a footnote about a potentially required portnumber
for postgres UNIX sockets.

Fixes: #24552

Co-authored-by: Moritz Poldrack <33086936+mpldr@users.noreply.github.com>
2023-11-01 23:19:02 +00:00
Giteabot
e1186b6b76 doc: actions/act-runner: document running as a systemd service (#27844) (#27866)
Backport #27844 by @nodiscc

This documents running `act-runner` as a systemd service under a
dedicated user account.

Co-authored-by: nodiscc <nodiscc@gmail.com>
2023-11-01 18:18:01 +01:00
Giteabot
86c8fcdd5b Fix wrong relative path on obtain token from command line (#27850) (#27851)
Backport #27850 by @lunny

Caused by #27845

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-10-31 11:36:22 +08:00
Giteabot
93d0b216be doc: actions/act-runner: document obtaining a runner registration token from gitea CLI (#27845) (#27848) 2023-10-30 20:16:05 -04:00
Renovate Bot
4ce58616e6 chore(deps): update actions/setup-node action to v4 (#81)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-24 20:10:15 +00:00
Giteabot
c599d2a203 Change the default branch in the agit docs (#27621) (#27623)
Backport #27621 by @lng2020

It's main now.
relevant #27579

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
2023-10-15 09:16:15 +08:00
Renovate Bot
c382b955f5 fix(deps): update dependency clsx to v2 (#78)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-14 01:32:27 +00:00
Giteabot
9d5aeb30c4 Increase queue length (#27555) (#27562)
Backport #27555 by @wolfogre

It should be OK to increase the default queue length since the default
type is "level".

IMO, the old default length (100) is a little too small. See
https://github.com/go-gitea/gitea/issues/27540#issuecomment-1754269491

IIRC, a larger length could lead to more memory usage only when the type
is "channel," but it's an obscure case. Otherwise, it's just a limit
(for "level" or "redis").

Co-authored-by: Jason Song <i@wolfogre.com>
2023-10-10 20:22:26 +08:00
Giteabot
3c5ac89f75 Enable markdownlint no-duplicate-header (#27500) (#27506)
Backport #27500 by @silverwind

Duplicate headers in a single Markdown document are problemlematic
because the auto-generated links won't be stable. Enable this rule with
no exceptions which is also the default of `markdownlint`. For example:

```md
# A
## Example
# B
## Example
```
Docasaurus will generated `example` and `example-1` links for this. If
the first heading is altered, the link `example` will unexpectedly move
to the second example heading.

Ref: https://github.com/go-gitea/gitea/pull/27461#discussion_r1347987659

Co-authored-by: silverwind <me@silverwind.io>
2023-10-07 21:41:41 +08:00
techknowlogick
83fd2e9b8b change lineending 2023-10-06 18:36:30 -04:00
techknowlogick
8dc5241fbd rc1 2023-10-06 22:30:53 +00:00
techknowlogick
6ebe1c9347 1.20.5 2023-10-06 22:30:38 +00:00
techknowlogick
ce87f6ee78 1.20.5 2023-10-06 22:30:15 +00:00
techknowlogick
7d48e4492d Revert "fix(deps): update dependency redocusaurus to v1.6.4 (#72)"
This reverts commit 7a9c23954d.
2023-10-06 18:16:05 -04:00
techknowlogick
5c694b9a51 Revert "fix(deps): update docusaurus monorepo to v2.4.3 (#75)"
This reverts commit 068d708bdf.
2023-10-06 18:15:36 -04:00
Renovate Bot
7a9c23954d fix(deps): update dependency redocusaurus to v1.6.4 (#72)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-04 04:07:20 +00:00
Renovate Bot
068d708bdf fix(deps): update docusaurus monorepo to v2.4.3 (#75)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-03 18:18:58 +00:00
Renovate Bot
101c2755b4 chore(deps): update actions/checkout action to v4 (#76)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-03 18:18:40 +00:00
Renovate Bot
bd20244853 fix(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.36.0 (#73)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-03 17:19:46 +00:00
Renovate Bot
9a2676ade2 Configure Renovate (#71)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-03 17:13:46 +00:00
Giteabot
b2d283bca0 Make Actions tasks/jobs timeouts configurable by the user (#27400) (#27402)
Backport #27400 by @fantognazza

With this PR we added the possibility to configure the Actions timeouts
values for killing tasks/jobs.
Particularly this enhancement is closely related to the `act_runner`
configuration reported below:
```
# The timeout for a job to be finished.
# Please note that the Gitea instance also has a timeout (3h by default) for the job.
# So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
timeout: 3h
```

---

Setting the corresponding key in the INI configuration file, it is
possible to let jobs run for more than 3 hours.

Signed-off-by: Francesco Antognazza <francesco.antognazza@gmail.com>
2023-10-03 10:26:35 +08:00
Lunny Xiao
afdff484cf Fix build 2023-10-01 21:54:26 +08:00
Lunny Xiao
d89e8f97e7 Fix build 2023-10-01 21:17:05 +08:00
Lunny Xiao
b999a774bd Add 1.21rc0 2023-10-01 21:01:57 +08:00
Giteabot
826c454a64 Enable production source maps for index.js, fix CSS sourcemaps (#27291) (#27295)
Backport #27291 by @silverwind

Previously, the production build never output sourcemaps. Now we emit
one file for `index.js` because it is the most likely one where we need
to be able to better debug reported issues like
https://github.com/go-gitea/gitea/issues/27213. This will currently
increase the binary size of gitea by around 700kB which is what the
gzipped source map file has.

Also, I fixed the CSS sourcemap generation which was broken since the
introduction of lightningcss.

The chinese docs are machine-translated, please correct accordingly.

Co-authored-by: silverwind <me@silverwind.io>
2023-09-27 04:26:28 +02:00
Giteabot
2667923323 Update database-preparation and add note re: MariaDB (#27232) (#27236)
Backport #27232 by @techknowlogick

update DB docs per feedback.
https://gitea.com/gitea/gitea-docusaurus/issues/69

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2023-09-25 05:27:25 +08:00
Giteabot
4893ccbf37 Update database-preparation and add note re: MariaDB (#27232) (#27235)
Backport #27232 by @techknowlogick

update DB docs per feedback.
https://gitea.com/gitea/gitea-docusaurus/issues/69

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2023-09-25 05:27:15 +08:00
Giteabot
0f59bdcd2b Improve actions docs related to pull_request event (#27126) (#27145)
Backport #27126 by @Zettat123

Related to #27039

The `ref` property in Gitea Actions is different from GitHub Actions.
This PR improves the documentation to explain the difference.

Co-authored-by: Zettat123 <zettat123@gmail.com>
2023-09-20 11:49:58 +02:00
wxiaoguang
6c465e0550 Use secure cookie for HTTPS sites (#26999) (#27013)
Backport #26999

If the AppURL(ROOT_URL) is an HTTPS URL, then the COOKIE_SECURE's
default value should be true.

And, if a user visits an "http" site with "https" AppURL, they won't be
able to login, and they should have been warned. The only problem is
that the "language" can't be set either in such case, while I think it
is not a serious problem, and it could be fixed easily if needed.
2023-09-11 09:59:00 +00:00
Infinoid
f6ca45afbb Correct the database.LOG_SQL default value in config cheat sheet (#26997) (#27002)
This is a manual backport of #26997 to v1.20.
2023-09-10 21:43:42 -04:00
techknowlogick
cd783f3512 Update .gitea/workflows/test.yaml 2023-09-10 19:34:24 +00:00
techknowlogick
a6651e0697 Update .gitea/workflows/build-and-publish.yaml 2023-09-10 19:34:12 +00:00
techknowlogick
55cce89dfd Update docusaurus.config.js 2023-09-10 19:22:12 +00:00
techknowlogick
3672d33240 Update loop_docs.sh 2023-09-10 19:21:42 +00:00
silverwind
d3697c65d2 Run both workflows on node 18 (#68)
Should also fix the build failure on main under node 20:

https://github.com/facebook/docusaurus/issues/9278

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/68
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2023-09-07 21:26:20 +00:00
silverwind
07849dda65 Add .npmrc and regenerate package-lock.json (#67)
Same `.npmrc` as in gitea repo which also bumps the lockfile version to v3, meaning npm v7 or higher is required.

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/67
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2023-09-07 14:31:43 +00:00
techknowlogick
e5bf9e041c Improve LDAP group config documentation (#21227) (#26921)
backport #21227

author @svenseeberg

Co-authored-by: Sven Seeberg <mail@sven-seeberg.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-09-05 22:41:10 -04:00
Giteabot
6df1396468 Update documents to fix some links (#26885) (#26888)
Backport #26885 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-09-03 19:37:42 +00:00
CaiCandong
e9b0c95116 Update docs about attachment path (#26883) (#26884)
Backport #26883 
This change was caused by #26271, for configuration as below:
```
[attachment]
ENABLE = true
PATH = data/attachments
MAX_SIZE = 100
MAX_FILES = 5
```
Before #26271, the resolved path is ${AppWorkPath}/${attachments.PATH}
(such as `/var/lib/gitea/data/attachments`)
After #26271, the resolved path is ${AppDataPath}/${attachments.PATH}
(such as `/var/lib/gitea/data/data/attachments`)

Fix https://github.com/go-gitea/gitea/issues/26864 Follow
https://github.com/go-gitea/gitea/pull/26271
2023-09-03 18:45:37 +00:00
Giteabot
bdb6828282 Improve the "bug report" template and "support options" document (#26753) (#26780)
Backport #26753 by @wxiaoguang

* `/help/support` is a better document than
`/administration/logging-config` for bug reporting
* Improve `support.en-us.md`
    * Move/add detailed contents into `Advanced Bug Report Tips` section
    * Merge `Chinese Support` section into `Support Options`

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-08-29 07:57:21 +08:00
Lunny Xiao
02d1dfcef9 Use docs.gitea.com instead of docs.gitea.io (#26769)
backport #26739
2023-08-28 19:58:16 +08:00
xpume
b4056f78f1 Fix Page Not Found error (#26768)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-08-28 18:07:38 +08:00
Giteabot
8360939f6f Add matrix to support (#26382) (#26722)
Backport #26382 by @jolheiser

This PR adds our matrix space to the support options and alphabetizes
the list.

I also considered adding our Mastodon, however that isn't as suitable as
the other options because it's just whoever has access to the account vs
a community chat/forum.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2023-08-25 01:55:53 -04:00
techknowlogick
08bd4581f0 Update .gitea/workflows/build-and-publish.yaml 2023-08-25 00:41:53 +00:00
Giteabot
de7b8f36e8 Prefer variables over subprocesses (#26690) (#26693)
Backport #26690 by @thomas-mc-work

… because it doesn't require a separate shell, spawning a process which
cost unnecessary resources and takes time.

Co-authored-by: Thomas McWork <thomas.mc.work@posteo.de>
2023-08-23 14:53:44 +02:00
Giteabot
ac0d520fec add mfa doc (#26654) (#26674)
Backport #26654 by @lunny

copy and modified from #14572 

> Whilst debating enforcing MFA within our team, I realised there isn't
a lot of context to the side effects of enabling it. Most of us use Git
over HTTP and would need to add a token.

I plan to add another PR that adds a sentence to the UI about needing to
generate a token when enabling MFA if HTTP is to be used.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: silverwind <me@silverwind.io>
2023-08-23 01:57:01 +00:00
Lunny Xiao
55f25636ae Fix missed version change 2023-08-22 12:21:19 +08:00
jolheiser
ca34387b0c feat: plausible (#66)
Adds plausible analytics to the docs.

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/66
Reviewed-by: silverwind <silverwind@noreply.gitea.com>
Reviewed-by: delvh <dev.lh@web.de>
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-08-22 01:27:01 +00:00
techknowlogick
1097526deb 1.20.3 2023-08-21 16:07:19 +00:00
techknowlogick
9c2c3041e9 1.20.3 2023-08-21 16:07:00 +00:00
techknowlogick
b5fb0c1e2e Update docusaurus.config.js 2023-08-14 15:59:09 +00:00
Giteabot
9388088951 Update upgrade documentation to add a check for deprecated configurations (#26451) (#26452)
Backport #26451 by @lunny

fix
https://github.com/go-gitea/gitea/issues/25995#issuecomment-1674096710

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2023-08-11 08:17:27 +02:00
Giteabot
a7c11fc8e2 [docs] Add missing backtick in quickstart.zh-cn.md (#26349) (#26357) 2023-08-06 15:57:21 -04:00
Brian Lachniet
a1e8e6a7aa [docs] Fix Gmail configuration (#26356) 2023-08-06 12:02:43 -04:00
techknowlogick
9f29a9aff4 Update loop_docs.sh 2023-08-05 20:25:12 +00:00
Giteabot
0f321b631c Remove backslashed newlines on markdown (#26344) (#26348)
Backport #26344 by @lunny

Fix https://gitea.com/gitea/gitea-docusaurus/issues/56

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-08-05 23:42:45 +08:00
Giteabot
acd5f33713 Clarify the logger's MODE config option (#26267) (#26281)
Backport #26267 by @wxiaoguang

1. Fix the wrong document (add the missing `MODE=`)
2. Add a more friendly log message to tell users to add `MODE=` in their
config

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-08-02 01:08:28 +02:00
Giteabot
33f0ebc15d Update Arch linux URL from community to extra (#26273) (#26276)
Co-authored-by: minijaws <minijaws@gmail.com>
2023-08-01 10:32:23 -05:00
Denys Konovalov
39f9261333 Fix edit url (#55)
Since the Docusaurus-ify PR series from @jolheiser, the docs pages are no longer inside the doc/ subfolder. Fix the URL for editing a docs page in Docusaurus accordingly.

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/55
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Co-authored-by: Denys Konovalov <denyskon@noreply.gitea.com>
Co-committed-by: Denys Konovalov <denyskon@noreply.gitea.com>
2023-07-31 17:32:28 +00:00
John Olheiser
53e27a0e86 Clone once (#52)
Closes #30
Closes #31
Closes #42

Rather than partially cloning, instead we clone once and then `clean` (to remove generated files), `reset` (to reset changed files), and `checkout` branches as needed. This should allow the outdated translation check to continue to work while also reducing build times significantly.

Before:
![before](/attachments/07c16ef5-110c-451a-9f1b-79f2c8b72caf)

After:
![after](/attachments/d6251f63-087d-4270-946f-63148b8f642a)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/52
Co-authored-by: John Olheiser <john+gitea@jolheiser.com>
Co-committed-by: John Olheiser <john+gitea@jolheiser.com>
2023-07-28 05:52:35 +00:00
John Olheiser
30a23a1ee4 Use minorVer (#50)
Rather than `version` which is e.g. `1.20` or `1.19` use `minorVer` which is set above as e.g. `1.20.0` or `1.19.4`

78cc25c09d/loop_docs.sh (L30)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/50
2023-07-28 04:41:21 +00:00
jolheiser
c24614753e Update primary color(s) (#53)
Closes #35

One caveat, I used the docusaurus [styling and layout](https://docusaurus.io/docs/styling-layout/#styling-your-site-with-infima) color generator and fiddled until I could get a AA contrast ratio, so the colors aren't as exact as the one suggested in https://gitea.com/gitea/gitea-docusaurus/issues/35#issuecomment-742982 (But it still looks better than the blue-green we currently have imo)

![dark theme](/attachments/153c66eb-bdc6-4758-852c-f6a3beb45cdb)
![light theme](/attachments/c45495a8-e1ab-45a0-ab15-4bbdd887aea5)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/53
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-07-27 23:49:16 +00:00
jolheiser
f397d309d2 Docusaurus-ify main repo (#51)
https://github.com/go-gitea/gitea/pull/26051
https://github.com/go-gitea/gitea/pull/26052
https://github.com/go-gitea/gitea/pull/26053
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/51
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-07-27 14:55:46 +00:00
Giteabot
2685a95d6b Calculate MAX_WORKERS default value by CPU number (#26177) (#26183) 2023-07-27 19:24:07 +08:00
Giteabot
ac3724c305 Update email-setup.en-us.md (#26068) (#26166)
Backport #26068 by @felixvictor

The setting `MAILER_TYPE` is deprecated.
According to the config cheat sheet, it should be `PROTOCOL`.

Co-authored-by: Felix Victor <felix.victor.na@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-07-26 10:55:27 -05:00
Giteabot
b7dd3ee047 Remove "misc" scope check from public API endpoints (#26134) (#26149)
Backport #26134 by @wxiaoguang

Fix #26035

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-07-26 05:32:41 +00:00
John Olheiser
bd74711ecc Docusaurus-ify 1.19 (#26053)
See https://github.com/go-gitea/gitea/pull/26051

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-26 10:01:15 +08:00
John Olheiser
e1991ac654 Docusaurus-ify 1.20 (#26052)
See https://github.com/go-gitea/gitea/pull/26051

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: JonRB <4564448+eeyrjmr@users.noreply.github.com>
2023-07-26 10:00:14 +08:00
Giteabot
b7923b979f added ssh mirror workaround description (#26096) (#26136)
Backport #26096 by @thigg

related #1635 #18159

This will probably be obsolete at some point, but it should not break
anything and it may help some users

Co-authored-by: thigg <thigg@users.noreply.github.com>
2023-07-25 18:32:39 +02:00
jolheiser
78cc25c09d docs: add awesome and tea (#49)
As title, add awesome-gitea and tea to the footer

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/49
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-07-21 15:15:51 +00:00
HesterG
02b0ebc9e1 Add subscription and community components (#47)
Close #46

Same as those in [blog](https://gitea.com/gitea/blog/pulls/272), but for docs and api
Ejected DocPage (unsafe to eject) and ApiDoc (safe to eject) for layout changes

![Screen Shot 2023-07-17 at 15.32.29](/attachments/74f992c7-b60d-4d71-bb50-8c085e6783fe)![Screen Shot 2023-07-17 at 15.32.40](/attachments/0df35cba-0797-4f21-abbe-bb61736c1e1f)

Screenshots

![Screen Shot 2023-07-17 at 15.27.29](/attachments/39e09cee-5043-4349-aaaa-7ab585aefbc4)![Screen Shot 2023-07-17 at 15.27.36](/attachments/396a9ae1-bbae-42b5-b1ab-c4158a2be78d)![Screen Shot 2023-07-17 at 15.27.53](/attachments/e12a35eb-625c-4950-960e-61226eda4ad4)![Screen Shot 2023-07-17 at 15.28.11](/attachments/578bd742-8a8b-4324-82d4-b9dc47d7f511)![Screen Shot 2023-07-17 at 15.28.19](/attachments/f304bb80-c6cb-4af4-b16f-b19fa2099ba5)

Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/47
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-07-21 10:57:22 +00:00
jolheiser
c77d0e0e34 Update footer (#48)
Add more to community footer, change `More` to `Code` and add gitea.com, and remove `Docs` section that just linked back to home.

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/48
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-07-21 03:51:34 +00:00
Giteabot
3f7a6a74ed RPM Registry: Show zypper commands for SUSE based distros as well (#25981) (#26020)
Backport #25981 by @asdil12

After RPM is supported with https://github.com/go-gitea/gitea/pull/23380
let's show the user
how to add the repo and install the RPM via all common package managers.

Co-authored-by: Dominik Heidler <dominik@heidler.eu>
2023-07-20 21:15:47 -04:00
Giteabot
94947e2be5 Correctly refer to dev tags as nightly in the docker docs (#26004) (#26017)
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2023-07-20 10:50:33 -05:00
Giteabot
a9d45b3c01 Correctly refer to dev tags as nightly in the docker docs (#26004) (#26019)
Backport #26004 by @jolheiser

As title, `dev` tags are no longer used since we switched to `nightly`

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-07-20 21:03:40 +08:00
John Olheiser
92ff1589c2 Fix awesome-gitea link in 1.19 (#26006)
As title, we still pull the docs for `1.19`.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-07-20 14:30:11 +08:00
techknowlogick
f585f6554a update nav link 2023-07-19 13:57:52 -04:00
techknowlogick
0105968d98 add 1.19 back in 2023-07-19 13:40:14 -04:00
techknowlogick
cf21dd155f Revert "Update docusaurus.config.js"
This reverts commit f8eecadedb.
2023-07-19 13:38:40 -04:00
techknowlogick
f8eecadedb Update docusaurus.config.js
Update .gitea/workflows/build-and-publish.yaml

Delete versioned_sidebars/version-1.19-sidebars.json

Update loop_docs.sh

Update versions.json

Update docusaurus.config.js
2023-07-19 13:38:32 -04:00
Giteabot
2312952c2a Update path related documents (#25417) (#25982)
Backport #25417 by @wxiaoguang

Update WorkPath/WORK_PATH related documents, remove out-dated
information.

Remove "StaticRootPath" on the admin config display page, because few
end user really need it, it only causes misconfiguration.


![image](https://github.com/go-gitea/gitea/assets/2114189/8095afa4-da76-436b-9e89-2a92c229c01d)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-07-19 09:48:54 +00:00
HesterG
1f003f6298 translation for blog on navbar and remove target="_blank" for internal links (#44)
- Do not use `target="_blank"`for gitea websites on navbar (same behavior as about.gitea.com)

- Translate "blog" on navbar for zh-cn

Before:

![Screen Shot 2023-07-12 at 17.40.27](/attachments/8c2d2a0d-5b66-4396-a962-9dd5aec20aaa)

After:

![Screen Shot 2023-07-12 at 17.41.47](/attachments/65822b16-9ba9-4452-94b1-f8c145ffd78b)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/44
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-07-12 12:58:44 +00:00
HesterG
2141715f56 update header to make it the same as blog (#43)
Follows https://gitea.com/gitea/blog/pulls/266, should wait for the PR because it has href points to https://blog.gitea.com

PC:

![Screen Shot 2023-07-12 at 08.53.32](/attachments/8742094d-bdca-404a-bd1f-ef34df5af328)

Mobile:

![Screen Shot 2023-07-12 at 08.53.45](/attachments/947785d6-535b-4867-91c6-1a3c465b6fdc)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/43
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-07-12 03:55:43 +00:00
wxiaoguang
a120e3fc5a Make "install page" respect environment config (#25648) (#25799)
Backport #25648

Replace #25580

Fix #19453

The problem was: when users set "GITEA__XXX__YYY" , the "install page"
doesn't respect it.

So, to make the result consistent and avoid surprising end users, now
the "install page" also writes the environment variables to the config
file.

And, to make things clear, there are enough messages on the UI to tell
users what will happen.

There are some necessary/related changes to `environment-to-ini.go`:

* The "--clear" flag is removed and it was incorrectly written there.
The "clear" operation should be done if INSTALL_LOCK=true
* The "--prefix" flag is removed because it's never used, never
documented and it only causes inconsistent behavior.

The only conflict during backport is "ui divider" in
templates/install.tmpl
2023-07-10 11:51:05 +00:00
Giteabot
388e6dbe9f docs: rootless docker ssh's default port is 2222 (#25771) (#25772)
Backport #25771 by @leavesster

---

according `docker/rootless/usr/local/bin/docker-setup.sh` , in rootless
docker setup, ssh port is 2222.
and mysql database case should port same as PostgreSQL port

Co-authored-by: leavesster <11785335+leavesster@users.noreply.github.com>
2023-07-09 15:45:42 +08:00
HesterG
d6ee444476 Use custom api dropdown and fix compatibility for firefox (#39)
- Used custom api dropdown for changing label dynamically. Used method discussed in [this post](https://github.com/facebook/docusaurus/pull/7231). `ComponentTypes` is ejected safely.

  ![Screen Shot 2023-07-05 at 16.21.43](/attachments/b4bc8ae4-6a8a-406c-98b7-f739b13c32ba)

- Fixed dropdowns missing on chrome docs page

  ![Screen Shot 2023-07-05 at 16.44.08](/attachments/1e5315b4-a057-4325-990f-1cbc35fb475f)

-  Fixed `:has` selector compatibility problem on firefox. After (Screenshots from firefox):

  ![Screen Shot 2023-07-05 at 16.10.23](/attachments/76475fb6-fd58-42ec-b4be-6a774553a887)

  ![Screen Shot 2023-07-05 at 16.10.35](/attachments/956f623a-afdb-4ab4-8aa2-beb9420727fb)

  ![Screen Shot 2023-07-05 at 16.15.35](/attachments/af840f31-def4-4f72-8340-f29b72a748bd)

  ![Screen Shot 2023-07-05 at 16.09.30](/attachments/42fa2394-962d-4594-8ef3-c594d3c1e777)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/39
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-07-07 09:19:52 +00:00
6543
2086df848a Gitea v1.19.4 got released (#40)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/40
2023-07-05 17:35:59 +00:00
HesterG
04a97d20b1 Add api page (#32)
# Changes

- Added [redocusaurus](https://github.com/rohit-gohri/redocusaurus) package to display swagger api with reference to [woodpecker](https://github.com/woodpecker-ci/woodpecker/tree/master/docs)
- Change `sed` for swagger.json for proper version and baseurl.
- Add a dropdown for different api versions. (screenshot below)
- On API pages, only API version dropdown will show(hide locale dropdown, version dropdown for doc, and doc search)
- Allow build CSR API pages for development so it saves building time.

# Screenshots

![Screen Shot 2023-06-27 at 11.56.59](/attachments/7f43976d-f9f1-42ff-85f5-0bc84e549441)

![Screen Shot 2023-06-27 at 10.58.11](/attachments/bde25da5-b0a6-4908-9c69-c6aed41f8f59)

![Screen Shot 2023-06-21 at 12.26.26](/attachments/84a9bf5a-229b-4031-9654-3bae6cb3301a)

![Screen Shot 2023-06-19 at 16.34.33](/attachments/653b2b59-bc8a-4e6c-82f2-eb9710f55d8d)

Search:

![Screen Shot 2023-06-21 at 14.49.15](/attachments/3a09bd89-36a8-4156-a2df-2d3176d3ddb1)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/32
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-07-05 03:54:54 +00:00
Giteabot
38f11e8f48 Restrict [actions].DEFAULT_ACTIONS_URL to only github or self (#25581) (#25604)
Backport #25581 by @wolfogre

Resolve #24789

## ⚠️ BREAKING ⚠️

Before this, `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like
`https://gitea.com` or `http://your-git-server,https://gitea.com`, and
the default value was `https://gitea.com`.

But now, `DEFAULT_ACTIONS_URL` supports only
`github`(`https://github.com`) or `self`(the root url of current Gitea
instance), and the default value is `github`.

If it has configured with a URL, an error log will be displayed and it
will fallback to `github`.

Actually, what we really want to do is always make it
`https://github.com`, however, this may not be acceptable for some
instances of internal use, so there's extra support for `self`, but no
more, even `https://gitea.com`.

Please note that `uses: https://xxx/yyy/zzz` always works and it does
exactly what it is supposed to do.

Although it's breaking, I belive it should be backported to `v1.20` due
to some security issues.

Follow-up on the runner side:

- https://gitea.com/gitea/act_runner/pulls/262
- https://gitea.com/gitea/act/pulls/70

Co-authored-by: Jason Song <i@wolfogre.com>
2023-06-30 07:53:00 +00:00
techknowlogick
a6ca489269 Update loop_docs.sh 2023-06-29 18:55:46 +00:00
techknowlogick
4f318d3f85 Update loop_docs.sh 2023-06-29 18:47:46 +00:00
techknowlogick
0a38426175 update docker image tag 2023-06-29 18:37:17 +00:00
techknowlogick
1753d53291 Update loop_docs.sh 2023-06-29 18:34:10 +00:00
techknowlogick
bf0608d795 1.20.0-rc2 2023-06-29 18:33:03 +00:00
techknowlogick
e974138e39 1.20.0-rc2 2023-06-29 18:32:46 +00:00
techknowlogick
18fa94cb73 Add awesome list to docs (#37)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/37
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-committed-by: techknowlogick <techknowlogick@gitea.io>
2023-06-29 18:03:46 +00:00
Giteabot
5026aac7fc Add documentation about supported workflow trigger events (#25582) (#25589)
Backport #25582 by @Zettat123

Right now Gitea doesn't support all [Events that trigger
workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
This PR lists the supported events to help users write workflow files.

Co-authored-by: Zettat123 <zettat123@gmail.com>
2023-06-29 14:51:46 +02:00
lonix1
4b29c1bbfa Document creating an API key from the CLI (#25504)
Related to https://github.com/go-gitea/gitea/issues/25503

---------

Co-authored-by: delvh <dev.lh@web.de>
2023-06-25 21:33:34 -04:00
techknowlogick
eeeab51bbe Update loop_docs.sh 2023-06-23 22:22:30 +00:00
techknowlogick
7ce2b24df0 Update docusaurus.config.js 2023-06-23 22:21:38 +00:00
techknowlogick
f10d6b3658 Update docusaurus.config.js 2023-06-21 05:30:02 +00:00
Giteabot
da53d8ee78 Use the new download domain replace the old (#25405) (#25409)
Backport #25405 by @lunny

As title.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-06-21 03:59:51 +00:00
HesterG
c82e0fcc8d fix sed for MacOS (#36)
Close #4

Right now on MacOS, sed will produce backup files, because on Mac, If do something like below using bash script

```
$SED_INPLACE '1s/---/---\nisOutdated: true/' $file
```

It will become the following on executed, and a backup file will be produced:

```
sed -i ''\'''\''' '1s/---/---\nisOutdated: true/' ./docs/content/doc/help/faq.zh-cn.md
```

The way to fix this in this PR is to change the `SED_INPLACE` to a function. [Reference](aa19c2d125/generate-cpp.sh (L4)) (Tested on my
Mac and backup files with suffix '' will not be produced after changing to function)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/36
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-06-20 14:47:10 +00:00
Giteabot
6bbaae640f Add Exoscale to installation on cloud provider docs (#25342) (#25346)
Backport #25342 by @pmig

We created a Gitea application for the [Exoscale
Marketplace](https://www.exoscale.com/marketplace/listing/glasskube-gitea/)
for easier installation on the European cloud provider.

The installation is managed via the [Glasskube Kubernetes
Operator](https://github.com/glasskube/operator).

Signed-off-by: Philip Miglinci <pmig@glasskube.eu>
Co-authored-by: Philip Miglinci <p.miglinci@gmail.com>
2023-06-18 15:48:06 +00:00
Giteabot
90bdbfee99 Add link to support page for commercial support (#25293) (#25297)
Backport #25293 by @techknowlogick

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-06-16 14:26:32 +08:00
Giteabot
10c7906836 Add link to support page for commercial support (#25293) (#25299)
Backport #25293 by @techknowlogick

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-06-16 14:19:26 +08:00
Giteabot
a0f4523e69 Docs about how to generate config for act runner with docker and setup it with docker-compose (#25256) (#25296)
Backport #25256 by @thezzisu

In this pull request, the following changes are addressed:

- State user should create `config.yaml` before start container to avoid
errors.
- Provided instructions to deploy runners using docker compose.

Co-authored-by: Zisu Zhang <thezzisu@gmail.com>
2023-06-16 12:09:03 +08:00
HesterG
a5d22599e1 fix publish for v1.20 (#33)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/33
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-06-14 07:53:23 +00:00
HesterG
7ca358b43e Add v1.20 documentation (#28)
Modified `loop_docs.sh` to take `version` and `locale` and params so do not need other `loop_docs*` scripts.

Need confirmation with version information for 1.20 and latest.
Like version in `static/20-swagger.json` and `static/latest-swagger.json`, and version used to replace `{{< version >}}`

Will wait for a stable version for 1.20

![Screen Shot 2023-06-14 at 12.12.18](/attachments/1b316978-0daf-46bb-90a7-632a0fc80898)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/28
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-06-14 07:05:13 +00:00
Giteabot
04898814a1 Fix all possible setting error related storages and added some tests (#23911) (#25244)
Backport #23911 by @lunny

Follow up #22405

Fix #20703 

This PR rewrites storage configuration read sequences with some breaks
and tests. It becomes more strict than before and also fixed some
inherit problems.

- Move storage's MinioConfig struct into setting, so after the
configuration loading, the values will be stored into the struct but not
still on some section.
- All storages configurations should be stored on one section,
configuration items cannot be overrided by multiple sections. The
prioioty of configuration is `[attachment]` > `[storage.attachments]` |
`[storage.customized]` > `[storage]` > `default`
- For extra override configuration items, currently are `SERVE_DIRECT`,
`MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another
section. The prioioty of the override configuration is `[attachment]` >
`[storage.attachments]` > `default`.
- Add more tests for storages configurations.
- Update the storage documentations.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-06-14 08:36:52 +02:00
Giteabot
ca66a6c7b9 Improve some documents: release version, logging, NFS lock (#25202) (#25204)
Backport #25202 by @wxiaoguang

Close #23654

Close #24684


@techknowlogick I still think we need to rename
https://dl.gitea.com/gitea/1.20/ to
https://dl.gitea.com/gitea/1.20-nightly/

`/gitea/1.20/` is quite confusing, it needs these words to explain why.
If we call it `1.20-nightly`, the FAQ can be simplified a lot.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-06-12 23:17:43 +08:00
HesterG
9bc53d050e Use mdxa to point to versioned links (#27)
Close #17

mdxa is another component that is safe to eject

![Screen Shot 2023-06-08 at 09.56.29](/attachments/b5af1044-9e3f-4776-91a1-ed6f69e2e3a7)

And right now some links are using `master` as the branch(link will be redirect to `main`), so checked for that as well.

Update:

Change `master` to `main` in upstream, so also removed check for `master`

https://github.com/go-gitea/gitea/pull/25126

# After

For example:

![Screen Shot 2023-06-08 at 09.52.05](/attachments/5033b2ca-b51d-47da-ba20-a420e7613626)

![Screen Shot 2023-06-08 at 09.52.33](/attachments/6e7c75f5-01ab-40b4-a57c-df8edb81f677)

![Screen Shot 2023-06-08 at 09.52.47](/attachments/185eb828-6346-48a9-96cc-2beb6353410c)

![Screen Shot 2023-06-08 at 09.53.50](/attachments/f6c57dc1-d452-47f0-b4fc-f3766008ab57)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/27
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hesterg@noreply.gitea.com>
Co-committed-by: HesterG <hesterg@noreply.gitea.com>
2023-06-09 06:57:18 +00:00
silverwind
9cff3696e2 Add .editorconfig and .gitattributes (#29)
Every repo needs these files 😉

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/29
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2023-06-08 18:07:59 +00:00
HesterG
f2a94ba955 Change branch name from master to main in some documents' links (#25126) (#25140)
Backport #25126 to 1.20

As title. And needs to backport to 1.19
2023-06-08 09:40:05 +00:00
HesterG
d7361ef460 Fix broken links in documents v1.19 (#25142)
Partially port #24630
2023-06-08 16:45:29 +08:00
HesterG
37748c6364 Change branch name from master to main in some documents' links (#25126) (#25139)
Backport #25126

As title. And needs to backport to 1.19
2023-06-08 04:31:55 -04:00
HesterG
1ba3ac7c99 Add outdated component to outdated documents (#25)
- `git log` needs all commit history to compare latest commit of files, so changed `git clone --depth=1` to `git clone`. This will make the step take longer, so might be improved if there is a better way.

- `src/theme/MDXContent/index.js` is from [ejecting of the component](https://docusaurus.io/docs/swizzling#ejecting) inside `@docusaurus/theme-classic` plugin, and this one is safe to eject according to docusaurus

    ![Screen Shot 2023-06-06 at 12.12.28](/attachments/17a3a84b-cec0-4849-8bd6-9e0471d9536f)

    ![Screen Shot 2023-06-06 at 12.12.15](/attachments/58bba321-3cfb-4a8b-8aeb-84422a06c472)

- [Outdated component style reference](https://mui.com/material-ui/react-alert/)

- Added [`Translate` component](https://docusaurus.io/docs/next/docusaurus-core#translate) to `Outdated` so it can be localized. [reference](https://docusaurus.io/docs/next/i18n/tutorial#translate-your-react-code)

- One way to check for the specific outdated documents:

    search for `lastest commit timestamp` in [prepare nightly docs and prepare 1.19 docs steps](https://gitea.com/gitea/gitea-docusaurus/actions/runs/74)

# After

The Chinese documents that are outdated (latest commit is ealier than laster commit of English version):

![Screen Shot 2023-06-06 at 13.04.24](/attachments/e5d16267-d8d8-434e-89b1-138d04ec92a3)

![Screen Shot 2023-06-06 at 13.05.07](/attachments/af8f996a-5318-4f89-841f-b27a4903a27d)

![Screen Shot 2023-06-06 at 13.05.14](/attachments/e6aba31b-46ba-4a32-ad81-81007e0f711e)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/25
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-06-08 03:34:23 +00:00
jolheiser
d3323cee1c fix: sed incantation for dl.gitea.com main-nightly (#26)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/26
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-06-06 20:31:45 +00:00
sillyguodong
849dc1b5f8 add zh-cn for Upgrade from old Gitea in v1.19 (#25022)
as title

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-06-06 11:39:53 -04:00
techknowlogick
0aef2dcb7d update labels link to correct location in 1.19 docs (#25105) 2023-06-06 11:29:16 -04:00
Giteabot
9d5cf12f82 improve permission documentation (#23942) (#25078) 2023-06-05 18:04:59 +08:00
HesterG
f620ccfe37 Add oauth Chinese document for v1.19 (#25020) 2023-06-02 10:52:53 -04:00
HesterG
a732bed8ba Port Chinese document for localization to v1.19 (#25021) 2023-06-02 10:49:33 -04:00
silverwind
7b1a6ed3cb Run markdownlint on drone, fix lint issue (#25040)
It currently does not run on 1.19 branch, resulting in lint error having
landed in https://github.com/go-gitea/gitea/pull/25016.
2023-06-01 10:34:40 -05:00
sillyguodong
79ef670d16 Add chinese documentations for Packages (#24914) (#25016)
backport: #24914
2023-05-31 15:55:01 +08:00
sillyguodong
907dfa511f Add chinese documentations for installation (#24904) (#25015)
backport #24904
2023-05-31 14:17:19 +08:00
HesterG
81648926de Add Chinese docs for help, contribution and development (#24925) (#25011)
Backport #24925, partially backport #24934
(`docs/content/doc/help/faq.zh-cn.md` file)

Part of backport has already done by #24942

Also backport #24881 to avoid "deadlock"

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
2023-05-31 14:12:37 +08:00
HesterG
817dac0942 Sed for versions information (#24)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/24
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-31 05:05:50 +00:00
jolheiser
54ed2879c1 Fix sed incantation for empty (#23)
Follow up for #22

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/23
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-05-30 19:10:17 +00:00
jolheiser
d3c11f4363 fix: update sed incantation for empty (#22)
Should resolve #21

I cannot seem to get this to run properly on my machine, however this is an educated guess because the Chinese translation looks correct.

zh-cn
https://docs.gitea.com/zh-cn/administration/config-cheat-sheet#repository---release-repositoryrelease
8c38ae516a/loop_docs-zh-cn.sh (L11)

en-us
https://docs.gitea.com/administration/config-cheat-sheet#repository---release-repositoryrelease
(check diff for current incantation)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/22
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-05-30 17:51:06 +00:00
HesterG
f99f92385e Unify doc links to use paths relative to doc folder (#24979) (#25000)
Backport #24979 

Changes:

1. Use uniform links types relative to doc folder (start with `doc/`)
2. According to [docusaurus
links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is
used, the `href` is resolved as URL location, but not file location. So
need to use `[text]({{< relref "path" >}})` instead.
2023-05-30 18:08:32 +08:00
HesterG
8c38ae516a Fix edit url and announcement bar color on dark mode (#20)
Changes:

1. Dark mdoe colors for announcement bar, used the way in [CSS module class names in the document](https://docusaurus.io/docs/styling-layout#global-styles) to change the style.

2. Fix edit url. Right now, clicking on "edit url" will redirect to lastest version of documents no matter from v1.19 or current version.

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/20
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-30 09:42:46 +00:00
HesterG
642bd3ea29 Remove unnecessary content on docs (#24976) (#25001)
Backport #24976
2023-05-30 17:21:03 +08:00
Giteabot
fcb1d63349 Update from-binary.en-us.md (#24975) (#24999)
Backport #24975 by @team-epk

Fixed link to the creating a systemd service in Ubuntu document.
2023-05-30 14:01:06 +08:00
HesterG
5c13cb18d2 Fix relrefs by following formats allowed by docusaurus (#18)
relrefs from upstream is in the format of `[text]({{< relref "doc/<path under doc>.md" >}})`, for example, `[instructions]({{< relref "doc/installation/from-source.en-us.md" >}})`. In this PR, use bash scripts to remove `{{< relref "doc/`,  `.en-us`/`.zh-cn` and `" >}}` parts so the link can be used by [docusaurus](https://docusaurus.io/docs/markdown-features/links)

Related: https://github.com/go-gitea/gitea/pull/24979, might need to backport this PR into 1.19
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/18
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-29 16:24:40 +00:00
HesterG
c123ee5449 Use capitals for actions and packages (#19)
![Screen Shot 2023-05-29 at 18.18.31](/attachments/1255a8a5-f46f-4e2e-8a43-398a292fff2a)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/19
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-29 10:28:05 +00:00
Giteabot
bfe15353dd zh-cn translation for usage docs (#24897) (#24977)
Backport #24897 by @Zettat123

- [x] agit-support
- [x] clone-filter
- [x] incoming-email
- [x] labels
- [x] linked-references
- [x] merge-message-templates
- [x] permissions
- [x] profile-readme
- [x] protected-tags
- [x] push
- [x] repo-mirror
- [x] secrets
- [x] template-repositories
- [x] webhooks

Co-authored-by: Zettat123 <zettat123@gmail.com>
2023-05-29 11:53:11 +08:00
Giteabot
c1eb5de177 simple docs fixes: 'pull request' page (en-us & zh-tw) link path to 'issue-pull-request-templates' (#24961) (#24970)
Backport #24961 by @jonkeim

Co-authored-by: Jon Keim <jon@windless.org>
Co-authored-by: silverwind <me@silverwind.io>
2023-05-28 21:51:53 -04:00
Giteabot
b0e85b0caf Remove reference to caddy v1 in docs (#24962) (#24964)
Backport #24962 by @techknowlogick

caddy v1 is loong eol. v2 should be used.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-05-28 05:34:50 -04:00
HesterG
c911962cd6 fix typo and some seds for <empty> (#15)
# Before:

![Screen Shot 2023-05-26 at 15.48.12](/attachments/09d9a965-1587-40c9-b81b-e8416ac0c226)![Screen Shot 2023-05-26 at 15.48.17](/attachments/8beda8a1-5c49-4c87-95e7-e4aa95e56ec9)![Screen Shot 2023-05-26 at 15.48.57](/attachments/21dad81e-eed1-4280-bbb4-eeda039bec41)![Screen Shot 2023-05-26 at 16.14.44](/attachments/07a3148a-52ea-43bb-8e07-c0d8f31d1c24)

# After:

![Screen Shot 2023-05-26 at 16.02.38](/attachments/24239f32-6e9a-487c-8532-b6bd22ca6a50)(/attachments/85c184f3-58ca-4616-bb9d-9afacbc59290)![Screen Shot 2023-05-26 at 16.03.02](/attachments/4952880a-3254-4139-8943-ff37a9797bd7)![Screen Shot 2023-05-26 at 16.05.03](/attachments/ef77be92-2c60-4962-8b0a-efeed63a663b)![Screen Shot 2023-05-26 at 16.15.22](/attachments/22ea1d0b-2838-488d-92c7-e2db8e53ebae)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/15
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-26 17:49:55 +08:00
HesterG
2eafb7c224 Fix doc for 1.19 backend guideline (#24942)
Port the file change in
https://github.com/go-gitea/gitea/pull/24925/files from `main` to
`v1.19` to fix docs
2023-05-26 17:22:38 +08:00
HesterG
20c970682b Add Chinese support (#13)
# Main changes and Some notices

- Chines Docs should be put into corresponding versions' folders under `i18n/zh-cn/docusaurus-plugin-content-docs`. See [translate-markdown-files](https://docusaurus.io/docs/i18n/tutorial#translate-markdown-files) for reference. And also [srs-docs](https://github.com/ossrs/srs-docs) is a project that can be used as a reference. So changed the related paths in `loop_docs*` scripts.

- The markdown files under `docs/<version>` and `i18n/zh-cn/docusaurus-plugin-content-docs/<version>` must have the same name to be referred as translated. Files inside docs are corresponding to `current` version.
For example, `docs/administration/mail-templates.md` and `i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/mail-templates.md`.  Filename of `mail-templates.md` must be the same (cannot be `mail-templates.zh-cn.md` and `mail-templates.us-en.md`)
So trim the `.en-us.md` and `.zh-cn.md` to `.md` to ensure the same names inside `loop_docs*` scripts.

- Used `npx docusaurus write-translations --locale zh-cn` to do sidebar, footer, and header translations, so no need to keep `sideBarCN` anymore. [reference](https://docusaurus.io/docs/cli#docusaurus-write-translations-sitedir)

- Local Tests for `en` and `zh-cn` are separeted, run the following on local respectly to test them

    ```bash
    # test en version
    npm run start
    # test zh-cn version
    npm run start -- --locale zh-cn
    ```

- If wants to test `en` and `zh-cn` both at the same time, run build and serve

    ```
    npm run build
    npm run serve
    ```

- Added some indexed page, for example:

![Screen Shot 2023-05-26 at 13.49.34](/attachments/9eeb3d38-c309-457d-9015-053b9c5ca8d6)

![Screen Shot 2023-05-26 at 13.49.49](/attachments/fc348d17-ce4c-4c4d-9240-b69add4ef06e)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/13
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-26 14:30:13 +08:00
Giteabot
67852ef2a3 Merge two translation contributing documents (#23939) (#24933)
Backport #23939 by @lunny

This PR also adjusts the weights.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2023-05-25 12:07:25 -04:00
techknowlogick
511a7f80ff main-nightly is version name for nightly version 2023-05-25 03:20:08 +08:00
HesterG
8f01d3dfa7 change close to darkmode (#12)
![Screen Shot 2023-05-24 at 17.55.21](/attachments/b4507344-0b8a-4bcd-b3c9-8328de8fb5e4)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/12
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-24 17:57:42 +08:00
HesterG
4e730e235a customize announcement for darkmode (#11)
Close #10

![Screen Shot 2023-05-24 at 17.49.26](/attachments/8e64380d-eb40-4606-9c13-2d930369d4c9)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/11
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-24 17:51:24 +08:00
techknowlogick
0b0b298047 Update docusaurus.config.js 2023-05-24 08:44:39 +08:00
delvh
f400873815 Improve WIP hint (#9)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/9
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Co-authored-by: delvh <leon@kske.dev>
Co-committed-by: delvh <leon@kske.dev>
2023-05-24 04:38:02 +08:00
Lunny Xiao
8e403bec0d Remove unnecessary prefix usage (#24888)
Since now all articles have a class, the `Usage:` is unnecessary. This
PR will remove them.
2023-05-24 00:34:31 +08:00
HesterG
b27f00bd97 Sort usage directory by type first (#8)
1. Change name of "usage/actions", "usage/packages" to "usage/Actions" and "usage/Packages".
2. Sort usage directory by type first, so type "category" goes before "docs"

Reference from [customize-the-sidebar-items-generator](https://docusaurus.io/docs/sidebar/autogenerated#customize-the-sidebar-items-generator) and [document](https://docusaurus.io/docs/cli#docusaurus-write-translations-sitedir)

![Screen Shot 2023-05-22 at 16.22.33](/attachments/5bbc88c9-9eca-4697-84b4-b8b3c2804eb0)

Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/8
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-05-22 16:31:34 +08:00
techknowlogick
ddebf0c3b6 Merge pull request 'fix duplicate packages and actions' (#6) from HesterG/gitea-docusaurus:fix-duplicate-dirs into main
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/6
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-05-21 13:55:27 +08:00
techknowlogick
f9f7f09061 Merge pull request 'Add back titles to usage' (#7) from HesterG/gitea-docusaurus:add-title-usage into main
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/7
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io>
2023-05-19 14:19:59 +08:00
nickname
45c9538894 add back titles to usage 2023-05-19 09:52:59 +08:00
nickname
fd424b0f6c fix duplicate packages and actions 2023-05-18 14:37:43 +08:00
techknowlogick
bd8a01667f rm zh-cn, add back when ready 2023-05-16 09:46:42 +08:00
techknowlogick
e45d486281 Update sidebars.js 2023-05-16 09:45:02 +08:00
techknowlogick
83ad0d27dc temp disable zh-cn in Actions 2023-05-16 09:43:08 +08:00
techknowlogick
07221f40eb update path 2023-05-16 03:22:14 +08:00
Giteabot
9e4eee76ad Fix docs documenting invalid @every for OLDER_THAN cron settings (#24695) (#24698)
Backport #24695 by @yardenshoham

Looks like a copy-paste leftover

- Fixes #20868

Co-authored-by: Yarden Shoham <git@yardenshoham.com>
2023-05-13 23:47:56 +08:00
techknowlogick
fd1ea75872 update path 2023-05-12 15:53:33 -04:00
techknowlogick
c75d40862a update dir name 2023-05-12 15:50:27 -04:00
Lunny Xiao
5823cf05e8 remove unnecessary comma 2023-05-09 09:49:53 +08:00
Lunny Xiao
dbd1986910 upgrade to 1.19.3 2023-05-08 22:32:15 +08:00
techknowlogick
5c2862c69c Update Makefile 2023-04-30 11:02:15 +08:00
techknowlogick
46c9fae942 Update Makefile 2023-04-30 11:00:55 +08:00
techknowlogick
25c59c13e6 Update loop_docs.sh 2023-04-30 10:59:00 +08:00
techknowlogick
d937b296e8 1.19.2 2023-04-30 10:30:42 +08:00
techknowlogick
77d0cf104f 1.19.2 2023-04-30 10:30:20 +08:00
techknowlogick
ce9d97afed 1.19.2 2023-04-30 10:29:58 +08:00
Giteabot
77f6ee63ef Don't set meta theme-color by default (#24340) (#24346)
Backport #24340 by @silverwind

Fixes https://github.com/go-gitea/gitea/issues/24321. By not setting
this meta tag, Safari will use body color for chrome and out-of-viewport
areas, which looks much better then static mismatching green.

As per
[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color)
it's really only Apple browsers who still support this tag, most others
have dropped support.
 
Before:
<img width="347" alt="Screenshot 2023-04-25 at 19 59 13"
src="https://user-images.githubusercontent.com/115237/234363180-0fe667ef-5469-4f5f-b31a-c9d73aff10ac.png">

After:
<img width="361" alt="Screenshot 2023-04-25 at 20 00 00"
src="https://user-images.githubusercontent.com/115237/234363185-e2d2b62f-0133-4316-944d-b614ffb84eb0.png">

Co-authored-by: silverwind <me@silverwind.io>
2023-04-26 01:33:15 -04:00
Giteabot
3b5d7f8d06 Update documentation to explain which projects allow Gitea to host static pages (#23993) (#24058)
Backport #23993 by @6543

close  #23521

Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-04-11 18:43:35 +02:00
Lunny Xiao
5a393dfbac Merge push to create, open PR from push, and push options docs articles into one (#23744) (#23959)
backport #23744
2023-04-07 15:49:26 +08:00
Lunny Xiao
3fa5646e79 Fix actions 2023-04-06 09:03:54 +08:00
Lunny Xiao
f820b07079 Fix actions 2023-04-06 09:03:46 +08:00
Giteabot
364adca848 docs: make the required backticks in email password more explicit (#23923) (#23926)
Backport #23923 by @teauxfu

updated the example config to make the needed backticks around the
password more obvious

Co-authored-by: alex <alexmw777@gmail.com>
2023-04-04 15:06:54 -04:00
Giteabot
dd7dafa72e docs: fix typo (#23924) (#23925)
Backport #23924 by @teauxfu

fixes a minor typo in the email templates page

Co-authored-by: alex <alexmw777@gmail.com>
2023-04-04 18:13:09 +02:00
Lunny Xiao
a8a999a709 Update docs markdown file weight to make it clear (#23909) (#23921)
backport #23909
2023-04-04 11:27:38 -04:00
Lunny Xiao
6e5e809614 Update README 2023-04-04 22:46:41 +08:00
Lunny Xiao
da0e55515b Fix multiple languages sidebar 2023-04-04 12:14:20 +08:00
Lunny Xiao
1bfd1268e7 Improve multiple languages support 2023-04-04 11:14:25 +08:00
Giteabot
dc192247ad Rename actions unit to repo.actions and add docs for it (#23733) (#23881)
Backport #23733 by @wolfogre

I neglected that the `NameKey` of `Unit` is not only for translation,
but also configuration. So it should be `repo.actions` to maintain
consistency.

## ⚠️ BREAKING ⚠️

If users already use `actions.actions` in `DISABLED_REPO_UNITS` or
`DEFAULT_REPO_UNITS`, it will be treated as an invalid unit key.

Co-authored-by: Jason Song <i@wolfogre.com>
2023-04-03 12:54:36 +02:00
wxiaoguang
7e8c5930ef Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (#23766) (#23791)
Follow #21962

After I eat my own dogfood, I would say that
ONLY_SHOW_RELEVANT_REPOS=false is necessary for many private/enterprise
instances, because many private repositories do not have
"description/topic", users just want to search by their names.

This PR also adds `PageIsExploreRepositories` check, to make code more
strict, because the `search` template is shared for different purpose.

And during the test, I found a bug that the "Search" button didn't
respect the "relevant" parameter, so this PR fixes the bug by the way
together.
2023-03-30 09:09:22 -05:00
wxiaoguang
92f0f923ee Make minio package support legacy MD5 checksum (#23768) (#23770)
Backport #23768 (no source code conflict, only some unrelated
docs/test-ini conflicts)

Some storages like:

 * https://developers.cloudflare.com/r2/api/s3/api/
 * https://www.backblaze.com/b2/docs/s3_compatible_api.html

They do not support "x-amz-checksum-algorithm" header

But minio recently uses that header with CRC32C by default. So we have
to tell minio to use legacy MD5 checksum.
2023-03-29 00:02:13 +08:00
Lunny Xiao
588e50bc79 Add makefile 2023-03-26 21:26:12 +08:00
Giteabot
f75ed6b167 Describe Gitea's purpose more accurately (#23698) (#23710) 2023-03-26 17:33:32 +08:00
techknowlogick
68d86d58d3 full path to setup-node 2023-03-26 01:41:49 -04:00
techknowlogick
b82b689799 no need for verbose rsync 2023-03-26 01:26:52 -04:00
techknowlogick
cb5e8a8761 cross platform sed 2023-03-26 01:22:34 -04:00
techknowlogick
b48ab0a829 revert: that didn't work 2023-03-26 00:57:39 -04:00
techknowlogick
d917889b2e remove extra / 2023-03-26 00:52:25 -04:00
techknowlogick
f058a3c00a test without hardcoded slugs 2023-03-26 00:26:13 -04:00
Lunny Xiao
e9efa41ba0 try to fix siderbar position 2023-03-25 22:04:50 +08:00
techknowlogick
a5264ee41f Update 'docusaurus.config.js' 2023-03-25 14:04:12 +08:00
techknowlogick
c44f0ad2fd Merge branch 'main' of gitea.com:gitea/gitea-docusaurus 2023-03-25 01:54:36 -04:00
techknowlogick
bbd1d00c71 rm 1.18 steps 2023-03-25 01:54:21 -04:00
Lunny Xiao
49f7ac6f0b Move packages as a sub level of Usage 2023-03-25 13:53:49 +08:00
Lunny Xiao
3df69c5b21 Test multiple levels siderbar 2023-03-25 13:46:36 +08:00
Lunny Xiao
1116d1e72d Update structures for 1.19 and current version 2023-03-24 13:10:55 +08:00
Giteabot
0e6875c888 Fix codeblocks in the cheat sheet (#23664) (#23669)
Backport #23664 by @SuperSandro2000

Conflicts fixed by Andrew Thornton <art27@cantab.net>

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2023-03-23 16:50:56 -04:00
Lunny Xiao
a6ff89b930 Rename develop -> development, contribute -> contributing, administer -> administration (#23662)
backport #23629 

To make versioned documentation less surprising, 1.19 should have the
same technology.
2023-03-23 15:44:09 -05:00
Lunny Xiao
f14bfdc5da 1.19.0 2023-03-22 16:44:38 +08:00
Giteabot
b94e932ec9 Add .patch to attachment.ALLOWED_TYPES (#23580) (#23582)
Backport #23580 by @silverwind

Updated this default to GitHub's latest, adding the `.patch` file
extension to allowed types.

Co-authored-by: silverwind <me@silverwind.io>
2023-03-19 16:48:44 -04:00
silverwind
a3cbf6aae9 Replace Less with CSS (#23508)
Backport https://github.com/go-gitea/gitea/pull/23481,
https://github.com/go-gitea/gitea/pull/23504 and
https://github.com/go-gitea/gitea/pull/23520 to 1.19, just so we have an
easier time with future backports.

Seems to work on a basic level. There was a merge conflict in
`RepoActionView.vue`, otherwise it merged cleanly.

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-03-16 21:04:39 -04:00
Giteabot
47e1119416 Scoped label display and documentation tweaks (#23430) (#23433)
Backport #23430 by @brechtvl

* Fix scoped label left and right part breaking across lines.
* Remove slanted divider in scoped label display, make it straight.
After using this for a while, this feels more visually noisy than
helpful.
* Reduce contrast between scope and item to reduce probability of
unreadable text on background.
* Change documentation to remove mention of non-exclusive scoped labels.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2023-03-15 07:58:38 +08:00
Giteabot
f9339a190f Support reflogs (#22451) (#23438)
Backport #22451 by @philip-peterson

This PR adds support for reflogs on all repositories. It does this by
adding a global configuration entry.

Implements #14865

Signed-off-by: Philip Peterson <philip.c.peterson@gmail.com>
Co-authored-by: Philip Peterson <philip-peterson@users.noreply.github.com>
2023-03-13 12:20:10 +00:00
Giteabot
923ed995cd Update documentation for the new YAML label file format (#23020) (#23341)
Backport #23020

update documentation to include an overview of the yaml label template
that is part of PR #22976

Signed-off-by: Jon Roadley-Battin <jon.roadleybattin@gmail.com>

Co-authored-by: JonRB <4564448+eeyrjmr@users.noreply.github.com>
Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2023-03-06 17:52:29 -06:00
Giteabot
7ce7128fb3 Update hacking-on-gitea-zh_cn documentation (#23315) (#23323)
Backport #23315

This PR fix outdated hacking-on-gitea-zh_cn documentation.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
2023-03-06 18:44:02 +08:00
Giteabot
bcb3c229f8 Add basic documentation for labels, including scoped labels (#23304) (#23309)
Backport #23304

Part of #22974

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: delvh <dev.lh@web.de>
2023-03-05 20:38:46 +08:00
Giteabot
e539b056b5 Re-add accidentally removed hacking-on-gitea.zh-cn.md (#23297) (#23305) 2023-03-04 20:09:58 -05:00
techknowlogick
a82491c5d7 bump docusaurus 2023-03-04 00:51:12 -05:00
techknowlogick
51b5273e2d update name of job 2023-03-04 00:16:56 -05:00
techknowlogick
6d3247ba3e link to gitea.com for reporting errors 2023-03-04 00:03:06 -05:00
techknowlogick
cac06e0b88 hide banner for 1.18 2023-03-03 23:57:44 -05:00
techknowlogick
078b093d51 lowercase rc 2023-03-03 23:43:02 -05:00
techknowlogick
e893412736 dont edit toc 2023-03-03 23:41:22 -05:00
techknowlogick
5fc53e1a35 use the upstream action for aws 2023-03-03 23:37:50 -05:00
techknowlogick
a9b4c58a94 mark 1.19 as rc 2023-03-04 12:34:51 +08:00
techknowlogick
c0db76815d Update 'docusaurus.config.js' 2023-03-04 12:32:28 +08:00
techknowlogick
31f11f2aaf clean docs 2023-03-03 23:25:40 -05:00
techknowlogick
162301a5bd Update '.gitea/workflows/build-and-publish.yaml' 2023-03-04 12:17:36 +08:00
techknowlogick
6ffa67edac Update 'README.md' 2023-03-04 12:16:40 +08:00
Yarden Shoham
8e9f3e54c3 Add InsecureSkipVerify to Minio Client for Storage (#23166) (#23177)
Backport #23166

Allows using Minio with untrusted certificates

Closes #23128

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-02-28 00:29:17 +02:00
Yarden Shoham
6edc050d23 Fix secrets overview page missing from docs sidebar (#23143) (#23145)
Backport #23143

There was a warning while building the docs: `Building sites … WARN
2023/02/25 08:56:37
"/workspace/gitea/docs/content/doc/secrets/overview.en-us.md:1:1":
duplicate menu entry with identifier "overview" in menu "sidebar"`.

### Before

![image](https://user-images.githubusercontent.com/20454870/221348741-55cef254-f2ac-4507-9a66-818b406c668f.png)

### After

![image](https://user-images.githubusercontent.com/20454870/221348757-42066303-e1b7-43fe-9c4f-e05182fbabdd.png)

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
2023-02-25 13:30:32 +02:00
techknowlogick
b72d563f86 Update 'loop_docs.sh' 2023-02-23 16:45:52 +08:00
techknowlogick
ee700f7d62 Update 'loop_docs-19.sh' 2023-02-23 16:45:30 +08:00
Yarden Shoham
a4c41ff6a2 Nest metadata in refactoring docs (#23087) (#23091)
Backport #23087

Whitespace was missing from refactoring docs metadata.

backport label applied so it is included in versioned docs.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-02-23 03:39:30 -05:00
techknowlogick
b02291199c Delete '.drone.yml' 2023-02-23 16:38:56 +08:00
techknowlogick
f0778e1a5f almost caught all missing 18s 2023-02-23 00:53:13 -05:00
techknowlogick
12185d6bd1 use correct version 2023-02-23 00:51:33 -05:00
techknowlogick
8ef5860e78 Merge branch 'main' of gitea.com:gitea/gitea-docusaurus 2023-02-23 00:49:35 -05:00
techknowlogick
130857ef1e add 1.19 docs 2023-02-23 00:47:02 -05:00
techknowlogick
886d941873 Update 'loop_docs.sh' 2023-02-23 13:24:02 +08:00
techknowlogick
4263d7de17 Update 'loop_docs.sh' 2023-02-22 02:29:02 +08:00
techknowlogick
ea1c892e72 update latest version 2023-02-22 02:28:46 +08:00
techknowlogick
d92b99e395 first commit 2023-02-02 23:30:20 -05:00
1958 changed files with 407118 additions and 6045 deletions

13
.editorconfig Normal file
View File

@@ -0,0 +1,13 @@
root = true
[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[Makefile]
indent_style = tab

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto eol=lf

View File

@@ -0,0 +1,43 @@
name: Build and Publish Docs site
run-name: docusaurus build docs site
on:
push:
branches:
- main
jobs:
build-docs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: install necessary tools
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- name: prepare awesome list
run: |
make prepare-awesome-latest prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22
- name: Install dependencies
run: pnpm install --frozen-lockfile
#- uses: tats-u/docuactions-cache@v1
- name: build site
run: |
make build
- name: aws credential configure
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws-region: ${{ secrets.AWS_REGION}}
- name: Copy files to the production website with the AWS CLI
run: |
aws s3 sync build/ s3://docs-gitea-com
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION}} --paths '/*'

View File

@@ -0,0 +1,25 @@
name: checks
on:
- pull_request
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: prepare awesome list
run: |
make prepare-awesome-latest prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22
- name: Install dependencies
run: pnpm install --frozen-lockfile
#- uses: tats-u/docuactions-cache@v1
- name: build site
run: |
make build

View File

@@ -0,0 +1,28 @@
name: update swagger files
on:
schedule:
- cron: '0 */12 * * *' # every 12 hours on the hour
workflow_dispatch:
jobs:
update-swagger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: |
set -euo pipefail
make update-api-docs
git config --global user.name "Gitea Bot"
git config --global user.email "teabot@gitea.io"
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_TOKEN }}@gitea.com/gitea/docs.git
if git status --porcelain | grep -q .; then
git add --all
git commit -m "[skip ci] Updated swagger files"
git push
else
echo "No API doc changes detected; skipping commit"
fi

24
.gitignore vendored Normal file
View File

@@ -0,0 +1,24 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.tmp/
awesome/
awesome.md

5
.npmrc Normal file
View File

@@ -0,0 +1,5 @@
audit=false
fund=false
update-notifier=false
package-lock=true
lockfile-version=3

202
LICENSE Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

58
Makefile Normal file
View File

@@ -0,0 +1,58 @@
export NODE_OPTIONS := "--max-old-space-size=8192"
GITEA_AWESOME_REMOTE := https://gitea.com/gitea/awesome-gitea.git
GITEA_AWESOME_BRANCH := main
.PHONY: all
all: build
.PHONY: create_dir
create_dir:
mkdir -p .tmp
.PHONY: clone_awesome
clone_awesome: create_dir
git clone --branch=$(GITEA_AWESOME_BRANCH) $(GITEA_AWESOME_REMOTE) .tmp/upstream-awesome || true
.PHONY: prepare-awesome-latest
prepare-awesome-latest: clone_awesome
cp .tmp/upstream-awesome/README.md docs/awesome.md
.PHONY: prepare-awesome\#%
prepare-awesome\#%:
cp .tmp/upstream-awesome/README.md versioned_docs/version-1.$*/awesome.md
.PHONY: install
install:
pnpm install
.PHONY: prepare-docs
prepare-docs: install prepare-awesome-latest prepare-awesome\#19 prepare-awesome\#20 prepare-awesome\#21 prepare-awesome\#22 prepare-awesome\#23 prepare-awesome\#24
.PHONY: build
build:
pnpm run build
.PHONY: serve
serve: prepare-docs
pnpm run start
.PHONY: serve-zh
serve-zh: prepare-docs
pnpm run start -- --locale zh-cn
.PHONY: clean
clean:
rm -rf .tmp
rm -rf static/_*
rm -rf static/swagger-latest.json
rm -rf static/swagger-19.json
rm -rf static/swagger-20.json
rm -rf static/swagger-21.json
rm -rf static/swagger-22.json
rm -rf static/swagger-23.json
rm -rf static/swagger-24.json
.PHONY: update-api-docs
update-api-docs:
./update_api_docs.sh

23
README.md Normal file
View File

@@ -0,0 +1,23 @@
# Gitea Docs ![badge](https://gitea.com/gitea/docs/actions/workflows/build-and-publish.yaml/badge.svg)
## How to build
```shell
make clean
make prepare-docs
make build
```
## Development
```shell
make clean
make prepare-docs
make serve
```
## Test en version
```shell
pnpm run start
```

File diff suppressed because it is too large Load Diff

View File

@@ -1,57 +0,0 @@
---
date: "2017-04-08T11:34:00+02:00"
title: "环境变量清单"
slug: "environment-variables"
sidebar_position: 10
toc: false
draft: false
aliases:
- /zh-cn/environment-variables
menu:
sidebar:
parent: "administration"
name: "环境变量清单"
sidebar_position: 10
identifier: "environment-variables"
---
# 环境变量清单
这里是用来控制 Gitea 行为表现的的环境变量清单,您需要在执行如下 Gitea 启动命令前设置它们来确保配置生效:
```
GITEA_CUSTOM=/home/gitea/custom ./gitea web
```
## Go 的配置
因为 Gitea 使用 Go 语言编写,因此它使用了一些相关的 Go 的配置参数:
* `GOOS`
* `GOARCH`
* [`GOPATH`](https://go.dev/cmd/go/#hdr-GOPATH_environment_variable)
您可以在[官方文档](https://go.dev/cmd/go/#hdr-Environment_variables)中查阅这些配置参数的详细信息。
## Gitea 的文件目录
* `GITEA_WORK_DIR`:工作目录的绝对路径
* `GITEA_CUSTOM`:默认情况下 Gitea 使用默认目录 `GITEA_WORK_DIR`/custom您可以使用这个参数来配置 *custom* 目录
* `GOGS_WORK_DIR` 已废弃,请使用 `GITEA_WORK_DIR` 替代
* `GOGS_CUSTOM` 已废弃,请使用 `GITEA_CUSTOM` 替代
## 操作系统配置
* `USER`Gitea 运行时使用的系统用户,它将作为一些 repository 的访问地址的一部分
* `USERNAME` 如果没有配置 `USER` Gitea 将使用 `USERNAME`
* `HOME` 用户的 home 目录,在 Windows 中会使用 `USERPROFILE` 环境变量
### 仅限于 Windows 的配置
* `USERPROFILE` 用户的主目录,如果未配置则会使用 `HOMEDRIVE` + `HOMEPATH`
* `HOMEDRIVE`: 用于访问 home 目录的主驱动器路径C盘
* `HOMEPATH`:在指定主驱动器下的 home 目录相对路径
## Miscellaneous
* `SKIP_MINWINSVC`:如果设置为 1在 Windows 上不会以 service 的形式运行。

View File

@@ -1,261 +0,0 @@
---
date: "2023-05-23T09:00:00+08:00"
title: "邮件模板"
slug: "mail-templates"
sidebar_position: 45
toc: false
draft: false
aliases:
- /zh-cn/mail-templates
menu:
sidebar:
parent: "administration"
name: "邮件模板"
sidebar_position: 45
identifier: "mail-templates"
---
# 邮件模板
为了定制特定操作的电子邮件主题和内容,可以使用模板来自定义 Gitea。这些功能的模板位于 [`custom` 目录](administration/customizing-gitea.md) 下。
如果没有自定义的替代方案Gitea 将使用内部模板作为默认模板。
自定义模板在 Gitea 启动时加载。对它们的更改在 Gitea 重新启动之前不会被识别。
## 支持模板的邮件通知
目前,以下通知事件使用模板:
| 操作名称 | 用途 |
| ----------- | ------------------------------------------------------------------------------------------------------------ |
| `new` | 创建了新的工单或合并请求。 |
| `comment` | 在现有工单或合并请求中创建了新的评论。 |
| `close` | 关闭了工单或合并请求。 |
| `reopen` | 重新打开了工单或合并请求。 |
| `review` | 在合并请求中进行审查的首要评论。 |
| `approve` | 对合并请求进行批准的首要评论。 |
| `reject` | 对合并请求提出更改请求的审查的首要评论。 |
| `code` | 关于合并请求的代码的单个评论。 |
| `assigned` | 用户被分配到工单或合并请求。 |
| `default` | 未包括在上述类别中的任何操作,或者当对应类别的模板不存在时使用的模板。 |
特定消息类型的模板路径为:
```sh
custom/templates/mail/{操作类型}/{操作名称}.tmpl
```
其中 `{操作类型}``issue``pull`(针对合并请求),`{操作名称}` 是上述列出的操作名称之一。
例如,有关合并请求中的评论的电子邮件的特定模板是:
```sh
custom/templates/mail/pull/comment.tmpl
```
然而,并不需要为每个操作类型/名称组合创建模板。
使用回退系统来选择适当的模板。在此列表中,将使用 _第一个存在的_ 模板:
- 所需**操作类型**和**操作名称**的特定模板。
- 操作类型为 `issue` 和所需**操作名称**的模板。
- 所需**操作类型**和操作名称为 `default` 的模板。
- 操作类型为` issue` 和操作名称为 `default` 的模板。
唯一必需的模板是操作类型为 `issue` 操作名称为 `default` 的模板,除非用户在 `custom` 目录中覆盖了它。
## 模板语法
邮件模板是 UTF-8 编码的文本文件,需要遵循以下格式之一:
```
用于主题行的文本和宏
------------
用于邮件正文的文本和宏
```
或者
```
用于邮件正文的文本和宏
```
指定 _主题_ 部分是可选的因此也是虚线分隔符。在使用时_主题_ 和 _邮件正文_ 模板之间的分隔符需要至少三个虚线;分隔符行中不允许使用其他字符。
_主题__邮件正文_ 由 [Golang的模板引擎](https://go.dev/pkg/text/template/) 解析,并提供了为每个通知组装的 _元数据上下文_。上下文包含以下元素:
| 名称 | 类型 | 可用性 | 用途 |
| -------------------- | ------------------ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.FallbackSubject` | string | 始终可用 | 默认主题行。参见下文。 |
| `.Subject` | string | 仅在正文中可用 | 解析后的 _主题_。 |
| `.Body` | string | 始终可用 | 工单、合并请求或评论的消息,从 Markdown 解析为 HTML 并进行了清理。请勿与 _邮件正文_ 混淆。 |
| `.Link` | string | 始终可用 | 源工单、合并请求或评论的地址。 |
| `.Issue` | models.Issue | 始终可用 | 产生通知的工单(或合并请求)。要获取特定于合并请求的数据(例如 `HasMerged`),可以使用 `.Issue.PullRequest`,但需要注意,如果工单 _不是_ 合并请求,则该字段将为 `nil`。 |
| `.Comment` | models.Comment | 如果适用 | 如果通知是针对添加到工单或合并请求的评论,则其中包含有关评论的信息。 |
| `.IsPull` | bool | 始终可用 | 如果邮件通知与合并请求关联(即 `.Issue.PullRequest` 不为 `nil` ),则为 `true`。 |
| `.Repo` | string | 始终可用 | 仓库的名称,包括所有者名称(例如 `mike/stuff` |
| `.User` | models.User | 始终可用 | 事件来源仓库的所有者。要获取用户名(例如 `mike`),可以使用 `.User.Name`。 |
| `.Doer` | models.User | 始终可用 | 执行触发通知事件的操作的用户。要获取用户名(例如 `rhonda`),可以使用 `.Doer.Name`。 |
| `.IsMention` | bool | 始终可用 | 如果此通知仅是因为在评论中提到了用户而生成的,并且收件人未订阅源,则为 `true`。如果收件人已订阅工单或仓库,则为 `false`。 |
| `.SubjectPrefix` | string | 始终可用 | 如果通知是关于除工单或合并请求创建之外的其他内容,则为 `Re`;否则为空字符串。 |
| `.ActionType` | string | 始终可用 | `"issue"``"pull"`。它将与实际的 _操作类型_ 对应,与选择的模板无关。 |
| `.ActionName` | string | 始终可用 | 它将是上述操作类型之一(`new` `comment` 等),并与选择的模板对应。 |
| `.ReviewComments` | []models.Comment | 始终可用 | 审查中的代码评论列表。评论文本将在 `.RenderedContent` 中,引用的代码将在 `.Patch` 中。 |
所有名称区分大小写。
### 模板中的主题部分
用于邮件主题的模板引擎是 Golang 的 [`text/template`](https://go.dev/pkg/text/template/)。
有关语法的详细信息,请参阅链接的文档。
主题构建的步骤如下:
- 根据通知类型和可用的模板选择一个模板。
- 解析并解析模板(例如,将 `{{.Issue.Index}}` 转换为工单或合并请求的编号)。
- 将所有空格字符(例如 `TAB``LF` 等)转换为普通空格。
- 删除所有前导、尾随和多余的空格。
- 将字符串截断为前 256 个字母(字符)。
如果最终结果为空字符串,**或者**没有可用的主题模板即所选模板不包含主题部分将使用Gitea的**内部默认值**。
内部默认(回退)主题相当于:
```
{{.SubjectPrefix}}[{{.Repo}}] {{.Issue.Title}} (#{{.Issue.Index}})
```
例如:`Re: [mike/stuff] New color palette (#38)`
即使存在有效的主题模板Gitea的默认主题也可以在模板的元数据中作为 `.FallbackSubject` 找到。
### 模板中的邮件正文部分
用于邮件正文的模板引擎是 Golang 的 [`html/template`](https://go.dev/pkg/html/template/)。
有关语法的详细信息,请参阅链接的文档。
邮件正文在邮件主题之后进行解析,因此还有一个额外的 _元数据_ 字段,即在考虑所有情况之后实际呈现的主题。
期望的结果是 HTML包括结构元素`<html>``<body>`等)。可以通过 `<style>` 块、`class``style` 属性进行样式设置。但是,`html/template` 会进行一些 [自动转义](https://go.dev/pkg/html/template/#hdr-Contexts),需要考虑这一点。
不支持附件(例如图像或外部样式表)。但是,也可以引用其他模板,例如以集中方式提供 `<style>` 元素的内容。外部模板必须放置在 `custom/mail` 下,并相对于该目录引用。例如,可以使用 `{{template styles/base}}` 包含 `custom/mail/styles/base.tmpl`
邮件以 `Content-Type: multipart/alternative` 发送,因此正文以 HTML 和文本格式发送。通过剥离 HTML 标记来获取文本版本。
## 故障排除
邮件的呈现方式直接取决于邮件应用程序的功能。许多邮件客户端甚至不支持 HTML因此显示生成邮件中包含的文本版本。
如果模板无法呈现,则只有在发送邮件时才会注意到。
如果主题模板失败,将使用默认主题,如果从 _邮件正文_ 中成功呈现了任何内容,则将使用该内容,忽略其他内容。
如果遇到问题,请检查 [Gitea的日志](administration/logging-config.md) 以获取错误消息。
## 示例
`custom/templates/mail/issue/default.tmpl`:
```html
[{{.Repo}}] @{{.Doer.Name}}
{{if eq .ActionName "new"}}
创建了
{{else if eq .ActionName "comment"}}
评论了
{{else if eq .ActionName "close"}}
关闭了
{{else if eq .ActionName "reopen"}}
重新打开了
{{else}}
更新了
{{end}}
{{if eq .ActionType "issue"}}
工单
{{else}}
合并请求
{{end}}
#{{.Issue.Index}}: {{.Issue.Title}}
------------
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title>
</head>
<body>
{{if .IsMention}}
<p>
您收到此邮件是因为 @{{.Doer.Name}} 提到了您。
</p>
{{end}}
<p>
<p>
<a href="{{AppUrl}}/{{.Doer.LowerName}}">@{{.Doer.Name}}</a>
{{if not (eq .Doer.FullName "")}}
({{.Doer.FullName}})
{{end}}
{{if eq .ActionName "new"}}
创建了
{{else if eq .ActionName "close"}}
关闭了
{{else if eq .ActionName "reopen"}}
重新打开了
{{else}}
更新了
{{end}}
<a href="{{.Link}}">{{.Repo}}#{{.Issue.Index}}</a>
</p>
{{if not (eq .Body "")}}
<h3>消息内容:</h3>
<hr>
{{.Body}}
{{end}}
</p>
<hr>
<p>
<a href="{{.Link}}">在 Gitea 上查看</a>
</p>
</body>
</html>
```
该模板将生成以下内容:
### 主题
> [mike/stuff] @rhonda 在合并请求 #38 上进行了评论New color palette
### 邮件正文
> [@rhonda](#)Rhonda Myers更新了 [mike/stuff#38](#)。
>
> #### 消息内容
>
> \_********************************\_********************************
>
> Mike, I think we should tone down the blues a little.
>
> \_********************************\_********************************
>
> [在 Gitea 上查看](#)。
## 高级用法
模板系统包含一些函数,可用于进一步处理和格式化消息。以下是其中一些函数的列表:
| 函数名 | 参数 | 可用于 | 用法 |
|------------------| ----------- | ------------ | ------------------------------ |
| `AppUrl` | - | 任何地方 | Gitea 的 URL |
| `AppName` | - | 任何地方 | 从 `app.ini` 中设置,通常为 "Gitea" |
| `AppDomain` | - | 任何地方 | Gitea 的主机名 |
| `EllipsisString` | string, int | 任何地方 | 将字符串截断为指定长度;根据需要添加省略号 |
| `SanitizeHTML` | string | 仅正文部分 | 通过删除其中的危险 HTML 标签对文本进行清理 |
| `SafeHTML` | string | 仅正文部分 | 将输入作为 HTML 处理;可用于输出原始的 HTML 内容 |
这些都是 _函数_,而不是元数据,因此必须按以下方式使用:
```html
像这样使用: {{SanitizeHTML "Escape<my>text"}}
或者这样使用: {{"Escape<my>text" | SanitizeHTML}}
或者这样使用: {{AppUrl}}
但不要像这样使用: {{.AppUrl}}
```

View File

@@ -1,136 +0,0 @@
---
date: "2018-05-22T11:00:00+00:00"
title: "反向代理"
slug: "reverse-proxies"
sidebar_position: 16
toc: false
draft: false
aliases:
- /zh-cn/reverse-proxies
menu:
sidebar:
parent: "administration"
name: "反向代理"
sidebar_position: 16
identifier: "reverse-proxies"
---
# 反向代理
## 使用 Nginx 作为反向代理服务
如果您想使用 Nginx 作为 Gitea 的反向代理服务,您可以参照以下 `nginx.conf` 配置中 `server``http` 部分:
```
server {
listen 80;
server_name git.example.com;
location / {
proxy_pass http://localhost:3000;
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;
}
}
```
## 使用 Nginx 作为反向代理服务并将 Gitea 路由至一个子路径
如果您已经有一个域名并且想与 Gitea 共享该域名,您可以增加以下 `nginx.conf` 配置中 `server``http` 部分,为 Gitea 添加路由规则:
```
server {
listen 80;
server_name git.example.com;
# 注意: /git/ 最后需要有一个路径符号
location /git/ {
# 注意: 反向代理后端 URL 的最后需要有一个路径符号
proxy_pass http://localhost:3000/;
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;
}
}
```
然后您**必须**在 Gitea 的配置文件中正确的添加类似 `[server] ROOT_URL = http://git.example.com/git/` 的配置项。
## 使用 Apache HTTPD 作为反向代理服务
如果您想使用 Apache HTTPD 作为 Gitea 的反向代理服务,您可以为您的 Apache HTTPD 作如下配置(在 Ubuntu 中,配置文件通常在 `/etc/apache2/httpd.conf` 目录下):
```
<VirtualHost *:80>
...
ProxyPreserveHost On
ProxyRequests off
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:3000/ nocanon
</VirtualHost>
```
注:必须启用以下 Apache HTTPD 组件:`proxy` `proxy_http`
## 使用 Apache HTTPD 作为反向代理服务并将 Gitea 路由至一个子路径
如果您已经有一个域名并且想与 Gitea 共享该域名,您可以增加以下配置为 Gitea 添加路由规则(在 Ubuntu 中,配置文件通常在 `/etc/apache2/httpd.conf` 目录下):
```
<VirtualHost *:80>
...
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
AllowEncodedSlashes NoDecode
# 注意: 路径和 URL 后面都不要写路径符号 '/'
ProxyPass /git http://localhost:3000 nocanon
</VirtualHost>
```
然后您**必须**在 Gitea 的配置文件中正确的添加类似 `[server] ROOT_URL = http://git.example.com/git/` 的配置项。
注:必须启用以下 Apache HTTPD 组件:`proxy` `proxy_http`
## 使用 Caddy 作为反向代理服务
如果您想使用 Caddy 作为 Gitea 的反向代理服务,您可以在 `Caddyfile` 中添加如下配置:
```
git.example.com {
proxy / http://localhost:3000
}
```
## 使用 Caddy 作为反向代理服务并将 Gitea 路由至一个子路径
如果您已经有一个域名并且想与 Gitea 共享该域名,您可以在您的 `Caddyfile` 文件中增加以下配置,为 Gitea 添加路由规则:
```
git.example.com {
# 注意: 路径 /git/ 最后需要有路径符号
proxy /git/ http://localhost:3000
}
```
然后您**必须**在 Gitea 的配置文件中正确的添加类似 `[server] ROOT_URL = http://git.example.com/git/` 的配置项。
## 使用 Traefik 作为反向代理服务
如果您想使用 traefik 作为 Gitea 的反向代理服务,您可以在 `docker-compose.yaml` 中添加 label 部分(假设使用 docker 作为 traefik 的 provider
```yaml
gitea:
image: gitea/gitea
...
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`example.com`)"
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
```
这份配置假设您使用 traefik 来处理 HTTPS 服务,并在其和 Gitea 之间使用 HTTP 进行通信。

37
check_outdated.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
# This script takes `locale` as a param and checks if a specific locale version of document is up to date with English version
# If latest commit timestamp of English version is greater than the specific locale version,
# The specific locale version document will be marked as outdated
set -xe
SED_INPLACE() {
if sed --version 2>/dev/null | grep -q GNU; then
sed -i "$@"
else
sed -i '' "$@"
fi
}
locale="$1"
cur_path=`pwd`
cd .tmp/upstream-docs
for file in `find ./docs/content -name "*.${locale}.md"`; do
file_en="${file/.${locale}/.en-us}"
if [ ! -f "$file_en" ]; then
continue
fi
latest_commit_time_en=$(git log -1 --format=%ct "$file_en")
latest_commit_time_locale=$(git log -1 --format=%ct "$file")
if [ -z "$latest_commit_time_locale" ]; then
continue
fi
if [[ "$latest_commit_time_en" -gt "$latest_commit_time_locale" ]]; then
echo "file: $file, lastest commit timestamp: $latest_commit_time_en (en ver), $latest_commit_time_locale ($locale ver)"
SED_INPLACE '1s/---/---\nisOutdated: true/' $file
fi
done
cd "$cur_path"

View File

@@ -1,49 +0,0 @@
---
date: "2023-05-25T00:00:00+00:00"
title: "重构指南"
slug: "guidelines-refactoring"
sidebar_position: 20
toc: false
draft: false
aliases:
- /zh-cn/guidelines-refactoring
menu:
sidebar:
parent: "contributing"
name: "重构指南"
sidebar_position: 20
identifier: "guidelines-refactoring"
---
# 重构指南
## 背景
自2014年2月12日编写了第一行代码以来Gitea已经发展成为一个庞大的项目。
因此,代码库变得越来越大。代码库越大,维护就越困难。
存在许多过时的机制,许多框架混合在一起,一些遗留代码可能会导致错误并阻碍新功能的开发。
为了使代码库更易于维护使Gitea变得更好开发人员应牢记使用现代机制来重构旧代码。
本文档是关于重构代码库的指南集合。
## 重构建议
* 设计更多关于未来的内容,而不仅仅解决当前问题。
* 减少模糊性,减少冲突,提高可维护性。
* 描述重构,例如:
* 为什么需要重构。
* 如何解决旧问题。
* 重构的优点/缺点是什么。
* 只做必要的更改,尽量保留旧逻辑。
* 引入一些中间步骤使重构更容易审查完整的重构计划可以在几个PR中完成。
* 如果存在分歧应该请TOC技术监督委员会参与决策。
* 添加必要的测试以确保重构的正确性。
* 非错误重构优先在里程碑的开始时进行,这样可以更容易地在发布之前发现问题。
## 审查和合并建议
* 重构的PR不应该长时间保持打开状态通常为7天应尽快进行审查。
* 重构的PR应尽快合并不应被其他PR阻塞。
* 如果TOC没有异议重构的PR可以在7天后由一名核心成员非作者批准后合并。
* 如果最终结果良好,容忍一些不完美/临时的步骤。
* 如果重构是必要的,容忍一些回归错误,并尽快修复错误。

View File

@@ -1,64 +0,0 @@
---
date: "2021-01-22T00:00:00+02:00"
title: "Übersetzungs Richtlinien"
slug: "localization"
sidebar_position: 70
toc: false
draft: false
menu:
sidebar:
parent: "contributing"
name: "Übersetzungsrichtlinien"
sidebar_position: 70
identifier: "localization"
---
## Allgemeines
Anrede: Wenig förmlich:
* "Du"-Form
* Keine "Amtsdeusch"-Umschreibungen, einfach so als ob man den Nutzer direkt persönlich ansprechen würde
Genauer definiert:
* "falsch" anstatt "nicht korrekt/inkorrekt"
* Benutzerkonto oder Konto? Oder Account?
* "Wende dich an ..." anstatt "kontaktiere ..."
* In der selben Zeit übersetzen (sonst wird aus "is" "war")
* Richtige Anführungszeichen verwenden. Also `"` statt `''` oder `'` oder \` oder `´`
* `„` für beginnende Anführungszeichen, `“` für schließende Anführungszeichen
Es gelten Artikel und Worttrennungen aus dem Duden.
## Formulierungen in Modals und Buttons
Es sollten die gleichen Formulierungen auf Buttons und Modals verwendet werden.
Beispiel: Wenn der Button mit `löschen` beschriftet ist, sollte im Modal die Frage lauten `Willst du das wirklich löschen?` und nicht `Willst du das wirklich entfernen?`. Gleiches gilt für Success/Errormeldungen nach der Aktion.
## Trennungen
* Pull-Request
* Time-Tracker
* E-Mail-Adresse (siehe Duden)
## Artikeldefinitionen für Anglizismen
* _Der_ Commit (m.)
* _Der_ Branch (m.), plural: die Branches
* _Das_ Issue (n.)
* _Der_ Fork (m.)
* _Das_ Repository (n.), plural: die Repositories
* _Der_ Pull-Request (m.)
* _Der_ Token (m.), plural: die Token
* _Das_ Review (n.)
* _Der_ Key (m.)
* _Der_ Committer (m.), plural: die Committer
## Weiterführende Links
Diese beiden Links sind sehr empfehlenswert:
* http://docs.translatehouse.org/projects/localization-guide/en/latest/guide/translation_guidelines_german.html
* https://docs.qgis.org/2.18/en/docs/documentation_guidelines/do_translations.html

View File

@@ -1,17 +0,0 @@
---
date: "2023-05-25T00:00:00+02:00"
title: "翻译指南"
sidebar_position: 70
toc: true
draft: false
menu:
sidebar:
parent: "contributing"
name: "翻译指南"
sidebar_position: 70
identifier: "translation-guidelines"
---
本页面用于提供一套通用规则,以确保翻译的一致性。
* [German](/de-de/übersetzungs-richtlinien/)

View File

@@ -1,40 +0,0 @@
---
date: "2023-05-25T17:29:00+08:00"
title: "迁移界面"
slug: "migrations-interfaces"
sidebar_position: 55
toc: false
draft: false
aliases:
- /zh-cn/migrations-interfaces
menu:
sidebar:
parent: "development"
name: "迁移界面"
sidebar_position: 55
identifier: "migrations-interfaces"
---
# 迁移功能
完整迁移功能在Gitea 1.9.0版本中引入。它定义了两个接口用于支持从其他Git托管平台迁移存储库数据到Gitea或者在将来将Gitea数据迁移到其他Git托管平台。
目前已实现了从GitHub、GitLab和其他Gitea实例的迁移。
首先Gitea在包[modules/migration](https://github.com/go-gitea/gitea/tree/main/modules/migration)中定义了一些标准对象。它们是`Repository``Milestone``Release``ReleaseAsset``Label``Issue``Comment``PullRequest``Reaction``Review``ReviewComment`
## 下载器接口
要从新的Git托管平台迁移需要进行两个步骤的更新。
- 您应该实现一个`Downloader`,用于获取存储库信息。
- 您应该实现一个`DownloaderFactory`用于检测URL是否匹配并创建上述的`Downloader`
- 您需要在`init()`中通过`RegisterDownloaderFactory`注册`DownloaderFactory`
您可以在[downloader.go](https://github.com/go-gitea/gitea/blob/main/modules/migration/downloader.go)中找到这些接口。
## 上传器接口
目前,只实现了`GiteaLocalUploader`因此我们只能通过此Uploader将下载的数据保存到本地的Gitea实例。目前不支持其他上传器。
您可以在[uploader.go](https://github.com/go-gitea/gitea/blob/main/modules/migration/uploader.go)中找到这些接口。

View File

@@ -1,137 +0,0 @@
---
date: "2019-04-19:44:00+01:00"
title: "OAuth2 提供者"
slug: "oauth2-provider"
sidebar_position: 41
toc: false
draft: false
aliases:
- /zh-cn/oauth2-provider
menu:
sidebar:
parent: "development"
name: "OAuth2 提供者"
sidebar_position: 41
identifier: "oauth2-provider"
---
# OAuth2 提供者
Gitea 支持作为 OAuth2 提供者,允许第三方应用程序在用户同意的情况下访问其资源。此功能自 1.8.0 版起可用。
## 端点
| 端点 | URL |
| ------------------------ | ----------------------------------- |
| OpenID Connect Discovery | `/.well-known/openid-configuration` |
| Authorization Endpoint | `/login/oauth/authorize` |
| Access Token Endpoint | `/login/oauth/access_token` |
| OpenID Connect UserInfo | `/login/oauth/userinfo` |
| JSON Web Key Set | `/login/oauth/keys` |
## 支持的 OAuth2 授权
目前 Gitea 仅支持 [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) 标准,并额外支持以下扩展:
- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
要将 Authorization Code Grant 作为第三方应用程序,您需要通过在设置中添加一个新的 "应用程序" (`/user/settings/applications`)。
## 范围
Gitea 支持以下令牌范围:
| 名称 | 介绍 |
| ---- | ----------- |
| **(no scope)** | 授予对公共用户配置文件和公共存储库的只读访问权限 |
| **repo** | 完全控制所有存储库 |
| &nbsp;&nbsp;&nbsp; **repo:status** | 授予对所有存储库中提交状态的读/写访问权限 |
| &nbsp;&nbsp;&nbsp; **public_repo** | 仅授予对公共存储库的读/写访问权限 |
| **admin:repo_hook** | 授予对所有存储库的 Hooks 访问权限,该权限已包含在 `repo` 范围中 |
| &nbsp;&nbsp;&nbsp; **write:repo_hook** | 授予对存储库 Hooks 的读/写访问权限 |
| &nbsp;&nbsp;&nbsp; **read:repo_hook** | 授予对存储库 Hooks 的只读访问权限 |
| **admin:org** | 授予对组织设置的完全访问权限 |
| &nbsp;&nbsp;&nbsp; **write:org** | 授予对组织设置的读/写访问权限 |
| &nbsp;&nbsp;&nbsp; **read:org** | 授予对组织设置的只读访问权限 |
| **admin:public_key** | 授予公钥管理的完全访问权限 |
| &nbsp;&nbsp;&nbsp; **write:public_key** | 授予对公钥的读/写访问权限 |
| &nbsp;&nbsp;&nbsp; **read:public_key** | 授予对公钥的只读访问权限 |
| **admin:org_hook** | 授予对组织级别 Hooks 的完全访问权限 |
| **admin:user_hook** | 授予对用户级别 Hooks 的完全访问权限 |
| **notification** | 授予对通知的完全访问权限 |
| **user** | 授予对用户个人资料信息的完全访问权限 |
| &nbsp;&nbsp;&nbsp; **read:user** | 授予对用户个人资料的读取权限 |
| &nbsp;&nbsp;&nbsp; **user:email** | 授予对用户电子邮件地址的读取权限 |
| &nbsp;&nbsp;&nbsp; **user:follow** | 授予访问权限以关注/取消关注用户 |
| **delete_repo** | 授予删除存储库的权限 |
| **package** | 授予对托管包的完全访问权限 |
| &nbsp;&nbsp;&nbsp; **write:package** | 授予对包的读/写访问权限 |
| &nbsp;&nbsp;&nbsp; **read:package** | 授予对包的读取权限 |
| &nbsp;&nbsp;&nbsp; **delete:package** | 授予对包的删除权限 |
| **admin:gpg_key** | 授予 GPG 密钥管理的完全访问权限 |
| &nbsp;&nbsp;&nbsp; **write:gpg_key** | 授予对 GPG 密钥的读/写访问权限 |
| &nbsp;&nbsp;&nbsp; **read:gpg_key** | 授予对 GPG 密钥的只读访问权限 |
| **admin:application** | 授予应用程序管理的完全访问权限 |
| &nbsp;&nbsp;&nbsp; **write:application** | 授予应用程序管理的读/写访问权限 |
| &nbsp;&nbsp;&nbsp; **read:application** | 授予应用程序管理的读取权限 |
| **sudo** | 允许以站点管理员身份执行操作 |
## 客户端类型
Gitea 支持私密和公共客户端类型,[参见 RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1).
对于公共客户端, 允许在本地回环地址的重定向 URI 中使用任意端口,例如 `http://127.0.0.1/`。根据 [RFC 8252 的建议](https://datatracker.ietf.org/doc/html/rfc8252#section-8.3),请避免使用 `localhost`
## 示例
**注意:** 该示例中尚未使用 PKCE。
1. 将用户重定向到授权端点,以获得他们的访问资源授权:
```curl
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
```
在设置中注册应用程序以获得 `CLIENT_ID`。`STATE` 是一个随机字符串,它将在获得用户授权后发送回您的应用程序。`state` 参数是可选的,但您应该使用它来防止 CSRF 攻击。
![Authorization Page](/authorize.png)
用户将会被询问是否授权给您的应用程序。如果他们同意了授权,用户将会被重定向到 `REDIRECT_URL`,例如:
```curl
https://[REDIRECT_URI]?code=RETURNED_CODE&state=STATE
```
2. 使用重定向提供的 `code`,您可以请求一个新的应用程序和 Refresh Token。Access Token Endpoint 接受 `application/json` 或 `application/x-www-form-urlencoded` 类型的 POST 请求,例如:
```curl
POST https://[YOUR-GITEA-URL]/login/oauth/access_token
```
```json
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code": "RETURNED_CODE",
"grant_type": "authorization_code",
"redirect_uri": "REDIRECT_URI"
}
```
返回:
```json
{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjowLCJleHAiOjE1NTUxNzk5MTIsImlhdCI6MTU1NTE3NjMxMn0.0-iFsAwBtxuckA0sNZ6QpBQmywVPz129u75vOM7wPJecw5wqGyBkmstfJHAjEOqrAf_V5Z-1QYeCh_Cz4RiKug",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjoxLCJjbnQiOjEsImV4cCI6MTU1NzgwNDMxMiwiaWF0IjoxNTU1MTc2MzEyfQ.S_HZQBy4q9r5SEzNGNIoFClT43HPNDbUdHH-GYNYYdkRfft6XptJBkUQscZsGxOW975Yk6RbgtGvq1nkEcklOw"
}
```
`CLIENT_SECRET` 是生成给应用程序的唯一密钥。请注意,该密钥只会在您使用 Gitea 创建/注册应用程序后出现一次。如果您丢失了密钥,您必须在应用程序设置中重新生成密钥。
`access_token` 请求中的 `REDIRECT_URI` 必须与 `authorize` 请求中的 `REDIRECT_URI` 相符。
3. 使用 `access_token` 来构造 [API 请求](development/api-usage.md#oauth2-provider) 以读写用户的资源。

View File

@@ -0,0 +1,9 @@
{
"label": "Administration",
"position": 30,
"link": {
"type": "generated-index",
"slug": "/administration",
"title": "Administration"
}
}

View File

@@ -0,0 +1,33 @@
---
date: "2019-12-28"
slug: adding-legal-pages
sidebar_position: 110
aliases:
- /en-us/adding-legal-pages
---
# Adding Legal Pages
Some jurisdictions (such as EU), requires certain legal pages (e.g. Privacy Policy) to be added to website. Follow these steps to add them to your Gitea instance.
## Getting Pages
Gitea source code ships with sample pages, available in `contrib/legal` directory. Copy them to `custom/public/assets/`. For example, to add Privacy Policy:
```bash
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
```
Now you need to edit the page to meet your requirements. In particular you must change the email addresses, web addresses and references to "Your Gitea Instance" to match your situation.
You absolutely must not place a general ToS or privacy statement that implies that the Gitea project is responsible for your server.
## Make it Visible
Create or append to `/path/to/custom/templates/custom/extra_links_footer.tmpl`:
```go
<a class="item" href="{{AppSubUrl}}/assets/privacy.html">Privacy Policy</a>
```
Restart Gitea to see the changes.

View File

@@ -1,18 +1,9 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Authentication"
slug: "authentication"
sidebar_position: 10
toc: false
draft: false
aliases:
- /en-us/authentication
menu:
sidebar:
parent: "usage"
name: "Authentication"
sidebar_position: 10
identifier: "authentication"
---
# Authentication
@@ -236,7 +227,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
@@ -348,4 +339,13 @@ If set `ENABLE_REVERSE_PROXY_FULL_NAME=true`, a user full name expected in `X-WE
You can also limit the reverse proxy's IP address range with `REVERSE_PROXY_TRUSTED_PROXIES` which default value is `127.0.0.0/8,::1/128`. By `REVERSE_PROXY_LIMIT`, you can limit trusted proxies level.
Notice: Reverse Proxy Auth doesn't support the API. You still need an access token or basic auth to make API requests.
You can enable the this authentication method for the API with
```ini
[service]
ENABLE_REVERSE_PROXY_AUTHENTICATION_API = true
```
:::note
When this method is enabled for the API, the reverse proxy is responsible for handling CSRF protection.
:::

View File

@@ -0,0 +1,176 @@
---
date: "2017-01-01T16:00:00+02:00"
slug: "backup-and-restore"
sidebar_position: 11
aliases:
- /en-us/backup-and-restore
---
# Backup and Restore
Gitea currently has a `dump` command that will save the installation to a ZIP file. This
file can be unpacked and used to restore an instance.
## Backup Consistency
To ensure the consistency of the Gitea instance, it must be shutdown during backup.
Gitea consists of a database, files and git repositories, all of which change when it is used. For instance, when a migration is in progress, a transaction is created in the database while the git repository is being copied over. If the backup happens in the middle of the migration, the git repository may be incomplete although the database claims otherwise because it was dumped afterwards. The only way to avoid such race conditions is by stopping the Gitea instance during the backups.
## Backup Command (`dump`)
Switch to the user running Gitea: `su git`. Run `./gitea dump -c /path/to/app.ini` in the Gitea installation
directory. There should be some output similar to the following:
```log
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
```
Inside the `gitea-dump-1482906742.zip` file, will be the following:
- `app.ini` - Optional copy of configuration file if originally stored outside the default `custom/` directory
- `custom/` - All config or customization files in `custom/`.
- `data/` - Data directory (APP_DATA_PATH), except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, SQLite file if you are using SQLite.
- `repos/` - Complete copy of the repository directory.
- `gitea-db.sql` - SQL dump of database
- `log/` - Various logs. They are not needed for a recovery or migration.
Intermediate backup files are created in a temporary directory specified either with the
`--tempdir` command-line parameter or the `TMPDIR` environment variable.
## Backup the database
The SQL dump created by `gitea dump` uses XORM and Gitea admins may prefer to use the native the MySQL and PostgreSQL dump tools instead. There are still open issues when using XORM for dumping the database that may cause problems when attempting to restore it.
```sh
# mysql
mysqldump -u$USER -p$PASS --database $DATABASE > gitea-db.sql
# postgres
pg_dump -U $USER $DATABASE > gitea-db.sql
```
### Using Docker (`dump`)
There are a few caveats for using the `dump` command with Docker.
The command has to be executed with the `RUN_USER = <OS_USERNAME>` specified in `gitea/conf/app.ini`; and, for the zipping of the backup folder to occur without permission error the command `docker exec` must be executed inside of the `--tempdir`.
Example:
```bash
docker exec -u <OS_USERNAME> -it -w <--tempdir> $(docker ps -qf 'name=^<NAME_OF_DOCKER_CONTAINER>$') bash -c '/usr/local/bin/gitea dump -c </path/to/app.ini>'
```
\*Note: `--tempdir` refers to the temporary directory of the docker environment used by Gitea; if you have not specified a custom `--tempdir`, then Gitea uses `/tmp` or the `TMPDIR` environment variable of the docker container. For `--tempdir` adjust your `docker exec` command options accordingly.
The result should be a file, stored in the `--tempdir` specified, along the lines of: `gitea-dump-1482906742.zip`
## Restore Command (`restore`)
There is currently no support for a recovery command. It is a manual process that mostly
involves moving files to their correct locations and restoring a database dump.
Example:
```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/data/repositories/
chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea
# mysql
mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql
# sqlite3
sqlite3 $DATABASE_PATH <gitea-db.sql
# postgres
psql -U $USER -d $DATABASE < gitea-db.sql
service gitea restart
```
Repository Git Hooks should be regenerated if installation method is changed (eg. binary -> Docker), or if Gitea is installed to a different directory than the previous installation.
With Gitea running, and from the directory Gitea's binary is located, execute: `./gitea admin regenerate hooks`
This ensures that application and configuration file paths in repository Git Hooks are consistent and applicable to the current installation. If these paths are not updated, repository `push` actions will fail.
If you still have issues, consider running `./gitea doctor check` to inspect possible errors (or run with `--fix`).
### Using Docker (`restore`)
There is also no support for a recovery command in a Docker-based gitea instance. The restore process contains the same steps as described in the previous section but with different paths.
Example:
```sh
# open bash session in container
docker exec --user git -it 2a83b293548e bash
# unzip your backup file within the container
unzip gitea-dump-1610949662.zip
cd gitea-dump-1610949662
# restore the gitea data
mv data/* /data/gitea
# restore the repositories itself
mv repos/* /data/git/repositories/
# adjust file permissions
chown -R git:git /data
# Regenerate Git Hooks
/usr/local/bin/gitea -c '/data/gitea/conf/app.ini' admin regenerate hooks
```
The default user in the gitea container is `git` (1000:1000). Please replace `2a83b293548e` with your gitea container id or name.
### Using Docker-rootless (`restore`)
The restore workflow in Docker-rootless containers differs only in the directories to be used:
```sh
# open bash session in container
docker exec --user git -it 2a83b293548e bash
# unzip your backup file within the container
unzip gitea-dump-1610949662.zip
cd gitea-dump-1610949662
# restore the app.ini
mv data/conf/app.ini /etc/gitea/app.ini
# restore the gitea data
mv data/* /var/lib/gitea
# restore the repositories itself
mv repos/* /var/lib/gitea/git/repositories
# adjust file permissions
chown -R git:git /etc/gitea/app.ini /var/lib/gitea
# Regenerate Git Hooks
/usr/local/bin/gitea -c '/etc/gitea/app.ini' admin regenerate hooks
```
### Using `gitea dump` to convert database types
The `gitea dump` command can produce a SQL file that can be read by another database type, which is useful to convert the database to another in case you did not choose the correct one during the first installation.
Note that this conversion process is not well-tested, which is why it is recommended to choose the final database type during the first installation without attempting to change it afterwards.
Stop the Gitea server, then make sure you have a full backup of your original database.
Before attempting the conversion, ensure that the original database is clean. Run `gitea doctor check --all --fix` and `gitea doctor recreate-table` to address common issues.
Use the `--database` flag to get a Gitea dump with the SQL file in the target format, in this example PostgreSQL: `gitea dump --database postgres`, then extract the file `gitea-db.sql` from the generated ZIP file.
Create the PostgreSQL Gitea user and Gitea database. Then, import the SQL file as the Gitea user into the Gitea database, using commands such as:
```sh
sudo -u postgres psql -d gitea
gitea=# SET synchronous_commit TO off
gitea=# SET on_error_stop TO on
gitea=# \i gitea-db.sql
```
Disabling `synchronous_commit` makes PostgreSQL less resilient to crashes, but makes the import a lot faster. Since we already have a backup of the original database and we can check that the import completes successfully, it should be a good trade-off.
After the import is completed, set up Gitea to use PostgreSQL and start the Gitea server again. Good luck!

View File

@@ -1,30 +1,23 @@
---
date: "2020-01-25T21:00:00-03:00"
title: "Embedded data extraction tool"
slug: "cmd-embedded"
sidebar_position: 20
toc: false
draft: false
aliases:
- /en-us/cmd-embedded
menu:
sidebar:
parent: "administration"
name: "Embedded data extraction tool"
sidebar_position: 20
identifier: "cmd-embedded"
---
# Embedded data extraction tool
Gitea's executable contains all the resources required to run: templates, images, style-sheets
and translations. Any of them can be overridden by placing a replacement in a matching path
inside the `custom` directory (see [Customizing Gitea](administration/customizing-gitea.md)).
inside the `custom` directory (see [Customizing Gitea](../administration/customizing-gitea.md)).
To obtain a copy of the embedded resources ready for editing, the `embedded` command from the CLI
can be used from the OS shell interface.
**NOTE:** The embedded data extraction tool is included in Gitea versions 1.12 and above.
:::note
The embedded data extraction tool is included in Gitea versions 1.12 and above.
:::
## Listing resources
@@ -83,7 +76,7 @@ The default is the current directory.
The `--custom` flag tells Gitea to extract the files directly into the `custom` directory.
For this to work, the command needs to know the location of the `app.ini` configuration
file (`--config`) and, depending of the configuration, be ran from the directory where
Gitea normally starts. See [Customizing Gitea](administration/customizing-gitea.md) for details.
Gitea normally starts. See [Customizing Gitea](../administration/customizing-gitea.md) for details.
The `--overwrite` flag allows any existing files in the destination directory to be overwritten.

View File

@@ -0,0 +1,564 @@
---
date: "2017-01-01T16:00:00+02:00"
slug: "command-line"
sidebar_position: 1
aliases:
- /en-us/command-line
---
# Gitea Command Line
## Usage
`gitea [global options] command [command or global options] [arguments...]`
## Global options
All global options can be placed at the command level.
- `--help`, `-h`: Show help text and exit. Optional.
- `--version`, `-v`: Show version and exit. Optional. (example: `Gitea version 1.1.0+218-g7b907ed built with: bindata, sqlite`).
- `--work-path path`, `-w path`: Gitea's work path. Optional. (default: the binary's path or `$GITEA_WORK_DIR`)
- `--custom-path path`, `-C path`: Gitea's custom folder path. Optional. (default: `WorkPath`/custom or `$GITEA_CUSTOM`).
- `--config path`, `-c path`: Gitea configuration file path. Optional. (default: `CustomPath`/conf/app.ini).
NB: The defaults custom-path, config and work-path can also be
changed at build time (if preferred).
## Commands
### web
Starts the server:
- Options:
- `--port number`, `-p number`: Port number. Optional. (default: 3000). Overrides configuration file.
- `--install-port number`: Port number to run the install page on. Optional. (default: 3000). Overrides configuration file.
- `--pid path`, `-P path`: Pidfile path. Optional.
- `--quiet`, `-q`: Only emit Fatal logs on the console for logs emitted before logging set up.
- `--verbose`: Emit tracing logs on the console for logs emitted before logging is set-up.
- Examples:
- `gitea web`
- `gitea web --port 80`
- `gitea web --config /etc/gitea.ini --pid /some/custom/gitea.pid`
- Notes:
- Gitea should not be run as root. To bind to a port below 1024, you can use setcap on
Linux: `sudo setcap 'cap_net_bind_service=+ep' /path/to/gitea`. This will need to be
redone every time you update Gitea.
### admin
Admin operations:
- Commands:
- `user`:
- `list`:
- Options:
- `--admin`: List only admin users. Optional.
- Description: lists all users that exist
- Examples:
- `gitea admin user list`
- `delete`:
- Options:
- `--email`: Email of the user to be deleted.
- `--username`: Username of user to be deleted.
- `--id`: ID of user to be deleted.
- One of `--id`, `--username` or `--email` is required. If more than one is provided then all have to match.
- Examples:
- `gitea admin user delete --id 1`
- `create`:
- Options:
- `--name value`: Username. Required. As of Gitea 1.9.0, use the `--username` flag instead.
- `--username value`: Username. Required. New in Gitea 1.9.0.
- `--password value`: Password. Required.
- `--email value`: Email. Required.
- `--admin`: If provided, this makes the user an admin. Optional.
- `--access-token`: If provided, an access token will be created for the user. Optional. (default: false).
- `--must-change-password`: The created user will be required to set a new password after the initial login, default: true. It could be disabled by `--must-change-password=false`.
- `--random-password`: If provided, a randomly generated password will be used as the password of the created
user. The value of `--password` will be discarded. Optional.
- `--random-password-length`: If provided, it will be used to configure the length of the randomly generated
password. Optional. (default: 12)
- Examples:
- `gitea admin user create --username myname --password asecurepassword --email me@example.com`
- `change-password`:
- Options:
- `--username value`, `-u value`: Username. Required.
- `--password value`, `-p value`: New password. Required.
- `--must-change-password`: The user is required to set a new password after the login, default: true. It could be disabled by `--must-change-password=false`.
- Examples:
- `gitea admin user change-password --username myname --password asecurepassword`
- `must-change-password`:
- Args:
- `[username...]`: Users that must change their passwords
- Options:
- `--all`, `-A`: Force a password change for all users
- `--exclude username`, `-e username`: Exclude the given user. Can be set multiple times.
- `--unset`: Revoke forced password change for the given users
- `generate-access-token`:
- Options:
- `--username value`, `-u value`: Username. Required.
- `--token-name value`, `-t value`: Token name. Required.
- `--scopes value`: Comma-separated list of scopes. Scopes follow the format `[read|write]:<block>` or `all` where `<block>` is one of the available visual groups you can see when opening the API page showing the available routes (for example `repo`).
- Examples:
- `gitea admin user generate-access-token --username myname --token-name mytoken`
- `gitea admin user generate-access-token --help`
- `regenerate`
- Options:
- `hooks`: Regenerate Git Hooks for all repositories
- `keys`: Regenerate authorized_keys file
- Examples:
- `gitea admin regenerate hooks`
- `gitea admin regenerate keys`
- `auth`:
- `list`:
- Description: lists all external authentication sources that exist
- Examples:
- `gitea admin auth list`
- `delete`:
- Options:
- `--id`: ID of source to be deleted. Required.
- Examples:
- `gitea admin auth delete --id 1`
- `add-oauth`:
- Options:
- `--name`: Application Name.
- `--provider`: OAuth2 Provider.
- `--key`: Client ID (Key).
- `--secret`: Client Secret.
- `--auto-discover-url`: OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider).
- `--use-custom-urls`: Use custom URLs for GitLab/GitHub OAuth endpoints.
- `--custom-tenant-id`: Use custom Tenant ID for OAuth endpoints.
- `--custom-auth-url`: Use a custom Authorization URL (option for GitLab/GitHub).
- `--custom-token-url`: Use a custom Token URL (option for GitLab/GitHub).
- `--custom-profile-url`: Use a custom Profile URL (option for GitLab/GitHub).
- `--custom-email-url`: Use a custom Email URL (option for GitHub).
- `--icon-url`: Custom icon URL for OAuth2 login source.
- `--skip-local-2fa`: Allow source to override local 2FA. (Optional)
- `--scopes`: Additional scopes to request for this OAuth2 source. (Optional)
- `--required-claim-name`: Claim name that has to be set to allow users to login with this source. (Optional)
- `--required-claim-value`: Claim value that has to be set to allow users to login with this source. (Optional)
- `--group-claim-name`: Claim name providing group names for this source. (Optional)
- `--admin-group`: Group Claim value for administrator users. (Optional)
- `--restricted-group`: Group Claim value for restricted users. (Optional)
- `--group-team-map`: JSON mapping between groups and org teams. (Optional)
- `--group-team-map-removal`: Activate automatic team membership removal depending on groups. (Optional)
- Examples:
- `gitea admin auth add-oauth --name external-github --provider github --key OBTAIN_FROM_SOURCE --secret OBTAIN_FROM_SOURCE`
- `update-oauth`:
- Options:
- `--id`: ID of source to be updated. Required.
- `--name`: Application Name.
- `--provider`: OAuth2 Provider.
- `--key`: Client ID (Key).
- `--secret`: Client Secret.
- `--auto-discover-url`: OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider).
- `--use-custom-urls`: Use custom URLs for GitLab/GitHub OAuth endpoints.
- `--custom-tenant-id`: Use custom Tenant ID for OAuth endpoints.
- `--custom-auth-url`: Use a custom Authorization URL (option for GitLab/GitHub).
- `--custom-token-url`: Use a custom Token URL (option for GitLab/GitHub).
- `--custom-profile-url`: Use a custom Profile URL (option for GitLab/GitHub).
- `--custom-email-url`: Use a custom Email URL (option for GitHub).
- `--icon-url`: Custom icon URL for OAuth2 login source.
- `--skip-local-2fa`: Allow source to override local 2FA. (Optional)
- `--scopes`: Additional scopes to request for this OAuth2 source.
- `--required-claim-name`: Claim name that has to be set to allow users to login with this source. (Optional)
- `--required-claim-value`: Claim value that has to be set to allow users to login with this source. (Optional)
- `--group-claim-name`: Claim name providing group names for this source. (Optional)
- `--admin-group`: Group Claim value for administrator users. (Optional)
- `--restricted-group`: Group Claim value for restricted users. (Optional)
- Examples:
- `gitea admin auth update-oauth --id 1 --name external-github-updated`
- `add-smtp`:
- Options:
- `--name`: Application Name. Required.
- `--auth-type`: SMTP Authentication Type (PLAIN/LOGIN/CRAM-MD5). Default to PLAIN.
- `--host`: SMTP host. Required.
- `--port`: SMTP port. Required.
- `--force-smtps`: SMTPS is always used on port 465. Set this to force SMTPS on other ports.
- `--skip-verify`: Skip TLS verify.
- `--helo-hostname`: Hostname sent with HELO. Leave blank to send current hostname.
- `--disable-helo`: Disable SMTP helo.
- `--allowed-domains`: Leave empty to allow all domains. Separate multiple domains with a comma (',').
- `--skip-local-2fa`: Skip 2FA to log on.
- `--active`: This Authentication Source is Activated.
Remarks:
`--force-smtps`, `--skip-verify`, `--disable-helo`, `--skip-loca-2fs` and `--active` options can be used in form:
- `--option`, `--option=true` to enable
- `--option=false` to disable
If those options are not specified value would not be changed in `update-smtp` or would use default `false` value in `add-smtp`
- Examples:
- `gitea admin auth add-smtp --name ldap --host smtp.mydomain.org --port 587 --skip-verify --active`
- `update-smtp`:
- Options:
- `--id`: ID of source to be updated. Required.
- other options are shared with `add-smtp`
- Examples:
- `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`: Add new LDAP (via Bind DN) authentication source
- Options:
- `--name value`: Authentication name. Required.
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. Required.
- `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached. Required.
- `--port value`: The port to use when connecting to the LDAP server. Required.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for. Required.
- `--user-filter value`: An LDAP filter declaring how to find the user record that is attempting to authenticate. Required.
- `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
- `--restricted-filter value`: An LDAP filter specifying if a user should be given restricted status.
- `--username-attribute value`: The attribute of the users LDAP record containing the user name.
- `--firstname-attribute value`: The attribute of the users LDAP record containing the users first name.
- `--surname-attribute value`: The attribute of the users LDAP record containing the users surname.
- `--email-attribute value`: The attribute of the users LDAP record containing the users email address. Required.
- `--public-ssh-key-attribute value`: The attribute of the users LDAP record containing the users public ssh key.
- `--avatar-attribute value`: The attribute of the users LDAP record containing the users avatar.
- `--bind-dn value`: The DN to bind to the LDAP server with when searching for the user.
- `--bind-password value`: The password for the Bind DN, if any.
- `--attributes-in-bind`: Fetch attributes in bind DN context.
- `--synchronize-users`: Enable user synchronization.
- `--page-size value`: Search page size.
- Examples:
- `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`: Update existing LDAP (via Bind DN) authentication source
- Options:
- `--id value`: ID of authentication source. Required.
- `--name value`: Authentication name.
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name.
- `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached.
- `--port value`: The port to use when connecting to the LDAP server.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for.
- `--user-filter value`: An LDAP filter declaring how to find the user record that is attempting to authenticate.
- `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
- `--restricted-filter value`: An LDAP filter specifying if a user should be given restricted status.
- `--username-attribute value`: The attribute of the users LDAP record containing the user name.
- `--firstname-attribute value`: The attribute of the users LDAP record containing the users first name.
- `--surname-attribute value`: The attribute of the users LDAP record containing the users surname.
- `--email-attribute value`: The attribute of the users LDAP record containing the users email address.
- `--public-ssh-key-attribute value`: The attribute of the users LDAP record containing the users public ssh key.
- `--avatar-attribute value`: The attribute of the users LDAP record containing the users avatar.
- `--bind-dn value`: The DN to bind to the LDAP server with when searching for the user.
- `--bind-password value`: The password for the Bind DN, if any.
- `--attributes-in-bind`: Fetch attributes in bind DN context.
- `--synchronize-users`: Enable user synchronization.
- `--page-size value`: Search page size.
- Examples:
- `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`: Add new LDAP (simple auth) authentication source
- Options:
- `--name value`: Authentication name. Required.
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. Required.
- `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached. Required.
- `--port value`: The port to use when connecting to the LDAP server. Required.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for.
- `--user-filter value`: An LDAP filter declaring how to find the user record that is attempting to authenticate. Required.
- `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
- `--restricted-filter value`: An LDAP filter specifying if a user should be given restricted status.
- `--username-attribute value`: The attribute of the users LDAP record containing the user name.
- `--firstname-attribute value`: The attribute of the users LDAP record containing the users first name.
- `--surname-attribute value`: The attribute of the users LDAP record containing the users surname.
- `--email-attribute value`: The attribute of the users LDAP record containing the users email address. Required.
- `--public-ssh-key-attribute value`: The attribute of the users LDAP record containing the users public ssh key.
- `--avatar-attribute value`: The attribute of the users LDAP record containing the users avatar.
- `--user-dn value`: The users DN. Required.
- Examples:
- `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`: Update existing LDAP (simple auth) authentication source
- Options:
- `--id value`: ID of authentication source. Required.
- `--name value`: Authentication name.
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name.
- `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached.
- `--port value`: The port to use when connecting to the LDAP server.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for.
- `--user-filter value`: An LDAP filter declaring how to find the user record that is attempting to authenticate.
- `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
- `--restricted-filter value`: An LDAP filter specifying if a user should be given restricted status.
- `--username-attribute value`: The attribute of the users LDAP record containing the user name.
- `--firstname-attribute value`: The attribute of the users LDAP record containing the users first name.
- `--surname-attribute value`: The attribute of the users LDAP record containing the users surname.
- `--email-attribute value`: The attribute of the users LDAP record containing the users email address.
- `--public-ssh-key-attribute value`: The attribute of the users LDAP record containing the users public ssh key.
- `--avatar-attribute value`: The attribute of the users LDAP record containing the users avatar.
- `--user-dn value`: The users DN.
- Examples:
- `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
Generates a self-signed SSL certificate. Outputs to `cert.pem` and `key.pem` in the current
directory and will overwrite any existing files.
- Options:
- `--host value`: Comma separated hostnames and ips which this certificate is valid for.
Wildcards are supported. Required.
- `--ecdsa-curve value`: ECDSA curve to use to generate a key. Optional. Valid options
are P224, P256, P384, P521.
- `--rsa-bits value`: Size of RSA key to generate. Optional. Ignored if --ecdsa-curve is
set. (default: 3072).
- `--start-date value`: Creation date. Optional. (format: `Jan 1 15:04:05 2011`).
- `--duration value`: Duration which the certificate is valid for. Optional. (default: 8760h0m0s)
- `--ca`: If provided, this cert generates it's own certificate authority. Optional.
- Examples:
- `gitea cert --host git.example.com,example.com,www.example.com --ca`
### dump
Dumps all files and databases into a zip file. Outputs into a file like `gitea-dump-1482906742.zip`
in the current directory.
- Options:
- `--file name`, `-f name`: Name of the dump file with will be created. Optional. (default: gitea-dump-[timestamp].zip).
- `--tempdir path`, `-t path`: Path to the temporary directory used. Optional. (default: /tmp).
- `--skip-repository`, `-R`: Skip the repository dumping. Optional.
- `--skip-custom-dir`: Skip dumping of the custom dir. Optional.
- `--skip-lfs-data`: Skip dumping of LFS data. Optional.
- `--skip-attachment-data`: Skip dumping of attachment data. Optional.
- `--skip-package-data`: Skip dumping of package data. Optional.
- `--skip-log`: Skip dumping of log data. Optional.
- `--skip-index`: Skip dumping of Bleve indexer data. Optional. Applies only for bleve.
- `--database`, `-d`: Specify the database SQL syntax. Optional (supported arguments: sqlite3, mysql, mssql, postgres).
- `--verbose`, `-V`: If provided, shows additional details. Optional.
- `--type`: Set the dump output format. Optional. (formats: zip, tar, tar.sz, tar.gz, tar.xz, tar.bz2, tar.br, tar.lz4, tar.zst default: zip).
- Examples:
- `gitea dump`
- `gitea dump --verbose`
### generate
Generates random values and tokens for usage in configuration file. Useful for generating values
for automatic deployments.
- Commands:
- `secret`:
- Options:
- `INTERNAL_TOKEN`: Token used for an internal API call authentication.
- `JWT_SECRET`: LFS & OAUTH2 JWT authentication secret (LFS_JWT_SECRET is aliased to this option for backwards compatibility).
- `SECRET_KEY`: Global secret key.
- Examples:
- `gitea generate secret INTERNAL_TOKEN`
- `gitea generate secret JWT_SECRET`
- `gitea generate secret SECRET_KEY`
### keys
Provides an SSHD AuthorizedKeysCommand. Needs to be configured in the sshd config file:
```ini
# The value of -e and the AuthorizedKeysCommandUser should match the
# username running Gitea
AuthorizedKeysCommandUser git
AuthorizedKeysCommand /path/to/gitea keys -e git -u %u -t %t -k %k
```
The command will return the appropriate authorized_keys line for the
provided key. You should also set the value
`SSH_CREATE_AUTHORIZED_KEYS_FILE=false` in the `[server]` section of
`app.ini`.
:::note
opensshd requires the Gitea program to be owned by root and not
writable by group or others. The program must be specified by an absolute
path.
Gitea must be running for this command to succeed.
:::
### migrate
Migrates the database. This command can be used to run other commands before starting the server for the first time.
This command is idempotent.
### doctor check
Diagnose and potentially fix problems with the current Gitea instance.
Several checks are run by default, but additional ones can be run:
- `gitea doctor check --list` - will list all the available checks
- `gitea doctor check --all` - will run all available checks
- `gitea doctor check --default` - will run the default checks
- `gitea doctor check --run [check(s),]...` - will run the named checks
Some problems can be automatically fixed by passing the `--fix` option.
Extra logging can be set with `--log-file=...`.
#### doctor recreate-table
Sometimes when there are migrations the old columns and default values may be left
unchanged in the database schema. This may lead to warning such as:
```log
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
```
You can cause Gitea to recreate these tables and copy the old data into the new table
with the defaults set appropriately by using:
```bash
gitea doctor recreate-table user
```
You can ask Gitea to recreate multiple tables using:
```bash
gitea doctor recreate-table table1 table2 ...
```
And if you would like Gitea to recreate all tables simply call:
```bash
gitea doctor recreate-table
```
It is highly recommended to back-up your database before running these commands.
### doctor convert
Converts a MySQL database from utf8 to utf8mb4 or a MSSQL database from varchar to nvarchar.
### manager
Manage running server operations:
- Commands:
- `shutdown`: Gracefully shutdown the running process
- `restart`: Gracefully restart the running process - (not implemented for windows servers)
- `flush-queues`: Flush queues in the running process
- Options:
- `--timeout value`: Timeout for the flushing process (default: 1m0s)
- `--non-blocking`: Set to true to not wait for flush to complete before returning
- `logging`: Adjust logging commands
- Commands:
- `pause`: Pause logging
- Notes:
- The logging level will be raised to INFO temporarily if it is below this level.
- Gitea will buffer logs up to a certain point and will drop them after that point.
- `resume`: Resume logging
- `release-and-reopen`: Cause Gitea to release and re-open files and connections used for logging (Equivalent to sending SIGUSR1 to Gitea.)
- `remove name`: Remove the named logger
- Options:
- `--group group`, `-g group`: Set the group to remove the sublogger from. (defaults to `default`)
- `add`: Add a logger
- Commands:
- `console`: Add a console logger
- Options:
- `--group value`, `-g value`: Group to add logger to - will default to "default"
- `--name value`, `-n value`: Name of the new logger - will default to mode
- `--level value`, `-l value`: Logging level for the new logger
- `--stacktrace-level value`, `-L value`: Stacktrace logging level
- `--flags value`, `-F value`: Flags for the logger
- `--expression value`, `-e value`: Matching expression for the logger
- `--prefix value`, `-p value`: Prefix for the logger
- `--color`: Use color in the logs
- `--stderr`: Output console logs to stderr - only relevant for console
- `file`: Add a file logger
- Options:
- `--group value`, `-g value`: Group to add logger to - will default to "default"
- `--name value`, `-n value`: Name of the new logger - will default to mode
- `--level value`, `-l value`: Logging level for the new logger
- `--stacktrace-level value`, `-L value`: Stacktrace logging level
- `--flags value`, `-F value`: Flags for the logger
- `--expression value`, `-e value`: Matching expression for the logger
- `--prefix value`, `-p value`: Prefix for the logger
- `--color`: Use color in the logs
- `--filename value`, `-f value`: Filename for the logger -
- `--rotate`, `-r`: Rotate logs
- `--max-size value`, `-s value`: Maximum size in bytes before rotation
- `--daily`, `-d`: Rotate logs daily
- `--max-days value`, `-D value`: Maximum number of daily logs to keep
- `--compress`, `-z`: Compress rotated logs
- `--compression-level value`, `-Z value`: Compression level to use
- `conn`: Add a network connection logger
- Options:
- `--group value`, `-g value`: Group to add logger to - will default to "default"
- `--name value`, `-n value`: Name of the new logger - will default to mode
- `--level value`, `-l value`: Logging level for the new logger
- `--stacktrace-level value`, `-L value`: Stacktrace logging level
- `--flags value`, `-F value`: Flags for the logger
- `--expression value`, `-e value`: Matching expression for the logger
- `--prefix value`, `-p value`: Prefix for the logger
- `--color`: Use color in the logs
- `--reconnect-on-message`, `-R`: Reconnect to host for every message
- `--reconnect`, `-r`: Reconnect to host when connection is dropped
- `--protocol value`, `-P value`: Set protocol to use: tcp, unix, or udp (defaults to tcp)
- `--address value`, `-a value`: Host address and port to connect to (defaults to :7020)
- `smtp`: Add an SMTP logger
- Options:
- `--group value`, `-g value`: Group to add logger to - will default to "default"
- `--name value`, `-n value`: Name of the new logger - will default to mode
- `--level value`, `-l value`: Logging level for the new logger
- `--stacktrace-level value`, `-L value`: Stacktrace logging level
- `--flags value`, `-F value`: Flags for the logger
- `--expression value`, `-e value`: Matching expression for the logger
- `--prefix value`, `-p value`: Prefix for the logger
- `--color`: Use color in the logs
- `--username value`, `-u value`: Mail server username
- `--password value`, `-P value`: Mail server password
- `--host value`, `-H value`: Mail server host (defaults to: 127.0.0.1:25)
- `--send-to value`, `-s value`: Email address(es) to send to
- `--subject value`, `-S value`: Subject header of sent emails
- `processes`: Display Gitea processes and goroutine information
- Options:
- `--flat`: Show processes as flat table rather than as tree
- `--no-system`: Do not show system processes
- `--stacktraces`: Show stacktraces for goroutines associated with processes
- `--json`: Output as json
- `--cancel PID`: Send cancel to process with PID. (Only for non-system processes.)
### dump-repo
Dump-repo dumps repository data from Git/GitHub/Gitea/GitLab:
- Options:
- `--git_service service` : Git service, it could be `git`, `github`, `gitea`, `gitlab`, If clone_addr could be recognized, this could be ignored.
- `--repo_dir dir`, `-r dir`: Repository dir path to store the data
- `--clone_addr addr`: The URL will be clone, currently could be a git/github/gitea/gitlab http/https URL. i.e. https://github.com/lunny/tango.git
- `--auth_username lunny`: The username to visit the clone_addr
- `--auth_password <password>`: The password to visit the clone_addr
- `--auth_token <token>`: The personal token to visit the clone_addr
- `--owner_name lunny`: The data will be stored on a directory with owner name if not empty
- `--repo_name tango`: The data will be stored on a directory with repository name if not empty
- `--units <units>`: Which items will be migrated, one or more units should be separated as comma. wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.
### restore-repo
Restore-repo restore repository data from disk dir:
- Options:
- `--repo_dir dir`, `-r dir`: Repository dir path to restore from
- `--owner_name lunny`: Restore destination owner name
- `--repo_name tango`: Restore destination repository name
- `--units <units>`: Which items will be restored, one or more units should be separated as comma. wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.
### actions generate-runner-token
Generate a new token for a runner to use to register with the server
- Options:
- `--scope {owner}[/{repo}]`, `-s {owner}[/{repo}]`: To limit the scope of the runner, no scope means the runner can be used for all repos, but you can also limit it to a specific repo or owner
To register a global runner:
```bash
gitea actions generate-runner-token
```
To register a runner for a specific organization, in this case `org`:
```bash
gitea actions generate-runner-token -s org
```
To register a runner for a specific repo, in this case `username/test-repo`:
```bash
gitea actions generate-runner-token -s username/test-repo
```

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,514 @@
---
date: "2017-04-15T14:56:00+02:00"
slug: "customizing-gitea"
sidebar_position: 100
aliases:
- /en-us/customizing-gitea
---
# Customizing Gitea
Customizing Gitea is typically done using the `CustomPath` folder - by default this is
the `custom` folder from the working directory (WorkPath), but may be different if your [installation](../installation/from-binary.md) has
set this differently. This is the central place to override configuration settings,
templates, etc. You can check the `CustomPath` using `gitea help`. You can also find
the path on the _Configuration_ tab in the _Site Administration_ page. You can override
the `CustomPath` by setting either the `GITEA_CUSTOM` environment variable or by
using the `--custom-path` option on the `gitea` binary. (The option will override the
environment variable.)
If Gitea is deployed from binary, all default paths will be relative to the Gitea
binary. If installed from a distribution, these paths will likely be modified to
the Linux Filesystem Standard. Gitea will attempt to create required folders, including
`custom/`. Distributions may provide a symlink for `custom` using `/etc/gitea/`.
Application settings can be found in file `CustomConf` which is by default,
`$GITEA_CUSTOM/conf/app.ini` but may be different if your [installation](../installation/from-binary.md) has set this differently.
Again `gitea help` will allow you review this variable and you can override it using the
`--config` option on the `gitea` binary.
- [Quick Cheat Sheet](../administration/config-cheat-sheet.md)
- [Complete List](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini)
If the `CustomPath` folder can't be found despite checking `gitea help`, check the `GITEA_CUSTOM`
environment variable; this can be used to override the default path to something else.
`GITEA_CUSTOM` might, for example, be set by an init script. You can check whether the value
is set under the "Configuration" tab on the site administration page.
- [List of Environment Variables](../administration/environment-variables.md)
:::note
Gitea must perform a full restart to see configuration changes.
:::
## Serving custom public files
To make Gitea serve custom public files (like pages and images), use the folder
`$GITEA_CUSTOM/public/` as the webroot. Symbolic links will be followed.
At the moment, only the following files are served:
- `public/robots.txt`
- files in the `public/.well-known/` folder
- files in the `public/assets/` folder
For example, a file `image.png` stored in `$GITEA_CUSTOM/public/assets/`, can be accessed with
the url `http://gitea.domain.tld/assets/image.png`.
## Changing the logo
To build a custom logo and/or favicon clone the Gitea source repository, replace `assets/logo.svg` and/or `assets/favicon.svg` and run
`make generate-images`. `assets/favicon.svg` is used for the favicon only. This will update below output files which you can then place in `$GITEA_CUSTOM/public/assets/img` on your server:
- `public/assets/img/logo.svg` - Used for site icon, app icon
- `public/assets/img/logo.png` - Used for Open Graph
- `public/assets/img/avatar_default.png` - Used as the default avatar image
- `public/assets/img/apple-touch-icon.png` - Used on iOS devices for bookmarks
- `public/assets/img/favicon.svg` - Used for favicon
- `public/assets/img/favicon.png` - Used as fallback for browsers that don't support SVG favicons
In case the source image is not in vector format, you can attempt to convert a raster image using tools like [this](https://www.aconvert.com/image/png-to-svg/).
## Customizing Gitea pages and resources
Gitea's executable contains all the resources required to run: templates, images, style-sheets
and translations. Any of them can be overridden by placing a replacement in a matching path
inside the `custom` directory. For example, to replace the default `.gitignore` provided
for C++ repositories, we want to replace `options/gitignore/C++`. To do this, a replacement
must be placed in `$GITEA_CUSTOM/options/gitignore/C++` (see about the location of the `CustomPath`
directory at the top of this document).
Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://pkg.go.dev/html/template),
which can be modified by placing replacements below the `$GITEA_CUSTOM/templates` directory.
To obtain any embedded file (including templates), the [`gitea embedded` tool](../administration/cmd-embedded.md) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using).
Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and
shouldn't be touched without fully understanding these components.
### Customizing startpage / homepage
Copy [`home.tmpl`](https://github.com/go-gitea/gitea/blob/main/templates/home.tmpl) for your version of Gitea from `templates` to `$GITEA_CUSTOM/templates`.
Edit as you wish.
Dont forget to restart your Gitea to apply the changes.
### Adding links and tabs
If all you want is to add extra links to the top navigation bar or footer, or extra tabs to the repository view, you can put them in `extra_links.tmpl` (links added to the navbar), `extra_links_footer.tmpl` (links added to the left side of footer), and `extra_tabs.tmpl` inside your `$GITEA_CUSTOM/templates/custom/` directory.
For instance, let's say you are in Germany and must add the famously legally-required "Impressum"/about page, listing who is responsible for the site's content:
just place it under your "$GITEA_CUSTOM/public/assets/" directory (for instance `$GITEA_CUSTOM/public/assets/impressum.html`) and put a link to it in either `$GITEA_CUSTOM/templates/custom/extra_links.tmpl` or `$GITEA_CUSTOM/templates/custom/extra_links_footer.tmpl`.
To match the current style, the link should have the class name "item", and you can use `{{AppSubUrl}}` to get the base URL:
`<a class="item" href="{{AppSubUrl}}/assets/impressum.html">Impressum</a>`
For more information, see [Adding Legal Pages](../administration/adding-legal-pages.md).
You can add new tabs in the same way, putting them in `extra_tabs.tmpl`.
The exact HTML needed to match the style of other tabs is in the file
`templates/repo/header.tmpl`
([source in GitHub](https://github.com/go-gitea/gitea/blob/main/templates/repo/header.tmpl))
### Other additions to the page
Apart from `extra_links.tmpl` and `extra_tabs.tmpl`, there are other useful templates you can put in your `$GITEA_CUSTOM/templates/custom/` directory:
- `header.tmpl`, just before the end of the `<head>` tag where you can add custom CSS files for instance.
- `body_outer_pre.tmpl`, right after the start of `<body>`.
- `body_inner_pre.tmpl`, before the top navigation bar, but already inside the main container `<div class="full height">`.
- `body_inner_post.tmpl`, before the end of the main container.
- `body_outer_post.tmpl`, before the bottom `<footer>` element.
- `footer.tmpl`, right before the end of the `<body>` tag, a good place for additional JavaScript.
### Using Gitea variables
It's possible to use various Gitea variables in your custom templates.
First, _temporarily_ enable development mode: in your `app.ini` change from `RUN_MODE = prod` to `RUN_MODE = dev`. Then add `{{ $ | DumpVar }}` to any of your templates, restart Gitea and refresh that page; that will dump all available variables.
Find the data that you need, and use the corresponding variable; for example, if you need the name of the repository then you'd use `{{.Repository.Name}}`.
If you need to transform that data somehow, and aren't familiar with Go, an easy workaround is to add the data to the DOM and add a small JavaScript script block to manipulate the data.
### Example: PlantUML
You can add [PlantUML](https://plantuml.com/) support to Gitea's markdown by using a PlantUML server.
The data is encoded and sent to the PlantUML server which generates the picture. There is an online
demo server at http://www.plantuml.com/plantuml, but if you (or your users) have sensitive data you
can set up your own [PlantUML server](https://plantuml.com/server) instead. To set up PlantUML rendering,
copy JavaScript files from https://gitea.com/davidsvantesson/plantuml-code-highlight and put them in your
`$GITEA_CUSTOM/public/assets/` folder. Then add the following to `custom/footer.tmpl`:
```html
<script>
$(async () => {
if (!$('.language-plantuml').length) return;
await Promise.all([
$.getScript('https://your-gitea-server.com/assets/deflate.js'),
$.getScript('https://your-gitea-server.com/assets/encode.js'),
$.getScript('https://your-gitea-server.com/assets/plantuml_codeblock_parse.js'),
]);
// Replace call with address to your plantuml server
parsePlantumlCodeBlocks("https://www.plantuml.com/plantuml");
});
</script>
```
You can then add blocks like the following to your markdown:
```plantuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
```
The script will detect tags with `class="language-plantuml"`, but you can change this by providing a second argument to `parsePlantumlCodeBlocks`.
### Example: CAD Files Preview using Online 3D Viewer
You can implement CAD file preview inside your Gitea instance. This implemenation uses [`Online 3D Viewer`](https://github.com/kovacsv/Online3DViewer).
Supports following 3D file formats:
'3dm', '3ds', '3mf', 'amf', 'bim', 'brep', 'dae', 'fbx', 'fcstd', 'glb',
'gltf', 'ifc', 'igs', 'iges', 'stp', 'step', 'stl', 'obj', 'off', 'ply', 'wrl'
(Only v2 for .gltf files)
#### Part 1: Add template
In $GITEA_CUSTOM we need to add our template.
This template needs to be saved in "$GITEA_CUSTOM/templates/custom/".
Here create file "footer.tmpl" and add following text into it:
```
nano $GITEA_CUSTOM/templates/custom/footer.tmpl
```
```html
<script>
function onPageChange() {
// Supported 3D file types
const fileTypes = ['3dm', '3ds', '3mf', 'amf', 'bim', 'brep', 'dae', 'fbx', 'fcstd', 'glb', 'gltf', 'ifc', 'igs', 'iges', 'stp', 'step', 'stl', 'obj', 'off', 'ply', 'wrl'];
// Select matching link
const links = Array.from(document.querySelectorAll('a.ui.mini.basic.button'));
const link3D = links.find(link => {
const href = link.href.toLowerCase();
return href.includes('/raw/') && fileTypes.some(ext => href.endsWith(`.${ext}`));
});
if (link3D) {
const existingScript = document.querySelector('script[src="/assets/o3dv/o3dv.min.js"]');
const initializeViewer = () => {
const fileUrl = link3D.getAttribute('href');
const fileView = document.querySelector('.file-view');
if (!fileView) return;
// Remove only the old viewer container if it exists
const oldView3D = document.getElementById('view-3d');
if (oldView3D) {
oldView3D.remove(); // safely remove old viewer container div
} else {
// No #view-3d, so remove all children inside .file-view
while (fileView.firstChild) {
fileView.removeChild(fileView.firstChild);
}
}
// Create a new container for the viewer
const newView3D = document.createElement('div');
newView3D.id = 'view-3d';
newView3D.style.padding = '0';
newView3D.style.margin = '0';
newView3D.style.flexGrow = '1';
newView3D.style.minHeight = '0';
newView3D.style.width = '100%';
const header = document.querySelector('header');
const headerHeight = header ? header.offsetHeight : 0;
newView3D.style.height = `calc(100vh - ${headerHeight}px)`;
// Append the new container inside fileView
fileView.appendChild(newView3D);
const parentDiv = document.getElementById('view-3d');
if (parentDiv) {
const viewer = new OV.EmbeddedViewer(parentDiv, {
backgroundColor: new OV.RGBAColor(59, 68, 76, 0),
defaultColor: new OV.RGBColor(200, 200, 200),
edgeSettings: new OV.EdgeSettings(false, new OV.RGBColor(0, 0, 0), 1),
environmentSettings: new OV.EnvironmentSettings([
'/assets/o3dv/envmaps/fishermans_bastion/negx.jpg',
'/assets/o3dv/envmaps/fishermans_bastion/posx.jpg',
'/assets/o3dv/envmaps/fishermans_bastion/posy.jpg',
'/assets/o3dv/envmaps/fishermans_bastion/negy.jpg',
'/assets/o3dv/envmaps/fishermans_bastion/posz.jpg',
'/assets/o3dv/envmaps/fishermans_bastion/negz.jpg'
], false)
});
viewer.LoadModelFromUrlList([fileUrl]);
}
};
if (typeof OV === 'undefined') {
if (!existingScript) {
const script = document.createElement('script');
script.onload = initializeViewer;
script.src = '/assets/o3dv/o3dv.min.js';
document.head.appendChild(script);
} else {
// Script is loading but OV not yet ready — wait for it
existingScript.addEventListener('load', initializeViewer);
}
} else {
// OV already loaded
initializeViewer();
}
}
};
// Run when the page is fully loaded
document.addEventListener('DOMContentLoaded', onPageChange);
const targetSelector = 'a.ui.mini.basic.button[href*="/raw/"]';
let lastHref = null;
let timeoutId = null;
const checkAndRun = () => {
const rawLink = document.querySelector(targetSelector);
if (!rawLink) return;
const currentHref = rawLink.getAttribute('href');
if (currentHref !== lastHref) {
lastHref = currentHref;
const fileName = currentHref.split('/').pop();
console.log('New Raw file link detected after delay:', fileName);
onPageChange();
}
};
const observer = new MutationObserver(() => {
// Delay execution by 300ms after last mutation
clearTimeout(timeoutId);
timeoutId = setTimeout(checkAndRun, 300);
});
observer.observe(document.body, {
childList: true,
subtree: true,
});
</script>
```
#### Part 2: Add public files
Now we need to download latest version of O3DV. Go to "$GITEA_CUSTOM/public/assets/".
Create folder using (and cd into it):
```
mkdir o3dv
cd o3dv
```
Copy latest release zip link from [`GitHub`](https://github.com/kovacsv/Online3DViewer/releases) (v0.18.0 as of now).
Here use e.g. wget or curl to download the file:
```
wget https://github.com/kovacsv/Online3DViewer/releases/download/0.18.0/o3dv.zip
```
or
```
curl -L -O https://github.com/kovacsv/Online3DViewer/releases/download/0.18.0/o3dv.zip
```
Use e.g. unzip to unzip the archive:
```
unzip o3dv.zip
```
#### Part 3: Folder permissions
Now the last thing. Change permissions on the public folder:
```
chown -R git:git $GITEA_CUSTOM/public
```
Now we have everything ready! Restart your gitea instance to apply these changes and test it in your browser.
Sanity check. You should end-up with a folder structure similar to this:
```
$GITEA_CUSTOM/templates
-- custom
`-- footer.tmpl
$GITEA_CUSTOM/public/assets/
-- o3dv
|-- o3dv.zip
|-- o3dv.license.md
|-- o3dv.min.js
|-- envmaps
\...
```
## Customizing Gitea mails
The `$GITEA_CUSTOM/templates/mail` folder allows changing the body of every mail of Gitea.
Templates to override can be found in the
[`templates/mail`](https://github.com/go-gitea/gitea/tree/main/templates/mail)
directory of Gitea source.
Override by making a copy of the file under `$GITEA_CUSTOM/templates/mail` using a
full path structure matching source.
Any statement contained inside `{{` and `}}` are Gitea's template
syntax and shouldn't be touched without fully understanding these components.
## Adding Analytics to Gitea
Google Analytics, Matomo (previously Piwik), and other analytics services can be added to Gitea. To add the tracking code, refer to the `Other additions to the page` section of this document, and add the JavaScript to the `$GITEA_CUSTOM/templates/custom/header.tmpl` file.
## Customizing gitignores, labels, licenses, locales, and readmes
Place custom files in corresponding sub-folder under `custom/options`.
:::note
The files should not have a file extension, e.g. `Labels` rather than `Labels.txt`
:::
### gitignores
To add custom .gitignore, add a file with existing [.gitignore rules](https://git-scm.com/docs/gitignore) in it to `$GITEA_CUSTOM/options/gitignore`
## Customizing the git configuration
Starting with Gitea 1.20, you can customize the git configuration via the `git.config` section.
### Enabling signed git pushes
[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.certNonceSeed = <randomstring>
```
`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
Starting with Gitea 1.19, you can add a file that follows the [YAML label format](https://github.com/go-gitea/gitea/blob/main/options/label/Advanced.yaml) to `$GITEA_CUSTOM/options/label`:
```yaml
labels:
- name: "foo/bar" # name of the label that will appear in the dropdown
exclusive: true # whether to use the exclusive namespace for scoped labels. scoped delimiter is /
color: aabbcc # hex colour coding
description: Some label # long description of label intent
```
The [legacy file format](https://github.com/go-gitea/gitea/blob/main/options/label/Default) can still be used following the format below, however we strongly recommend using the newer YAML format instead.
`#hex-color label name ; label description`
For more information, see the [labels documentation](../usage/issues-prs/labels.md).
### Licenses
To add a custom license, add a file with the license text to `$GITEA_CUSTOM/options/license`
### Locales
Locales are managed via our [Crowdin](https://crowdin.com/project/gitea).
You can override a locale by placing an altered locale file in `$GITEA_CUSTOM/options/locale`.
Gitea's default locale files can be found in the [`options/locale`](https://github.com/go-gitea/gitea/tree/main/options/locale) source folder and these should be used as examples for your changes.
To add a completely new locale, as well as placing the file in the above location, you will need to add the new lang and name to the `[i18n]` section in your `app.ini`. Keep in mind that Gitea will use those settings as **overrides**, so if you want to keep the other languages as well you will need to copy/paste the default values and add your own to them.
```ini title="app.ini"
[i18n]
LANGS = en-US,foo-BAR
NAMES = English,FooBar
```
The first locale will be used as the default if user browser's language doesn't match any locale in the list.
Locales may change between versions, so keeping track of your customized locales is highly encouraged.
### Readmes
To add a custom Readme, add a markdown formatted file (without an `.md` extension) to `$GITEA_CUSTOM/options/readme`
:::note
Readme templates support **variable expansion**.
currently there are `{Name}` (name of repository), `{Description}`, `{CloneURL.SSH}`, `{CloneURL.HTTPS}` and `{OwnerName}`
:::
### Reactions
To change reaction emoji's you can set allowed reactions at app.ini
```ini title="app.ini"
[ui]
REACTIONS = +1, -1, laugh, confused, heart, hooray, eyes
```
A full list of supported emoji's is at [emoji list](https://gitea.com/gitea/gitea.com/issues/8)
## Customizing the look of Gitea
The built-in themes are `gitea-light`, `gitea-dark`, and `gitea-auto` (which automatically adapts to OS settings).
The default theme can be changed via `DEFAULT_THEME` in the [ui](../administration/config-cheat-sheet.md#ui-ui) section of `app.ini`.
Gitea also has support for user themes, which means every user can select which theme should be used.
The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](../administration/config-cheat-sheet.md#ui-ui) section of `app.ini`.
To make a custom theme available to all users:
1. Add a CSS file to `$GITEA_CUSTOM/public/assets/css/theme-<theme-name>.css`.
The value of `$GITEA_CUSTOM` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
2. Add `<theme-name>` to the comma-separated list of setting `THEMES` in `app.ini`, or leave `THEMES` empty to allow all themes.
A custom theme file named `theme-my-theme.css` will be displayed as `my-theme` on the user's theme selection page.
It could add theme meta information into the custom theme CSS file to provide more information about the theme.
If a custom theme is a dark theme, please set the global css variable `--is-dark-theme: true` in the `:root` block.
This allows Gitea to adjust the Monaco code editor's theme accordingly.
An "auto" theme could be implemented by using "theme-gitea-auto.css" as a reference.
```css
gitea-theme-meta-info {
--theme-display-name: "My Awesome Theme"; /* this theme will be display as "My Awesome Theme" on the UI */
}
:root {
--is-dark-theme: true; /* if it is a dark theme */
--color-primary: #112233;
/* more custom theme variables ... */
}
```
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).
The default theme sources can be found [here](https://github.com/go-gitea/gitea/blob/main/web_src/css/themes).
## Customizing fonts
Fonts can be customized using CSS variables:
```css
:root {
--fonts-proportional: /* custom proportional fonts */ !important;
--fonts-monospace: /* custom monospace fonts */ !important;
--fonts-emoji: /* custom emoji fonts */ !important;
}
```

View File

@@ -0,0 +1,120 @@
---
date: "2019-10-15T10:10:00+05:00"
slug: "email-setup"
sidebar_position: 12
aliases:
- /en-us/email-setup
---
# Email setup
Gitea has mailer functionality for sending transactional emails (such as registration confirmation). It can be configured to either use Sendmail (or compatible MTAs like Postfix and msmtp) or directly use SMTP server.
:::note
Be sure to set ENABLE_NOTIFY_MAIL=true to allow Gitea to send email notifications. Check the [Config Cheat Sheet](../administration/config-cheat-sheet.md#service-service) for details.
:::
## Using Sendmail
Use `sendmail` command as mailer.
:::note
For use in the official Gitea Docker image, please configure with the SMTP version (see the following section).
:::
:::note
For Internet-facing sites consult documentation of your MTA for instructions to send emails over TLS. Also set up SPF, DMARC, and DKIM DNS records to make emails sent be accepted as legitimate by various email providers.
:::
```ini title="app.ini"
[mailer]
ENABLED = true
FROM = gitea@mydomain.com
PROTOCOL = sendmail
SENDMAIL_PATH = /usr/sbin/sendmail
SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent an email address being interpreted as an option.
```
## Using SMTP
Directly use SMTP server as relay. This option is useful if you don't want to set up MTA on your instance but you have an account at email provider.
```ini title="app.ini"
[mailer]
ENABLED = true
FROM = gitea@mydomain.com
PROTOCOL = smtps
SMTP_ADDR = mail.mydomain.com
SMTP_PORT = 465
USER = gitea@mydomain.com
PASSWD = `password`
```
Restart Gitea for the configuration changes to take effect.
To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > Summary -> Mailer Configuration.
For the full list of options check the [Config Cheat Sheet](../administration/config-cheat-sheet.md)
:::note
Authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
:::
- STARTTLS (also known as Opportunistic TLS) via port 587 with `PROTOCOL=smtp+starttls`. Initial connection is done over cleartext, but then be upgraded over TLS if the server supports it.
- SMTPS connection (SMTP over TLS) via the default port 465. Connection to the server use TLS from the beginning.
- Forced SMTPS connection with `PROTOCOL=smtps`. (These are both known as Implicit TLS.)
This is due to protections imposed by the Go internal libraries against STRIPTLS attacks.
Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/rfc8314#section-3) since 2018.
### Gmail
The following configuration should work with GMail's SMTP server:
```ini title="app.ini"
[mailer]
ENABLED = true
HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0
SMTP_ADDR = smtp.gmail.com
SMTP_PORT = 465
FROM = example.user@gmail.com
USER = example.user
PASSWD = `***`
PROTOCOL = smtps
```
Note that you'll need to create and use an [App password](https://support.google.com/accounts/answer/185833?hl=en) by enabling 2FA on your Google
account. You won't be able to use your Google account password directly.
### ProtonMail
This feature is currently only available for select Proton for Business customers and those with Visionary and Family plans with custom domain addresses. See [ProtonMail's SMTP documentation](https://proton.me/support/smtp-submission) for more information. This limitation can be circumvented by using the ProtonMail Bridge application.
Note that emails sent using SMTP are not [end-to-end encrypted](https://proton.me/support/proton-mail-encryption-explained). However, theyre still stored with zero-access encryption like any other emails in your Proton Mail inbox.
The following configuration should work with ProtonMail's SMTP server:
1. In your browser (or desktop application), sign in to your Proton Mail account and select **Settings → All settings → Proton Mail → IMAP/SMTP → SMTP tokens**.
2. Click **Generate token**.
3. Enter the following details to create a new SMTP token:
- **Token name**: Select a name for your token. This is for your reference only and does not affect the token's functionality.
- **Email address**: Select one of your active custom domain addresses to pair with your token. Copy this email address and use it for the `FROM` and `USER` configuration in `app.ini`.
4. Click **Generate**.
5. Enter your Proton Mail Account password.
Your SMTP username and SMTP token (password) will be generated. You can now enter them as the `USER` and `PASSWD` in your `app.ini` configuration.
```ini title="app.ini"
[mailer]
ENABLED = true
FROM = example.user@customdomain.tld
PROTOCOL = smtp+starttls
SMTP_ADDR = smtp.protonmail.ch
SMTP_PORT = 587
USER = example.user@customdomain.tld
PASSWD = `TOKEN`
```
After closing the popup, you will not be able to see this SMTP token (password) again for security reasons. You can always generate more tokens if you need to rotate passwords.
Note: Your Proton Mail login or mailbox passwords will not work with SMTP

View File

@@ -1,18 +1,9 @@
---
date: "2017-04-08T11:34:00+02:00"
title: "Environment variables"
slug: "environment-variables"
sidebar_position: 10
toc: false
draft: false
aliases:
- /en-us/environment-variables
menu:
sidebar:
parent: "administration"
name: "Environment variables"
sidebar_position: 10
identifier: "environment-variables"
---
# Environment variables

View File

@@ -1,21 +1,12 @@
---
date: "2018-11-23:00:00+02:00"
title: "External renderers"
slug: "external-renderers"
sidebar_position: 60
toc: false
draft: false
aliases:
- /en-us/external-renderers
menu:
sidebar:
parent: "administration"
name: "External renderers"
sidebar_position: 60
identifier: "external-renderers"
---
# Custom files rendering configuration
# External renderers
Gitea supports custom file renderings (i.e., Jupyter notebooks, asciidoc, etc.) through external binaries,
it is just a matter of:
@@ -24,7 +15,7 @@ it is just a matter of:
- add some configuration to your `app.ini` file
- restart your Gitea instance
This supports rendering of whole files. If you want to render code blocks in markdown you would need to do something with javascript. See some examples on the [Customizing Gitea](administration/customizing-gitea.md) page.
This supports rendering of whole files. If you want to render code blocks in markdown you would need to do something with javascript. See some examples on the [Customizing Gitea](../administration/customizing-gitea.md) page.
## Installing external binaries
@@ -32,18 +23,16 @@ In order to get file rendering through external binaries, their associated packa
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
```docker
FROM gitea/gitea:@version@
FROM docker.gitea.com/gitea:@dockerVersion@
[...]
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 --global
# add above any other python package you may need to install
```

View File

@@ -0,0 +1,118 @@
---
date: "2018-05-11T11:00:00+02:00"
slug: "fail2ban-setup"
sidebar_position: 16
aliases:
- /en-us/fail2ban-setup
---
# Fail2ban Setup
**Remember that fail2ban is powerful and can cause lots of issues if you do it incorrectly, so make
sure to test this before relying on it so you don't lock yourself out.**
Gitea returns an HTTP 200 for bad logins in the web logs, but if you have logging options on in
`app.ini`, then you should be able to go off of `log/gitea.log`, which gives you something like this
on a bad authentication from the web or CLI using SSH or HTTP respectively:
```log
2018/04/26 18:15:54 [I] Failed authentication attempt for user from xxx.xxx.xxx.xxx
```
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:143:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:155:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:198:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:213:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:227:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:249:sshConnectionFailed() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
(From 1.15 this new message will available and doesn't have any of the false positive results that above messages from publicKeyHandler do. This will only be logged if the user has completely failed authentication.)
```log
2020/10/15 16:08:44 ...s/context/context.go:204:HandleText() [E] invalid credentials from xxx.xxx.xxx.xxx
```
Add our filter in `/etc/fail2ban/filter.d/gitea.local`:
```ini
# gitea.local
[Definition]
failregex = .*(Failed authentication attempt|invalid credentials|Attempted access of unknown user).* from <HOST>
ignoreregex =
```
Add our jail in `/etc/fail2ban/jail.d/gitea.local`:
```ini
[gitea]
enabled = true
filter = gitea
logpath = /var/lib/gitea/log/gitea.log
maxretry = 10
findtime = 3600
bantime = 900
action = iptables-allports
```
If you're using Docker, you'll also need to add an additional jail to handle the **FORWARD**
chain in **iptables**. Configure it in `/etc/fail2ban/jail.d/gitea-docker.local`:
```ini
[gitea-docker]
enabled = true
filter = gitea
logpath = /var/lib/gitea/log/gitea.log
maxretry = 10
findtime = 3600
bantime = 900
action = iptables-allports[chain="FORWARD"]
```
Then simply run `service fail2ban restart` to apply your changes. You can check to see if
fail2ban has accepted your configuration using `service fail2ban status`.
Make sure and read up on fail2ban and configure it to your needs, this bans someone
for **15 minutes** (from all ports) when they fail authentication 10 times in an hour.
If you run Gitea behind a reverse proxy with Nginx (for example with Docker), you need to add
this to your Nginx configuration so that IPs don't show up as 127.0.0.1:
```
proxy_set_header X-Real-IP $remote_addr;
```
The security options in `app.ini` need to be adjusted to allow the interpretation of the headers
as well as the list of IP addresses and networks that describe trusted proxy servers
(See the [configuration cheat sheet](../administration/config-cheat-sheet.md#security-security) for more information).
```
REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.1/8 ; 172.17.0.0/16 for the docker default network
```

View File

@@ -0,0 +1,43 @@
---
date: "2019-10-06T08:00:00+05:00"
slug: "git-lfs-setup"
sidebar_position: 12
aliases:
- /en-us/git-lfs-setup
---
# Git LFS setup
To use Gitea's built-in LFS support, you must update the `app.ini` file:
```ini
[server]
; Enables git-lfs support. true or false, default is false.
LFS_START_SERVER = true
[lfs]
; Where your lfs files reside, default is data/lfs.
PATH = /home/gitea/data/lfs
```
:::note
LFS server support needs at least Git v2.1.2 installed on the server
:::
# Git LFS Pure SSH protocol
The LFS Pure SSH protocol supports making LFS connections purely over SSH
(without having to expose an HTTP endpoint for the Gitea server).
Support for it can be enabled with the config option `server.LFS_ALLOW_PURE_SSH`:
```ini
[server]
LFS_ALLOW_PURE_SSH = true
```
:::note
The option is currently set to default false due to an open bug in the `git-lfs`
client that causes SSH transfers to hang: https://github.com/git-lfs/git-lfs/pull/5816
This can be worked around on all the client machines by setting the git config:
`git config --global lfs.ssh.automultiplex false`
:::

View File

@@ -0,0 +1,93 @@
---
date: "2018-06-02T11:00:00+02:00"
slug: "https-setup"
sidebar_position: 12
aliases:
- /en-us/https-setup
---
# HTTPS Setup
## Using the built-in server
Before you enable HTTPS, make sure that you have valid SSL/TLS certificates.
You could use self-generated certificates for evaluation and testing. Please run `gitea cert --host [HOST]` to generate a self signed certificate.
If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide](./reverse-proxies.md).
To use Gitea's built-in HTTPS support, you must change your `app.ini` file:
```ini
[server]
PROTOCOL = https
ROOT_URL = https://git.example.com:3000/
HTTP_PORT = 3000
CERT_FILE = cert.pem
KEY_FILE = key.pem
```
Note that if your certificate is signed by a third party certificate authority (i.e. not self-signed), then cert.pem should contain the certificate chain. The server certificate must be the first entry in cert.pem, followed by the intermediaries in order (if any). The root certificate does not have to be included because the connecting client must already have it in order to establish the trust relationship.
To learn more about the config values, please checkout the [Config Cheat Sheet](./config-cheat-sheet.md#server-server).
For the `CERT_FILE` or `KEY_FILE` field, the file path is relative to the `GITEA_CUSTOM` environment variable when it is a relative path. It can be an absolute path as well.
### Setting up HTTP redirection
The Gitea server is only able to listen to one port; to redirect HTTP requests to the HTTPS port, you will need to enable the HTTP redirection service:
```ini
[server]
REDIRECT_OTHER_PORT = true
; Port the redirection service should listen on
PORT_TO_REDIRECT = 3080
```
If you are using Docker, make sure that this port is configured in your `docker-compose.yml` file.
## Using ACME (Default: Let's Encrypt)
[ACME](https://tools.ietf.org/html/rfc8555) is a Certificate Authority standard protocol that allows you to automatically request and renew SSL/TLS certificates. [Let's Encrypt](https://letsencrypt.org/) is a free publicly trusted Certificate Authority server using this standard. Only `HTTP-01` and `TLS-ALPN-01` challenges are implemented. In order for ACME challenges to pass and verify your domain ownership, external traffic to the gitea domain on port `80` (`HTTP-01`) or port `443` (`TLS-ALPN-01`) has to be served by the gitea instance. Setting up [HTTP redirection](#setting-up-http-redirection) and port-forwards might be needed for external traffic to route correctly. Normal traffic to port `80` will otherwise be automatically redirected to HTTPS. **You must consent** to the ACME provider's terms of service (default Let's Encrypt's [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf)).
Minimum setup using the default Let's Encrypt:
```ini
[server]
PROTOCOL=https
DOMAIN=git.example.com
ENABLE_ACME=true
ACME_ACCEPTTOS=true
ACME_DIRECTORY=https
;; Email can be omitted here and provided manually at first run, after which it is cached
ACME_EMAIL=email@example.com
```
Minimum setup using a [smallstep CA](https://github.com/smallstep/certificates), refer to [their tutorial](https://smallstep.com/docs/tutorials/acme-challenge) for more information.
```ini
[server]
PROTOCOL=https
DOMAIN=git.example.com
ENABLE_ACME=true
ACME_ACCEPTTOS=true
ACME_URL=https://ca.example.com/acme/acme/directory
;; Can be omitted if using the system's trust is preferred
;ACME_CA_ROOT=/path/to/root_ca.crt
ACME_DIRECTORY=https
ACME_EMAIL=email@example.com
```
To learn more about the config values, please checkout the [Config Cheat Sheet](./config-cheat-sheet.md#server-server).
## Using a reverse proxy
Setup up your reverse proxy as shown in the [reverse proxy guide](../administration/reverse-proxies.md).
After that, enable HTTPS by following one of these guides:
- [nginx](https://nginx.org/en/docs/http/configuring_https_servers.html)
- [apache2/httpd](https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html)
- [caddy](https://caddyserver.com/docs/tls)
:::note
Enabling HTTPS only at the proxy level is referred as [TLS Termination Proxy](https://en.wikipedia.org/wiki/TLS_termination_proxy). The proxy server accepts incoming TLS connections, decrypts the contents, and passes the now unencrypted contents to Gitea. This is normally fine as long as both the proxy and Gitea instances are either on the same machine, or on different machines within private network (with the proxy is exposed to outside network). If your Gitea instance is separated from your proxy over a public network, or if you want full end-to-end encryption, you can also [enable HTTPS support directly in Gitea using built-in server](#using-the-built-in-server) and forward the connections over HTTPS instead.
:::

View File

@@ -0,0 +1,284 @@
---
date: "2019-04-02T17:06:00+01:00"
slug: "logging-config"
sidebar_position: 40
aliases:
- /en-us/logging-configuration
---
# Logging Configuration
The logging configuration of Gitea mainly consists of 3 types of components:
- The `[log]` section for general configuration
- `[log.<mode-name>]` sections for the configuration of different log writers to output logs, aka: "writer mode", the mode name is also used as "writer name".
- The `[log]` section can also contain sub-logger configurations following the key schema `logger.<logger-name>.<CONFIG-KEY>`
There is a fully functional log output by default, so it is not necessary to define one.
## Collecting Logs for Help
To collect logs for help and issue report, see [Support Options](help/support.md).
## The `[log]` section
Configuration of logging facilities in Gitea happen in the `[log]` section and its subsections.
In the top level `[log]` section the following configurations can be placed:
- `ROOT_PATH`: (Default: **%(GITEA_WORK_DIR)/log**): Base path for log files
- `MODE`: (Default: **console**) List of log outputs to use for the Default logger.
- `LEVEL`: (Default: **Info**) Least severe log events to persist, case-insensitive. Possible values are: `Trace`, `Debug`, `Info`, `Warn`, `Error`, `Fatal`.
- `STACKTRACE_LEVEL`: (Default: **None**) For this and more severe events the stacktrace will be printed upon getting logged.
And it can contain the following sub-loggers:
- `logger.router.MODE`: (Default: **,**): List of log outputs to use for the Router logger.
- `logger.access.MODE`: (Default: **_empty_**) List of log outputs to use for the Access logger. By default, the access logger is disabled.
- `logger.xorm.MODE`: (Default: **,**) List of log outputs to use for the XORM logger.
Setting a comma (`,`) to sub-logger's mode means making it use the default global `MODE`.
## Quick samples
### Default (empty) Configuration
The empty configuration is equivalent to default:
```ini
[log]
ROOT_PATH = %(GITEA_WORK_DIR)/log
MODE = console
LEVEL = Info
STACKTRACE_LEVEL = None
logger.router.MODE = ,
logger.xorm.MODE = ,
logger.access.MODE =
; this is the config options of "console" mode (used by MODE=console above)
[log.console]
MODE = console
FLAGS = stdflags
PREFIX =
COLORIZE = true
```
This is equivalent to sending all logs to the console, with default Golang log being sent to the console log too.
This is only a sample, and it is the default, do not need to write it into your configuration file.
### Disable Router logs and record some access logs to file
The Router logger is disabled, the access logs (>=Warn) goes into `access.log`:
```ini
[log]
logger.router.MODE =
logger.access.MODE = access-file
[log.access-file]
MODE = file
LEVEL = Warn
FILE_NAME = access.log
```
### Set different log levels for different modes
Default logs (>=Warn) goes into `gitea.log`, while Error logs goes into `file-error.log`:
```ini
[log]
LEVEL = Warn
MODE = file, file-error
; by default, the "file" mode will record logs to %(log.ROOT_PATH)/gitea.log, so we don't need to set it
; [log.file]
; by default, the MODE (actually it's the output writer of this logger) is taken from the section name, so we don't need to set it either
; MODE = file
[log.file-error]
MODE = file
LEVEL = Error
FILE_NAME = file-error.log
```
## Log outputs (mode and writer)
Gitea provides the following log output writers:
- `console` - Log to `stdout` (or `stderr` if it is set in the config)
- `file` - Log to a file
- `conn` - Log to a socket (network or unix)
### Common configuration
Certain configuration is common to all modes of log output:
- `MODE` is the mode of the log output writer. It will default to the mode name in the ini section. Thus `[log.console]` will default to `MODE = console`.
- `LEVEL` is the lowest level that this output will log.
- `STACKTRACE_LEVEL` is the lowest level that this output will print a stacktrace.
- `COLORIZE` will default to `true` for `console` as described, otherwise it will default to `false`.
#### `EXPRESSION`
`EXPRESSION` represents a regular expression that log events must match to be logged by the output writer.
Either the log message, (with colors removed), must match or the `longfilename:linenumber:functionname` must match.
NB: the whole message or string doesn't need to completely match.
Please note this expression will be run in the writer's goroutine but not the logging event goroutine.
#### `FLAGS`
`FLAGS` represents the preceding logging context information that is
printed before each message. It is a comma-separated string set. The order of values does not matter.
It defaults to `stdflags` (= `date,time,medfile,shortfuncname,levelinitial`)
Possible values are:
- `none` or `,` - No flags.
- `date` - the date in the local time zone: `2009/01/23`.
- `time` - the time in the local time zone: `01:23:23`.
- `microseconds` - microsecond resolution: `01:23:23.123123`. Assumes time.
- `longfile` - full file name and line number: `/a/b/c/d.go:23`.
- `shortfile` - final file name element and line number: `d.go:23`.
- `funcname` - function name of the caller: `runtime.Caller()`.
- `shortfuncname` - last part of the function name. Overrides `funcname`.
- `utc` - if date or time is set, use UTC rather than the local time zone.
- `levelinitial` - initial character of the provided level in brackets eg. `[I]` for info.
- `level` - level in brackets `[INFO]`.
- `gopid` - the Goroutine-PID of the context.
- `medfile` - last 20 characters of the filename - equivalent to `shortfile,longfile`.
- `stdflags` - equivalent to `date,time,medfile,shortfuncname,levelinitial`.
### Console mode
In this mode the logger will forward log messages to the stdout and
stderr streams attached to the Gitea process.
For loggers in console mode, `COLORIZE` will default to `true` if not
on windows, or the Windows terminal can be set into ANSI mode or is a
cygwin or Msys pipe.
Settings:
- `STDERR`: **false**: Whether the logger should print to `stderr` instead of `stdout`.
### File mode
In this mode the logger will save log messages to a file.
Settings:
- `FILE_NAME`: The file to write the log events to, relative to `ROOT_PATH`, Default to `%(ROOT_PATH)/gitea.log`. Exception: access log will default to `%(ROOT_PATH)/access.log`.
- `MAX_SIZE_SHIFT`: **28**: Maximum size shift of a single file. 28 represents 256Mb. For details see below.
- `LOG_ROTATE` **true**: Whether to rotate the log files. TODO: if false, will it delete instead on daily rotate, or do nothing?.
- `DAILY_ROTATE`: **true**: Whether to rotate logs daily.
- `MAX_DAYS`: **7**: Delete rotated log files after this number of days.
- `COMPRESS`: **true**: Whether to compress old log files by default with gzip.
- `COMPRESSION_LEVEL`: **-1**: Compression level. For details see below.
`MAX_SIZE_SHIFT` defines the maximum size of a file by left shifting 1 the given number of times (`1 << x`).
The exact behavior at the time of v1.17.3 can be seen [here](https://github.com/go-gitea/gitea/blob/v1.17.3/modules/setting/log.go#L185).
The useful values of `COMPRESSION_LEVEL` are from 1 (best speed) to 9 (best compression). [DefaultCompression](https://pkg.go.dev/compress/gzip#pkg-constants) (-1) and [HuffmanOnly](https://pkg.go.dev/compress/flate#HuffmanOnly) (-2) can also be chosen.
Beware that better compression might come with higher resource usage.
### Conn mode
In this mode the logger will send log messages over a network socket.
Settings:
- `ADDR`: **:7020**: Sets the address to connect to.
- `PROTOCOL`: **tcp**: Set the protocol, either "tcp", "unix" or "udp".
- `RECONNECT`: **false**: Try to reconnect when connection is lost.
- `RECONNECT_ON_MSG`: **false**: Reconnect host for every single message.
### The "Router" logger
The Router logger logs the following message types when Gitea's route handlers work:
- `started` messages will be logged at TRACE level
- `polling`/`completed` routers will be logged at INFO. Exception: "/assets" static resource requests are also logged at TRACE.
- `slow` routers will be logged at WARN
- `failed` routers will be logged at WARN
### The "XORM" logger
To make XORM outputs SQL logs, the `LOG_SQL` in `[database]` section should also be set to `true`.
### The "Access" logger
The Access logger is a new logger since Gitea 1.9. It provides a NCSA
Common Log compliant log format. It's highly configurable but caution
should be taken when changing its template. The main benefit of this
logger is that Gitea can now log accesses in a standard log format so
standard tools may be used.
You can enable this logger using `logger.access.MODE = ...`.
If desired the format of the Access logger can be changed by changing
the value of the `ACCESS_LOG_TEMPLATE`.
Please note, the access logger will log at `INFO` level, setting the
`LEVEL` of this logger to `WARN` or above will result in no access logs.
#### The ACCESS_LOG_TEMPLATE
This value represents a go template. Its default value is
```tmpl
{{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}" "{{.Ctx.Req.UserAgent}}"`
```
The template is passed following options:
- `Ctx` is the `context.Context`
- `Identity` is the `SignedUserName` or `"-"` if the user is not logged in
- `Start` is the start time of the request
- `ResponseWriter` is the `http.ResponseWriter`
Caution must be taken when changing this template as it runs outside of
the standard panic recovery trap. The template should also be as simple
as it runs for every request.
## Releasing-and-Reopening, Pausing and Resuming logging
If you are running on Unix you may wish to release-and-reopen logs in order to use `logrotate` or other tools.
It is possible force Gitea to release and reopen it's logging files and connections by sending `SIGUSR1` to the
running process, or running `gitea manager logging release-and-reopen`.
Alternatively, you may wish to pause and resume logging - this can be accomplished through the use of the
`gitea manager logging pause` and `gitea manager logging resume` commands. Please note that whilst logging
is paused log events below INFO level will not be stored and only a limited number of events will be stored.
Logging may block, albeit temporarily, slowing Gitea considerably whilst paused - therefore it is
recommended that pausing only done for a very short period of time.
## Adding and removing logging whilst Gitea is running
It is possible to add and remove logging whilst Gitea is running using the `gitea manager logging add` and `remove` subcommands.
This functionality can only adjust running log systems and cannot be used to start the access or router loggers if they
were not already initialized. If you wish to start these systems you are advised to adjust the app.ini and (gracefully) restart
the Gitea service.
The main intention of these commands is to easily add a temporary logger to investigate problems on running systems where a restart
may cause the issue to disappear.
## Using `logrotate` instead of built-in log rotation
Gitea includes built-in log rotation, which should be enough for most deployments. However, if you instead want to use the `logrotate` utility:
- Disable built-in log rotation by setting `LOG_ROTATE` to `false` in your `app.ini`.
- Install `logrotate`.
- Configure `logrotate` to match your deployment requirements, see `man 8 logrotate` for configuration syntax details.
In the `postrotate/endscript` block send Gitea a `USR1` signal via `kill -USR1` or `kill -10` to the `gitea` process itself,
or run `gitea manager logging release-and-reopen` (with the appropriate environment).
Ensure that your configurations apply to all files emitted by Gitea loggers as described in the above sections.
- Always do `logrotate /etc/logrotate.conf --debug` to test your configurations.
- If you are using docker and are running from outside the container you can use
`docker exec -u $OS_USER $CONTAINER_NAME sh -c 'gitea manager logging release-and-reopen'`
or `docker exec $CONTAINER_NAME sh -c '/bin/s6-svc -1 /etc/s6/gitea/'` or send `USR1` directly to the Gitea process itself.
The next `logrotate` jobs will include your configurations, so no restart is needed.
You can also immediately reload `logrotate` with `logrotate /etc/logrotate.conf --force`.

View File

@@ -0,0 +1,268 @@
---
date: "2019-10-23T17:00:00-03:00"
slug: "mail-templates"
sidebar_position: 45
aliases:
- /en-us/mail-templates
---
# Mail templates
To craft the e-mail subject and contents for certain operations, Gitea can be customized by using templates. The templates
for these functions are located under the [`custom` directory](../administration/customizing-gitea.md).
Gitea has an internal template that serves as default in case there's no custom alternative.
Custom templates are loaded when Gitea starts. Changes made to them are not recognized until Gitea is restarted again.
## Mail notifications supporting templates
Currently, the following notification events make use of templates:
| Action name | Usage |
| ----------- | ------------------------------------------------------------------------------------------------------------ |
| `new` | A new issue or pull request was created. |
| `comment` | A new comment was created in an existing issue or pull request. |
| `close` | An issue or pull request was closed. |
| `reopen` | An issue or pull request was reopened. |
| `review` | The head comment of a review in a pull request. |
| `approve` | The head comment of a approving review for a pull request. |
| `reject` | The head comment of a review requesting changes for a pull request. |
| `code` | A single comment on the code of a pull request. |
| `assigned` | User was assigned to an issue or pull request. |
| `default` | Any action not included in the above categories, or when the corresponding category template is not present. |
The path for the template of a particular message type is:
```sh
custom/templates/mail/{action type}/{action name}.tmpl
```
Where `{action type}` is one of `issue` or `pull` (for pull requests), and `{action name}` is one of the names listed above.
For example, the specific template for a mail regarding a comment in a pull request is:
```sh
custom/templates/mail/pull/comment.tmpl
```
However, creating templates for each and every action type/name combination is not required.
A fallback system is used to choose the appropriate template for an event. The _first existing_
template on this list is used:
- The specific template for the desired **action type** and **action name**.
- The template for action type `issue` and the desired **action name**.
- The template for the desired **action type**, action name `default`.
- The template for action type `issue`, action name `default`.
The only mandatory template is action type `issue`, action name `default`, which is already embedded in Gitea
unless it's overridden by the user in the `custom` directory.
## Template syntax
Mail templates are UTF-8 encoded text files that need to follow one of the following formats:
```
Text and macros for the subject line
------------
Text and macros for the mail body
```
or
```
Text and macros for the mail body
```
Specifying a _subject_ section is optional (and therefore also the dash line separator). When used, the separator between
_subject_ and _mail body_ templates requires at least three dashes; no other characters are allowed in the separator line.
_Subject_ and _mail body_ are parsed by [Golang's template engine](https://go.dev/pkg/text/template/) and
are provided with a _metadata context_ assembled for each notification. The context contains the following elements:
| Name | Type | Available | Usage |
| ------------------ | ---------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.FallbackSubject` | string | Always | A default subject line. See Below. |
| `.Subject` | string | Only in body | The _subject_, once resolved. |
| `.Body` | string | Always | The message of the issue, pull request or comment, parsed from Markdown into HTML and sanitized. Do not confuse with the _mail body_. |
| `.Link` | string | Always | The address of the originating issue, pull request or comment. |
| `.Issue` | models.Issue | Always | The issue (or pull request) originating the notification. To get data specific to a pull request (e.g. `HasMerged`), `.Issue.PullRequest` can be used, but care should be taken as this field will be `nil` if the issue is _not_ a pull request. |
| `.Comment` | models.Comment | If applicable | If the notification is from a comment added to an issue or pull request, this will contain the information about the comment. |
| `.IsPull` | bool | Always | `true` if the mail notification is associated with a pull request (i.e. `.Issue.PullRequest` is not `nil`). |
| `.Repo` | string | Always | Name of the repository, including owner name (e.g. `mike/stuff`) |
| `.User` | models.User | Always | Owner of the repository from which the event originated. To get the user name (e.g. `mike`),`.User.Name` can be used. |
| `.Doer` | models.User | Always | User that executed the action triggering the notification event. To get the user name (e.g. `rhonda`), `.Doer.Name` can be used. |
| `.IsMention` | bool | Always | `true` if this notification was only generated because the user was mentioned in the comment, while not being subscribed to the source. It will be `false` if the recipient was subscribed to the issue or repository. |
| `.SubjectPrefix` | string | Always | `Re: ` if the notification is about other than issue or pull request creation; otherwise an empty string. |
| `.ActionType` | string | Always | `"issue"` or `"pull"`. Will correspond to the actual _action type_ independently of which template was selected. |
| `.ActionName` | string | Always | It will be one of the action types described above (`new`, `comment`, etc.), and will correspond to the actual _action name_ independently of which template was selected. |
| `.ReviewComments` | []models.Comment | Always | List of code comments in a review. The comment text will be in `.RenderedContent` and the referenced code will be in `.Patch`. |
All names are case sensitive.
### The _subject_ part of the template
The template engine used for the mail _subject_ is golang's [`text/template`](https://go.dev/pkg/text/template/).
Please refer to the linked documentation for details about its syntax.
The _subject_ is built using the following steps:
- A template is selected according to the type of notification and to what templates are present.
- The template is parsed and resolved (e.g. `{{.Issue.Index}}` is converted to the number of the issue
or pull request).
- All space-like characters (e.g. `TAB`, `LF`, etc.) are converted to normal spaces.
- All leading, trailing and redundant spaces are removed.
- The string is truncated to its first 256 runes (characters).
If the end result is an empty string, **or** no subject template was available (i.e. the selected template
did not include a subject part), Gitea's **internal default** will be used.
The internal default (fallback) subject is the equivalent of:
```sh
{{.SubjectPrefix}}[{{.Repo}}] {{.Issue.Title}} (#{{.Issue.Index}})
```
For example: `Re: [mike/stuff] New color palette (#38)`
Gitea's default subject can also be found in the template _metadata_ as `.FallbackSubject` from any of
the two templates, even if a valid subject template is present.
### The _mail body_ part of the template
The template engine used for the _mail body_ is golang's [`html/template`](https://go.dev/pkg/html/template/).
Please refer to the linked documentation for details about its syntax.
The _mail body_ is parsed after the mail subject, so there is an additional _metadata_ field which is
the actual rendered subject, after all considerations.
The expected result is HTML (including structural elements like`<html>`, `<body>`, etc.). Styling
through `<style>` blocks, `class` and `style` attributes is possible. However, `html/template`
does some [automatic escaping](https://go.dev/pkg/html/template/#hdr-Contexts) that should be considered.
Attachments (such as images or external style sheets) are not supported. However, other templates can
be referenced too, for example to provide the contents of a `<style>` element in a centralized fashion.
The external template must be placed under `custom/mail` and referenced relative to that directory.
For example, `custom/mail/styles/base.tmpl` can be included using `{{template styles/base}}`.
The mail is sent with `Content-Type: multipart/alternative`, so the body is sent in both HTML
and text formats. The latter is obtained by stripping the HTML markup.
## Troubleshooting
How a mail is rendered is directly dependent on the capabilities of the mail application. Many mail
clients don't even support HTML, so they show the text version included in the generated mail.
If the template fails to render, it will be noticed only at the moment the mail is sent.
A default subject is used if the subject template fails, and whatever was rendered successfully
from the _mail body_ is used, disregarding the rest.
Please check [Gitea's logs](../administration/logging-config.md) for error messages in case of trouble.
## Example
`custom/templates/mail/issue/default.tmpl`:
```html
[{{.Repo}}] @{{.Doer.Name}}
{{if eq .ActionName "new"}}
created
{{else if eq .ActionName "comment"}}
commented on
{{else if eq .ActionName "close"}}
closed
{{else if eq .ActionName "reopen"}}
reopened
{{else}}
updated
{{end}}
{{if eq .ActionType "issue"}}
issue
{{else}}
pull request
{{end}}
#{{.Issue.Index}}: {{.Issue.Title}}
------------
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title>
</head>
<body>
{{if .IsMention}}
<p>
You are receiving this because @{{.Doer.Name}} mentioned you.
</p>
{{end}}
<p>
<p>
<a href="{{AppUrl}}/{{.Doer.LowerName}}">@{{.Doer.Name}}</a>
{{if not (eq .Doer.FullName "")}}
({{.Doer.FullName}})
{{end}}
{{if eq .ActionName "new"}}
created
{{else if eq .ActionName "close"}}
closed
{{else if eq .ActionName "reopen"}}
reopened
{{else}}
updated
{{end}}
<a href="{{.Link}}">{{.Repo}}#{{.Issue.Index}}</a>.
</p>
{{if not (eq .Body "")}}
<h3>Message content</h3>
<hr>
{{.Body}}
{{end}}
</p>
<hr>
<p>
<a href="{{.Link}}">View it on Gitea</a>.
</p>
</body>
</html>
```
This template produces something along these lines:
### Subject
> [mike/stuff] @rhonda commented on pull request #38: New color palette
### Mail body
> [@rhonda](#) (Rhonda Myers) updated [mike/stuff#38](#).
>
> #### Message content
>
> \_********************************\_********************************
>
> Mike, I think we should tone down the blues a little.
> \_********************************\_********************************
>
> [View it on Gitea](#).
## Advanced
The template system contains several functions that can be used to further process and format
the messages. Here's a list of some of them:
| Name | Parameters | Available | Usage |
| ---------------- | ----------- | --------- | ------------------------------------------------------------------- |
| `AppUrl` | - | Any | Gitea's URL |
| `AppName` | - | Any | Set from `app.ini`, usually "Gitea" |
| `AppDomain` | - | Any | Gitea's host name |
| `EllipsisString` | string, int | Any | Truncates a string to the specified length; adds ellipsis as needed |
| `SanitizeHTML` | string | Body only | Sanitizes text by removing any dangerous HTML tags from it |
These are _functions_, not metadata, so they have to be used:
```html
Like this: {{SanitizeHTML "Escape<my>text"}}
Or this: {{"Escape<my>text" | SanitizeHTML}}
Or this: {{AppUrl}}
But not like this: {{.AppUrl}}
```

View File

@@ -1,18 +1,9 @@
---
date: "2019-09-06T01:35:00-03:00"
title: "Repository indexer"
slug: "repo-indexer"
sidebar_position: 45
toc: false
draft: false
aliases:
- /en-us/repo-indexer
menu:
sidebar:
parent: "administration"
name: "Repository indexer"
sidebar_position: 45
identifier: "repo-indexer"
---
# Repository indexer
@@ -25,7 +16,7 @@ Better code search support could be achieved by setting up the repository indexe
## Setting up the repository indexer
Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](administration/config-cheat-sheet.md):
Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](../administration/config-cheat-sheet.md):
```ini
[indexer]

View File

@@ -0,0 +1,448 @@
---
date: "2018-05-22T11:00:00+00:00"
slug: "reverse-proxies"
sidebar_position: 16
aliases:
- /en-us/reverse-proxies
---
# 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-Forwarded-Proto` headers are correctly passed to Gitea to make Gitea see the real URL being visited.
5. Make sure your webserver has a certificate, including all intermediate and RootCA certificates, for `git clone` and `git pull` to work.
### 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`.
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 {
...
location / {
client_max_body_size 512M;
proxy_pass http://localhost:3000;
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;
}
}
```
## 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
into the `http` section of `nginx.conf`:
```nginx
server {
...
location ~ ^/(gitea|v2)($|/) {
client_max_body_size 512M;
# make nginx use unescaped URI, keep "%2F" as-is, remove the "/gitea" sub-path prefix, pass "/v2" as-is.
rewrite ^ $request_uri;
rewrite ^/(gitea($|/))?(.*) /$3 break;
proxy_pass http://127.0.0.1:3000$uri;
# other common HTTP headers, see the "Nginx" config section above
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/gitea/` correctly in your configuration.
## Nginx and serve static resources directly
We can tune the performance in splitting requests into categories static and dynamic.
CSS files, JavaScript files, images and web fonts are static content.
The front page, a repository view or issue list is dynamic content.
Nginx can serve static resources directly and proxy only the dynamic requests to Gitea.
Nginx is optimized for serving static content, while the proxying of large responses might be the opposite of that
(see [https://serverfault.com/q/587386](https://serverfault.com/q/587386)).
Download a snapshot of the Gitea source repository to `/path/to/gitea/`.
After this, run `make frontend` in the repository directory to generate the static resources. We are only interested in the `public/` directory for this task, so you can delete the rest.
(You will need to have [Node with npm](https://nodejs.org/en/download/) and `make` installed to generate the static resources)
Depending on the scale of your user base, you might want to split the traffic to two distinct servers,
or use a cdn for the static files.
### Single node and single domain
Set `[server] STATIC_URL_PREFIX = /_/static` in your configuration.
```nginx
server {
listen 80;
server_name git.example.com;
location /_/static/assets/ {
alias /path/to/gitea/public/;
}
location / {
proxy_pass http://localhost:3000;
}
}
```
### Two nodes and two domains
Set `[server] STATIC_URL_PREFIX = http://cdn.example.com/gitea` in your configuration.
```nginx
# application server running Gitea
server {
listen 80;
server_name git.example.com;
location / {
proxy_pass http://localhost:3000;
}
}
```
```nginx
# static content delivery server
server {
listen 80;
server_name cdn.example.com;
location /gitea/ {
alias /path/to/gitea/public/;
}
location / {
return 404;
}
}
```
## Nginx Proxy Manager
If you are using Nginx Proxy Manager to serve your Gitea instance it differs slighly from the raw Nginx.
It is [adding some directives](https://github.com/NginxProxyManager/nginx-proxy-manager/blob/master/docker/rootfs/etc/nginx/conf.d/include/proxy.conf) for a custom location by default, so you have to skip these from the above mentioned Nginx config. Otherwise Nginx will produce `400 bad request` error due to duplicated directives (`proxy_set_header Host $host` is the particularly problematic one).
So while creating the `/` Custom location, just add the following lines to it's configuration:
```nginx
client_max_body_size 512M;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
```
## Apache HTTPD
If you want Apache HTTPD to serve your Gitea instance, you can add the following to your Apache HTTPD configuration (usually located at `/etc/apache2/httpd.conf` in Ubuntu):
```apacheconf
<VirtualHost *:80>
...
ProxyPreserveHost On
ProxyRequests off
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:3000/ nocanon
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>
```
:::note
The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
:::
If you wish to use Let's Encrypt with webroot validation, add the line `ProxyPass /.well-known !` before `ProxyPass` to disable proxying these requests to Gitea.
## Apache HTTPD with a sub-path
In case you already have a site, and you want Gitea to share the domain name, you can setup Apache HTTPD to serve Gitea under a sub-path by adding the following to you Apache HTTPD configuration (usually located at `/etc/apache2/httpd.conf` in Ubuntu):
```apacheconf
<VirtualHost *:80>
...
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
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}
</VirtualHost>
```
Then you **MUST** set something like `[server] ROOT_URL = http://git.example.com/git/` correctly in your configuration.
:::note
The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
:::
## Apache HTTPD and serve static resources directly
We can tune the performance in splitting requests into categories static and dynamic.
CSS files, JavaScript files, images and web fonts are static content.
The front page, a repository view or issue list is dynamic content.
Apache HTTPD can serve static resources directly and proxy only the dynamic requests to Gitea.
Download a snapshot of the Gitea source repository to `/path/to/gitea/`.
After this, run `make frontend` in the repository directory to generate the static resources. We are only interested in the `public/` directory for this task, so you can delete the rest.
(You will need to have [Node with npm](https://nodejs.org/en/download/) and `make` installed to generate the static resources)
Depending on the scale of your user base, you might want to split the traffic to two distinct servers,
or use a cdn for the static files.
### Single node and single domain
Set `[server] STATIC_URL_PREFIX = /_/static` in your configuration.
```apacheconf
<VirtualHost *:80>
...
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass /_/static/ !
Alias /_/static/ /path/to/gitea/public/
<Directory /path/to/gitea/public/>
Options FollowSymlinks
AllowOverride None
Require all granted
</Directory>
AllowEncodedSlashes NoDecode
# Note: no trailing slash after either /git or port
ProxyPass / http://localhost:3000/ nocanon
ProxyPreserveHost On
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>
```
## Caddy
If you want Caddy to serve your Gitea instance, you can add the following server block to your Caddyfile:
```
git.example.com {
reverse_proxy localhost:3000
}
```
## Caddy with a sub-path
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:
```
git.example.com {
route /git/* {
uri strip_prefix /git
reverse_proxy localhost:3000
}
}
```
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
## IIS
If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite as reverse proxy.
1. Setup an empty website in IIS, named let's say, `Gitea Proxy`.
2. Follow the first two steps in [Microsoft's Technical Community Guide to Setup IIS with URL Rewrite](https://techcommunity.microsoft.com/t5/iis-support-blog/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world/ba-p/846222#M343). That is:
- Install Application Request Routing (ARR for short) either by using the Microsoft Web Platform Installer 5.1 (WebPI) or downloading the extension from [IIS.net](https://www.iis.net/downloads/microsoft/application-request-routing)
- Once the module is installed in IIS, you will see a new Icon in the IIS Administration Console called URL Rewrite.
- Open the IIS Manager Console and click on the `Gitea Proxy` Website from the tree view on the left. Select and double click the URL Rewrite Icon from the middle pane to load the URL Rewrite interface.
- Choose the `Add Rule` action from the right pane of the management console and select the `Reverse Proxy Rule` from the `Inbound and Outbound Rules` category.
- In the Inbound Rules section, set the server name to be the host that Gitea is running on with its port. e.g. if you are running Gitea on the localhost with port 3000, the following should work: `127.0.0.1:3000`
- Enable SSL Offloading
- In the Outbound Rules, ensure `Rewrite the domain names of the links in HTTP response` is set and set the `From:` field as above and the `To:` to your external hostname, say: `git.example.com`
- Now edit the `web.config` for your website to match the following: (changing `127.0.0.1:3000` and `git.example.com` as appropriate)
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<httpRuntime requestPathInvalidCharacters="" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<hiddenSegments>
<clear />
</hiddenSegments>
<denyUrlSequences>
<clear />
</denyUrlSequences>
<fileExtensions allowUnlisted="true">
<clear />
</fileExtensions>
</requestFiltering>
</security>
<rewrite>
<rules useOriginalURLEncoding="false">
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://127.0.0.1:3000{UNENCODED_URL}" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="HTTP_ACCEPT_ENCODING" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<!-- set the pattern correctly here - if you only want to accept http or https -->
<!-- change the pattern and the action value as appropriate -->
<match filterByTags="A, Form, Img" pattern="^http(s)?://127.0.0.1:3000/(.*)" />
<action type="Rewrite" value="http{R:1}://git.example.com/{R:2}" />
</rule>
<rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
<match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
<action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
<preCondition name="NeedsRestoringAcceptEncoding">
<add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<urlCompression doDynamicCompression="true" />
<handlers>
<clear />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
</handlers>
<!-- Map all extensions to the same MIME type, so all files can be
downloaded. -->
<staticContent>
<clear />
<mimeMap fileExtension="*" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
</configuration>
```
## HAProxy
If you want HAProxy to serve your Gitea instance, you can add the following to your HAProxy configuration
add an acl in the frontend section to redirect calls to gitea.example.com to the correct backend
```
frontend http-in
...
acl acl_gitea hdr(host) -i gitea.example.com
use_backend gitea if acl_gitea
...
```
add the previously defined backend section
```
backend gitea
server localhost:3000 check
```
If you redirect the http content to https, the configuration work the same way, just remember that the connection between HAProxy and Gitea will be done via http so you do not have to enable https in Gitea's configuration.
## HAProxy with a sub-path
In case you already have a site, and you want Gitea to share the domain name, you can setup HAProxy to serve Gitea under a sub-path by adding the following to you HAProxy configuration:
```
frontend http-in
...
acl acl_gitea path_beg /gitea
use_backend gitea if acl_gitea
...
```
With that configuration http://example.com/gitea/ will redirect to your Gitea instance.
then for the backend section
```
backend gitea
http-request replace-path /gitea\/?(.*) \/\1
server localhost:3000 check
```
The added http-request will automatically add a trailing slash if needed and internally remove /gitea from the path to allow it to work correctly with Gitea by setting properly http://example.com/gitea as the root.
Then you **MUST** set something like `[server] ROOT_URL = http://example.com/gitea/` correctly in your configuration.
## Traefik
If you want traefik to serve your Gitea instance, you can add the following label section to your `docker-compose.yaml` (Assuming the provider is docker).
```yaml
gitea:
image: docker.io/gitea/gitea
...
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`example.com`)"
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
```
This config assumes that you are handling HTTPS on the traefik side and using HTTP between Gitea and traefik.
## Traefik with a sub-path
In case you already have a site, and you want Gitea to share the domain name, you can setup Traefik to serve Gitea under a sub-path by adding the following to your `docker-compose.yaml` (Assuming the provider is docker) :
```yaml
gitea:
image: docker.io/gitea/gitea
...
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`example.com`) && PathPrefix(`/gitea`)"
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
- "traefik.http.middlewares.gitea-stripprefix.stripprefix.prefixes=/gitea"
- "traefik.http.routers.gitea.middlewares=gitea-stripprefix"
```
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.

View File

@@ -1,21 +1,12 @@
---
date: "2019-12-31T13:55:00+05:00"
title: "Search Engines Indexation"
slug: "search-engines-indexation"
sidebar_position: 60
toc: false
draft: false
aliases:
- /en-us/search-engines-indexation
menu:
sidebar:
parent: "administration"
name: "Search Engines Indexation"
sidebar_position: 60
identifier: "search-engines-indexation"
---
# Search engines indexation of your Gitea installation
# Search Engines Indexation
By default your Gitea installation will be indexed by search engines.
If you don't want your repository to be visible for search engines read further.
@@ -23,7 +14,7 @@ If you don't want your repository to be visible for search engines read further.
## Block search engines indexation using robots.txt
To make Gitea serve a custom `robots.txt` (default: empty 404) for top level installations,
create a file with path `public/robots.txt` in the [`custom` folder or `CustomPath`](administration/customizing-gitea.md)
create a file with path `public/robots.txt` in the [`custom` folder or `CustomPath`](../administration/customizing-gitea.md)
Examples on how to configure the `robots.txt` can be found at [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt).

View File

@@ -0,0 +1,212 @@
---
date: "2019-08-17T10:20:00+01:00"
slug: "signing"
sidebar_position: 50
aliases:
- /en-us/signing
---
# GPG/SSH Commit Signatures
Gitea will verify gpg/ssh commit signatures in the provided tree by
checking if the commits are signed by a key within the Gitea database,
or if the commit matches the default key for Git.
Additionally Gitea will verify commits signed by ssh keys, which public keys are part of [`TRUSTED_SSH_KEYS`](#general-configuration).
Keys are not checked to determine if they have expired or revoked.
Keys are also not checked with keyservers.
A commit will be marked with a grey unlocked icon if no key can be
found to verify it. If a commit is marked with a red unlocked icon,
it is reported to be signed with a key with an id.
:::note
The signer of a commit does not have to be an author or
committer of a commit.
:::
## Automatic Signing
There are a number of places where Gitea will generate commits itself:
- Repository Initialisation
- Wiki Changes
- CRUD actions using the editor or the API
- Merges from Pull Requests
Depending on configuration and server trust you may want Gitea to
sign these commits.
## Installing and generating a GPG key for Gitea
It is up to a server administrator to determine how best to install
a signing key. Gitea generates all its commits using the server `git`
command at present - and therefore the server `gpg` will be used for
signing (if configured.) Administrators should review best-practices
for GPG - in particular it is probably advisable to only install a
signing secret subkey without the master signing and certifying secret
key.
## Installing and generating a SSH key for Gitea
You can run `ssh-keygen -t ed25519 -f gitea-signing-key` to generate the private/public keypair for commit signing without any password. Usually you would store the key next to the gitea configuration, then point `SIGNING_KEY` to the generated public key `/path/to/gitea-signing-key.pub`. Gitea generates all its commits using the server `git` command at present - and therefore the server `ssh-keygen` will be used for
signing (if configured.)
## General Configuration
Gitea's configuration for signing can be found with the
`[repository.signing]` section of `app.ini`:
```ini
...
[repository.signing]
SIGNING_KEY = default
SIGNING_NAME =
SIGNING_EMAIL =
INITIAL_COMMIT = always
CRUD_ACTIONS = pubkey, twofa, parentsigned
WIKI = never
MERGES = pubkey, twofa, basesigned, commitssigned
...
```
---
For SSH commit signing, you need to specify the `SIGNING_FORMAT` to `ssh` instead of the default `openpgp`. `SIGNING_NAME` and `SIGNING_EMAIL` are required for verifing the signatures.
This looks like this:
```ini
...
[repository.signing]
SIGNING_KEY = /path/to/gitea-signing-key.pub
SIGNING_NAME =
SIGNING_EMAIL =
SIGNING_FORMAT = ssh
INITIAL_COMMIT = always
CRUD_ACTIONS = pubkey, twofa, parentsigned
WIKI = never
MERGES = pubkey, twofa, basesigned, commitssigned
...
```
- `/path/to/gitea-signing-key` is expected to be the private key for `/path/to/gitea-signing-key.pub` [see here how to generate a new ssh keypair](#installing-and-generating-a-ssh-key-for-gitea).
- `TRUSTED_SSH_KEYS = ssh-<algorithm> <key>` or `TRUSTED_SSH_KEYS = ssh-<algorithm> <key1>, ssh-<algorithm> <key2>` can be used for rotating the global ssh signing key to continue verifying commits signed by the previous keys.
### `SIGNING_KEY`
The first option to discuss is the `SIGNING_KEY`. There are three main
options:
- `none` - this prevents Gitea from signing any commits
- `default` - Gitea will default to the gpg key configured within `git config`
- `KEYID` - Gitea will sign commits with the gpg key with the ID
`KEYID`. In this case you should provide a `SIGNING_NAME` and
`SIGNING_EMAIL` to be displayed for this key.
- `/path/to/gitea-signing-key.pub` - Gitea will sign commits with the ssh key without the `.pub` suffix `/path/to/gitea-signing-key`. In this case you should provide a `SIGNING_NAME` and
`SIGNING_EMAIL` to be displayed for this key and set `SIGNING_FORMAT` to `ssh`.
The `default` option will interrogate `git config` for
`commit.gpgsign` option - if this is set, then it will use the results
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
By adjusting Git's `config` file within Gitea's
repositories, `SIGNING_KEY=default` could be used to provide different
signing keys on a per-repository basis. However, this is clearly not an
ideal UI and therefore subject to change.
:::warning
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/gitconfig`)
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location, otherwise Gitea will use the gpg keys only under `{[git].HOME_PATH}/.gnupg`.
:::
:::warning
The default option and repository specific signing keys are not supported for ssh keys
:::
### `INITIAL_COMMIT`
This option determines whether Gitea should sign the initial commit
when creating a repository. The possible values are:
- `never`: Never sign
- `pubkey`: Only sign if the user has a public key
- `twofa`: Only sign if the user logs in with two factor authentication
- `always`: Always sign
Options other than `never` and `always` can be combined as a comma
separated list. The commit will be signed if all selected options are true.
### `WIKI`
This options determines if Gitea should sign commits to the Wiki.
The possible values are:
- `never`: Never sign
- `pubkey`: Only sign if the user has a public key
- `twofa`: Only sign if the user logs in with two-factor authentication
- `parentsigned`: Only sign if the parent commit is signed.
- `always`: Always sign
Options other than `never` and `always` can be combined as a comma
separated list. The commit will be signed if all selected options are true.
### `CRUD_ACTIONS`
This option determines if Gitea should sign commits from the web
editor or API CRUD actions. The possible values are:
- `never`: Never sign
- `pubkey`: Only sign if the user has a public key
- `twofa`: Only sign if the user logs in with two-factor authentication
- `parentsigned`: Only sign if the parent commit is signed.
- `always`: Always sign
Options other than `never` and `always` can be combined as a comma
separated list. The change will be signed if all selected options are true.
### `MERGES`
This option determines if Gitea should sign merge commits from PRs.
The possible options are:
- `never`: Never sign
- `pubkey`: Only sign if the user has a public key
- `twofa`: Only sign if the user logs in with two-factor authentication
- `basesigned`: Only sign if the parent commit in the base repo is signed.
- `headsigned`: Only sign if the head commit in the head branch is signed.
- `commitssigned`: Only sign if all the commits in the head branch to the merge point are signed.
- `approved`: Only sign approved merges to a protected branch.
- `always`: Always sign
Options other than `never` and `always` can be combined as a comma
separated list. The merge will be signed if all selected options are true.
## Obtaining the Public Key of the Signing Key
The public key used to sign Gitea's commits can be obtained from the API at:
```sh
/api/v1/signing-key.gpg
```
In cases where there is a repository specific key this can be obtained from:
```sh
/api/v1/repos/:username/:reponame/signing-key.gpg
```
For ssh commit signing the default ssh public key can be obtained via the API at:
```sh
/api/v1/signing-key.pub
```

View File

@@ -0,0 +1,9 @@
{
"label": "Contributing",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/contributing",
"title": "Contributing"
}
}

View File

@@ -0,0 +1,76 @@
---
slug: "contributing"
sidebar_position: 1
---
# Contributing to Gitea
Thank you for your interest in contributing to Gitea! This guide will help you understand how to contribute to the project effectively.
## Getting Started
Before you start contributing, please read our [Hacking on Gitea](../development/hacking-on-gitea) guide to set up your development environment.
## Contribution Guidelines
We have specific guidelines for different types of contributions:
### Backend Development
If you're working on backend code (Go), please follow our [Guidelines for Backend Development](./guidelines-backend). This includes:
- Package design and dependencies
- Database operations and migrations
- Testing strategies
- Code organization
### Frontend Development
For frontend contributions (JavaScript, CSS, Vue), refer to our [Guidelines for Frontend Development](./guidelines-frontend). This covers:
- Framework usage (Vue3, Fomantic-UI)
- Code style and best practices
- Accessibility requirements
- TypeScript usage
### Refactoring
When refactoring existing code, follow our [Guidelines for Refactoring](./guidelines-refactoring) to ensure:
- Clear refactoring objectives
- Proper review process
- Maintaining backward compatibility
- Incremental improvements
### Localization
To contribute translations or localization improvements, see our [Localization Guide](./localization) which explains:
- How to contribute translations via Crowdin
- Supported languages
- Translation workflow
## Code of Conduct
Please be respectful and constructive in all interactions with the community. We are committed to providing a welcoming and inclusive environment for all contributors.
## Getting Help
If you need help with your contribution:
- Join our [Discord](https://discord.gg/gitea) #Develop channel
- Visit our [Forum](https://forum.gitea.com/)
- Check existing [GitHub Issues](https://github.com/go-gitea/gitea/issues)
## Submitting Your Contribution
1. Fork the repository
2. Create a feature branch
3. Make your changes following the relevant guidelines
4. Write tests for your changes
5. Ensure all tests pass
6. Submit a pull request
For more details, see our [CONTRIBUTING.md](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md) in the main repository.
Thank you for helping make Gitea better!

View File

@@ -0,0 +1,115 @@
---
date: "2021-11-01T23:41:00+08:00"
slug: "guidelines-backend"
sidebar_position: 20
aliases:
- /en-us/guidelines-backend
---
# Guidelines for Backend Development
## Background
Gitea uses Golang as the backend programming language. It uses many third-party packages and also write some itself.
For example, Gitea uses [Chi](https://github.com/go-chi/chi) as basic web framework. [Xorm](https://xorm.io) is an ORM framework that is used to interact with the database.
So it's very important to manage these packages. Please take the below guidelines before you start to write backend code.
## Package Design Guideline
### Packages List
To maintain understandable code and avoid circular dependencies it is important to have a good code structure. The Gitea backend is divided into the following parts:
- `build`: Scripts to help build Gitea.
- `cmd`: All Gitea actual sub commands includes web, doctor, serv, hooks, admin and etc. `web` will start the web service. `serv` and `hooks` will be invoked by Git or OpenSSH. Other sub commands could help to maintain Gitea.
- `tests`: Common test utility functions
- `tests/integration`: Integration tests, to test back-end regressions
- `tests/e2e`: E2e tests, to test front-end and back-end compatibility and visual regressions.
- `models`: Contains the data structures used by xorm to construct database tables. It also contains functions to query and update the database. Dependencies to other Gitea code should be avoided. You can make exceptions in cases such as logging.
- `models/db`: Basic database operations. All other `models/xxx` packages should depend on this package. The `GetEngine` function should only be invoked from `models/`.
- `models/fixtures`: Sample data used in unit tests and integration tests. One `yml` file means one table which will be loaded into database when beginning the tests.
- `models/migrations`: Stores database migrations between versions. PRs that change a database structure **MUST** also have a migration step.
- `modules`: Different modules to handle specific functionality in Gitea. Work in Progress: Some of them should be moved to `services`, in particular those that depend on models because they rely on the database.
- `modules/setting`: Store all system configurations read from ini files and has been referenced by everywhere. But they should be used as function parameters when possible.
- `modules/git`: Package to interactive with `Git` command line or Gogit package.
- `public`: Compiled frontend files (javascript, images, css, etc.)
- `routers`: Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) must not depend on routers.
- `routers/api` Contains routers for `/api/v1` aims to handle RESTful API requests.
- `routers/install` Could only respond when system is in INSTALL mode (INSTALL_LOCK=false).
- `routers/private` will only be invoked by internal sub commands, especially `serv` and `hooks`.
- `routers/web` will handle HTTP requests from web browsers or Git SMART HTTP protocols.
- `services`: Support functions for common routing operations or command executions. Uses `models` and `modules` to handle the requests.
- `templates`: Golang templates for generating the html output.
### Package Dependencies
Since Golang doesn't support import cycles, we have to decide the package dependencies carefully. There are some levels between those packages. Below is the ideal package dependencies direction.
`cmd` -> `routers` -> `services` -> `models` -> `modules`
From left to right, left packages could depend on right packages, but right packages MUST not depend on left packages. The sub packages on the same level could depend on according this level's rules.
:::warning
Why do we need database transactions outside of `models`? And how?
Some actions should allow for rollback when database record insertion/update/deletion failed.
So services must be allowed to create a database transaction. Here is some example,
```go
// services/repository/repository.go
func CreateXXXX() error {
return db.WithTx(func(ctx context.Context) error {
// do something, if err is returned, it will rollback automatically
if err := issues.UpdateIssue(ctx, repoID); err != nil {
// ...
return err
}
// ...
return nil
})
}
```
You should **not** use `db.GetEngine(ctx)` in `services` directly, but just write a function under `models/`.
If the function will be used in the transaction, just let `context.Context` as the function's first parameter.
```go
// models/issues/issue.go
func UpdateIssue(ctx context.Context, repoID int64) error {
e := db.GetEngine(ctx)
// ...
}
```
:::
### Package Name
For the top level package, use a plural as package name, i.e. `services`, `models`, for sub packages, use singular,
i.e. `services/user`, `models/repository`.
### Import Alias
Since there are some packages which use the same package name, it is possible that you find packages like `modules/user`, `models/user`, and `services/user`. When these packages are imported in one Go file, it's difficult to know which package we are using and if it's a variable name or an import name. So, we always recommend to use import aliases. To differ from package variables which are commonly in camelCase, just use **snake_case** for import aliases.
i.e. `import user_service "code.gitea.io/gitea/services/user"`
### Implementing `io.Closer`
If a type implements `io.Closer`, calling `Close` multiple times must not fail or `panic` but return an error or `nil`.
### Important Gotchas
- Never write `x.Update(exemplar)` without an explicit `WHERE` clause:
- This will cause all rows in the table to be updated with the non-zero values of the exemplar - including IDs.
- You should usually write `x.ID(id).Update(exemplar)`.
- If during a migration you are inserting into a table using `x.Insert(exemplar)` where the ID is preset:
- You will need to ``SET IDENTITY_INSERT `table` ON`` for the MSSQL variant (the migration will fail otherwise)
- However, you will also need to update the id sequence for postgres - the migration will silently pass here but later insertions will fail:
``SELECT setval('table_name_id_seq', COALESCE((SELECT MAX(id)+1 FROM `table_name`), 1), false)``
### Future Tasks
Currently, we are creating some refactors to do the following things:
- Correct that codes which doesn't follow the rules.
- There are too many files in `models`, so we are moving some of them into a sub package `models/xxx`.
- Some `modules` sub packages should be moved to `services` because they depend on `models`.

View File

@@ -0,0 +1,156 @@
---
date: "2021-10-13T16:00:00+02:00"
slug: "guidelines-frontend"
sidebar_position: 30
aliases:
- /en-us/guidelines-frontend
---
# Guidelines for Frontend Development
## Background
Gitea uses [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend.
The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template).
The source files can be found in the following directories:
* **CSS styles:** `web_src/css/`
* **JavaScript files:** `web_src/js/`
* **Vue components:** `web_src/js/components/`
* **Go HTML templates:** `templates/`
## General Guidelines
We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/htmlcssguide.html) and [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)
### Gitea specific guidelines
1. Every feature (Fomantic-UI/jQuery module) should be put in separate files/directories.
2. HTML ids and classes should use kebab-case, it's preferred to contain 2-3 feature related keywords.
3. HTML ids and classes used in JavaScript should be unique for the whole project, and should contain 2-3 feature related keywords. We recommend to use the `js-` prefix for classes that are only used in JavaScript.
4. CSS styling for classes provided by frameworks should not be overwritten. Always use new class names with 2-3 feature related keywords to overwrite framework styles. Gitea's helper CSS classes in `helpers.less` could be helpful.
5. The backend can pass complex data to the frontend by using `ctx.PageData["myModuleData"] = map[]{}`, but do not expose whole models to the frontend to avoid leaking sensitive data.
6. Simple pages and SEO-related pages use Go HTML Template render to generate static Fomantic-UI HTML output. Complex pages can use Vue3.
7. Clarify variable types, prefer `elem.disabled = true` instead of `elem.setAttribute('disabled', 'anything')`, prefer `$el.prop('checked', var === 'yes')` instead of `$el.prop('checked', var)`.
8. Use semantic elements, prefer `<button class="ui button">` instead of `<div class="ui button">`.
9. Avoid unnecessary `!important` in CSS, add comments to explain why it's necessary if it can't be avoided.
10. Avoid mixing different events in one event listener, prefer to use individual event listeners for every event.
11. Custom event names are recommended to use `ce-` prefix.
12. Prefer using Tailwind CSS which is available via `tw-` prefix, e.g. `tw-relative`. Gitea's helper CSS classes use `gt-` prefix (`gt-ellipsis`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`).
13. Avoid inline scripts & styles as much as possible, it's recommended to put JS code into JS files and use CSS classes. If inline scripts & styles are unavoidable, explain the reason why it can't be avoided.
### Accessibility / ARIA
In history, Gitea heavily uses Fomantic UI which is not an accessibility-friendly framework.
Gitea uses some patches to make Fomantic UI more accessible (see `aria.md` and related JS files),
but there are still many problems which need a lot of work and time to fix.
### Framework Usage
Mixing different frameworks together is discouraged, it makes the code difficult to be maintained.
A JavaScript module should follow one major framework and follow the framework's best practice.
Recommended implementations:
* Vue + Vanilla JS
* Fomantic-UI (jQuery)
* htmx (partial page reloads for otherwise static components)
* Vanilla JS
Discouraged implementations:
* Vue + Fomantic-UI (jQuery)
* jQuery + Vanilla JS
* htmx + any other framework which requires heavy JS code, or unnecessary features like htmx scripting (`hx-on`)
To make UI consistent, Vue components can use Fomantic-UI CSS classes.
We use htmx for simple interactions. You can see an example for simple interactions where htmx should be used in this [PR](https://github.com/go-gitea/gitea/pull/28908). Do not use htmx if you require more advanced reactivity, use another framework (Vue/Vanilla JS).
Although mixing different frameworks is discouraged,
it should also work if the mixing is necessary and the code is well-designed and maintainable.
### Typescript
Gitea is in the process of migrating to type-safe Typescript. Here are some specific guidelines regarding Typescript in the codebase:
#### Use type aliases instead of interfaces
Prefer to use type aliases because they can represent any type and are generally more flexible to use than interfaces.
#### Use separate type imports
We use `verbatimModuleSyntax` so type and non-type imports from the same file must be split into two `import type` statements. This enables the typescript compiler to completely eliminate the type import statements during compilation.
#### Use `@ts-expect-error` instead of `@ts-ignore`
Both annotations should be avoided, but if you have to use them, use `@ts-expect-error` because it will not leave ineffective statements after the issue is fixed.
### `async` Functions
Only mark a function as `async` if and only if there are `await` calls
or `Promise` returns inside the function.
It's not recommended to use `async` event listeners, which may lead to problems.
The reason is that the code after await is executed outside the event dispatch.
Reference: https://github.com/github/eslint-plugin-github/blob/main/docs/rules/async-preventdefault.md
If an event listener must be `async`, the `e.preventDefault()` should be before any `await`,
it's recommended to put it at the beginning of the function.
If we want to call an `async` function in a non-async context,
it's recommended to use `const _promise = asyncFoo()` to tell readers
that this is done by purpose, we want to call the async function and ignore the Promise.
Some lint rules and IDEs also have warnings if the returned Promise is not handled.
### Fetching data
To fetch data, use the wrapper functions `GET`, `POST` etc. from `modules/fetch.js`. They
accept a `data` option for the content, will automatically set CSRF token and return a
Promise for a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response).
### HTML Attributes and `dataset`
The usage of `dataset` is forbidden, its camel-casing behaviour makes it hard to grep for attributes.
However, there are still some special cases, so the current guideline is:
* For legacy code:
* `$.data()` should be refactored to `$.attr()`.
* `$.data()` can be used to bind some non-string data to elements in rare cases, but it is highly discouraged.
* For new code:
* `node.dataset` should not be used, use `node.getAttribute` instead.
* never bind any user data to a DOM node, use a suitable design pattern to describe the relation between node and data.
### Show/Hide Elements
* Vue components are recommended to use `v-if` and `v-show` to show/hide elements.
* Go template code should use `.tw-hidden` and `showElem()/hideElem()/toggleElem()`, see more details in `.tw-hidden`'s comment.
### Styles and Attributes in Go HTML Template
It's recommended to use:
```html
<div class="gt-name1 gt-name2 {{if .IsFoo}}gt-foo{{end}}" {{if .IsFoo}}data-foo{{end}}></div>
```
instead of:
```html
<div class="gt-name1 gt-name2{{if .IsFoo}} gt-foo{{end}}"{{if .IsFoo}} data-foo{{end}}></div>
```
to make the code more readable.
### Legacy Code
A lot of legacy code already existed before this document's written. It's recommended to refactor legacy code to follow the guidelines.
### Vue3 and JSX
Gitea is using Vue3 now. We decided not to introduce JSX to keep the HTML and the JavaScript code separated.
### UI Examples
Gitea uses some self-made UI elements and customizes others to integrate them better into the general UI approach. When running Gitea in development mode (`RUN_MODE=dev`), a page with some standardized UI examples is available under `http(s)://your-gitea-url:port/devtest`.

View File

@@ -1,18 +1,9 @@
---
date: "2023-02-14T00:00:00+00:00"
title: "Guidelines for Refactoring"
slug: "guidelines-refactoring"
sidebar_position: 40
toc: false
draft: false
aliases:
- /en-us/guidelines-refactoring
menu:
sidebar:
parent: "contributing"
name: "Guidelines for Refactoring"
sidebar_position: 40
identifier: "guidelines-refactoring"
---
# Guidelines for Refactoring

View File

@@ -1,18 +1,9 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Localization"
slug: "localization"
sidebar_position: 70
toc: false
draft: false
aliases:
- /en-us/localization
menu:
sidebar:
parent: "contributing"
name: "Localization"
sidebar_position: 70
identifier: "localization"
---
# Localization

View File

@@ -0,0 +1,9 @@
{
"label": "Development",
"position": 40,
"link": {
"type": "generated-index",
"slug": "/development",
"title": "Development"
}
}

View File

@@ -0,0 +1,163 @@
---
date: "2018-06-24:00:00+02:00"
slug: "api-usage"
sidebar_position: 40
aliases:
- /en-us/api-usage
---
# API Usage
## Enabling/configuring API access
By default, `ENABLE_SWAGGER` is true, and `MAX_RESPONSE_ITEMS` is set to 50. See [Config Cheat Sheet](../administration/config-cheat-sheet.md) for more information.
## Authentication
Gitea supports these methods of API authentication:
- HTTP basic authentication
- `token=...` parameter in URL query string
- `access_token=...` parameter in URL query string
- `Authorization: token ...` header in HTTP headers
- HTTP signatures using an SSH public key or SSH certificate
All of these methods accept the same API key token type. You can
better understand this by looking at the code -- as of this writing,
Gitea parses queries and headers to find the token in
[modules/auth/auth.go](https://github.com/go-gitea/gitea/blob/6efdcaed86565c91a3dc77631372a9cc45a58e89/modules/auth/auth.go#L47).
Gitea can also authenticate API requests using an SSH key or SSH certificate via
HTTP signatures. The SSH public key (or certificate) must be registered to the
user account in Gitea, and the client signs requests with the corresponding
private key. The client signs requests using the SSH private key following the
[draft-cavage-http-signatures](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures)
specification (not RFC 9421). The signature is sent in the `Signature` header,
and SSH certificates additionally include an `x-ssh-certificate` header. The
official [go-sdk](https://gitea.com/gitea/go-sdk) implements this flow if you
need a reference implementation.
## Generating and listing API tokens
API tokens can be created either in the user interface or via the API. Tokens have by default limited permissions and it is important to create tokens with the correct permissions for your task.
### User Interface
Tokens can be created via the `Manage Access Tokens` dialog, accessed via `User Settings` / `Applications` or via the link `gitea-domain.example/user/settings/applications`. The interface allows you to create tokens and manage their permissions via the `Select permissions` sub-menu.
Once created, the token is displayed in a toast message above the `Manage Access Tokens` dialog. Please note, that you can view this toast only once and it is not possible to redisplay the token for security reasons.
### Token API
A new token can be generated with a `POST` request to
`/users/:name/tokens`.
Note that `/users/:name/tokens` is a special endpoint and requires you
to authenticate using `BasicAuth` and a password, as follows:
```sh
$ curl -H "Content-Type: application/json" \
-d '{"name":"test_token","scopes":["read:activitypub","read:issue", "write:misc", "read:notification", "read:organization", "read:package", "read:repository", "read:user"]}' \
-u 'username:password' "https://gitea.your.host/api/v1/users/{username}/tokens"
{"id":1,"name":"test_token","sha1":"9fcb1158165773dd010fca5f0cf7174316c3e37d","token_last_eight":"16c3e37d"}
```
The ``sha1`` (the token) is only returned once and is not stored in
plain-text. It will not be displayed when listing tokens with a `GET`
request; e.g.
```sh
$ curl --url https://yourusername:password@gitea.your.host/api/v1/users/<username>/tokens
[{"name":"test","sha1":"","token_last_eight:"........":},{"name":"dev","sha1":"","token_last_eight":"........"}]
```
By default, this creates a token with very limited permissions. To complete your tasks, your token may require extra permissions. These permissions are created via the json variable `scopes`, which takes an array of permissions as strings. Eg.: `"scopes":["all"]`. Possible permissions, as reflected in the user interface are:
- `activitypub`
- `admin`
- `issue`
- `misc`
- `notification`
- `organization`
- `package`
- `repository`
- `user`
Each permission may be set to `read` or `write`. `write` implies both Read & Write. To set permissions you write the permissions string as `<read or write>:<permission name>`, eg.: `write:package` or `read:notification`. A properly formatted API call may look like:
```sh
$ curl -H "Content-Type: application/json" -d '{"name":"test", "scopes":["write:package", "read:notification"]}' -u username:password https://gitea.your.host/api/v1/users/<username>/tokens
```
Special permissions `all` may be specified as `"scopes":["all"]`, which sets all permissions to both Read & Write.
To use the API with basic authentication with two factor authentication
enabled, you'll need to send an additional header that contains the one
time password (6 digitrotating token).
An example of the header is `X-Gitea-OTP: 123456` where `123456`
is where you'd place the code from your authenticator.
Here is how the request would look like in curl:
```sh
$ curl -H "X-Gitea-OTP: 123456" --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens
```
You can also create an API key token via your Gitea installation's web
interface: `Settings | Applications | Generate New Token`.
## OAuth2 Provider
Access tokens obtained from Gitea's [OAuth2 provider](development/oauth2-provider.md) are accepted by these methods:
- `Authorization bearer ...` header in HTTP headers
- `token=...` parameter in URL query string
- `access_token=...` parameter in URL query string
### More on the `Authorization:` header
For historical reasons, Gitea needs the word `token` included before
the API key token in an authorization header, like this:
```sh
Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675
```
In a `curl` command, for instance, this would look like:
```sh
curl "http://localhost:4000/api/v1/repos/test1/test1/issues" \
-H "accept: application/json" \
-H "Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675" \
-H "Content-Type: application/json" -d "{ \"body\": \"testing\", \"title\": \"test 20\"}" -i
```
As mentioned above, the token used is the same one you would use in
the `token=` string in a GET request.
## Pagination
The API supports pagination. The `page` and `limit` parameters are used to specify the page number and the number of items per page. As well, the `Link` header is returned with the next, previous, and last page links if there are more than one pages. The `x-total-count` is also returned to indicate the total number of items.
```sh
curl -v "http://localhost/api/v1/repos/search?limit=1"
...
< link: <http://localhost/api/v1/repos/search?limit=1&page=2>; rel="next",<http://localhost/api/v1/repos/search?limit=1&page=5252>; rel="last"
...
< x-total-count: 5252
```
## API Guide
API Reference guide is auto-generated by swagger and available on:
`https://gitea.your.host/api/swagger`
or on the
[Gitea instance](https://gitea.com/api/swagger)
The OpenAPI document is at:
`https://gitea.your.host/swagger.v1.json`
## Sudo
The API allows admin users to sudo API requests as another user. Simply add either a `sudo=` parameter or `Sudo:` request header with the username of the user to sudo.
## SDKs
- [Official go-sdk](https://gitea.com/gitea/go-sdk)
- [more](https://gitea.com/gitea/awesome-gitea#user-content-sdk)

View File

@@ -0,0 +1,372 @@
---
date: "2016-12-01T16:00:00+02:00"
slug: "hacking-on-gitea"
sidebar_position: 10
aliases:
- /en-us/hacking-on-gitea
---
# Hacking on Gitea
## Quickstart
To get a quick working development environment you could use Gitpod.
[![Open in Gitpod](/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/go-gitea/gitea)
## Installing go
You should [install go](https://go.dev/doc/install) and set up your go
environment correctly.
Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
required to build the JavaScript and CSS files. The minimum supported Node.js
version is @minNodeVersion@ and the latest LTS version is recommended.
:::note
When executing make tasks that require external tools, like
`make watch-backend`, Gitea will automatically download and build these as
necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
on the executable path. If you don't add the go bin directory to the
executable path you will have to manage this yourself.
:::
:::note
Go version @minGoVersion@ or higher is required.
Gitea uses `gofmt` to format source code. However, the results of
`gofmt` can differ by the version of `go`. Therefore it is
recommended to install the version of Go that our continuous integration is
running. As of last update, the Go version should be @goVersion@.
:::
To lint the template files, ensure [Python](https://www.python.org/) and
[Poetry](https://python-poetry.org/) are installed.
## Installing Make
Gitea makes heavy use of Make to automate tasks and improve development. This
guide covers how to install Make.
### On Linux
Install with the package manager.
On Ubuntu/Debian:
```bash
sudo apt-get install make
```
On Fedora/RHEL/CentOS:
```bash
sudo yum install make
```
### On Windows
One of these three distributions of Make will run on Windows:
- [Single binary build](http://www.equation.com/servlet/equation.cmd?fa=make). Copy somewhere and add to `PATH`.
- [32-bits version](http://www.equation.com/ftpdir/make/32/make.exe)
- [64-bits version](http://www.equation.com/ftpdir/make/64/make.exe)
- [MinGW-w64](https://www.mingw-w64.org) / [MSYS2](https://www.msys2.org/).
- MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software, it includes MinGW-w64.
- In MingGW-w64, the binary is called `mingw32-make.exe` instead of `make.exe`. Add the `bin` folder to `PATH`.
- In MSYS2, you can use `make` directly. See [MSYS2 Porting](https://www.msys2.org/wiki/Porting/).
- To compile Gitea with CGO_ENABLED (eg: SQLite3), you might need to use [tdm-gcc](https://jmeubank.github.io/tdm-gcc/) instead of MSYS2 gcc, because MSYS2 gcc headers lack some Windows-only CRT functions like `_beginthread`.
- [Chocolatey package](https://chocolatey.org/packages/make). Run `choco install make`
:::note
If you are attempting to build using make with Windows Command Prompt, you may run into issues. The above prompts (Git bash, or MinGW) are recommended, however if you only have command prompt (or potentially PowerShell) you can set environment variables using the [set](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1) command, e.g. `set TAGS=bindata`.
:::
## Downloading and cloning the Gitea source code
The recommended method of obtaining the source code is by using `git clone`.
```bash
git clone https://github.com/go-gitea/gitea
```
(Since the advent of go modules, it is no longer necessary to build go projects
from within the `$GOPATH`, hence the `go get` approach is no longer recommended.)
## Forking Gitea
Download the main Gitea source code as above. Then, fork the
[Gitea repository](https://github.com/go-gitea/gitea) on GitHub,
and either switch the git remote origin for your fork or add your fork as another remote:
```bash
# Rename original Gitea origin to upstream
git remote rename origin upstream
git remote add origin "git@github.com:$GITHUB_USERNAME/gitea.git"
git fetch --all --prune
```
or:
```bash
# Add new remote for our fork
git remote add "$FORK_NAME" "git@github.com:$GITHUB_USERNAME/gitea.git"
git fetch --all --prune
```
To be able to create pull requests, the forked repository should be added as a remote
to the Gitea sources. Otherwise, changes can't be pushed.
## Building Gitea (Basic)
Take a look at our
[instructions](installation/from-source.md)
for [building from source](installation/from-source.md).
The simplest recommended way to build from source is:
```bash
TAGS="bindata sqlite sqlite_unlock_notify" make build
```
The `build` target will execute both `frontend` and `backend` sub-targets. If the `bindata` tag is present, the frontend files will be compiled into the binary. It is recommended to leave out the tag when doing frontend development so that changes will be reflected.
See `make help` for all available `make` targets. Also see [`.drone.yml`](https://github.com/go-gitea/gitea/blob/main/.drone.yml) to see how our continuous integration works.
## Building continuously
To run and continuously rebuild when source files change:
```bash
# for both frontend and backend
make watch
# or: watch frontend files (html/js/css) only
make watch-frontend
# or: watch backend files (go) only
make watch-backend
```
On macOS, watching all backend source files may hit the default open files limit which can be increased via `ulimit -n 12288` for the current shell or in your shell startup file for all future shells.
### Formatting, code analysis and spell check
Our continuous integration will reject PRs that fail the code linters (including format check, code analysis and spell check).
You should format your code:
```bash
make fmt
```
and lint the source code:
```bash
# lint both frontend and backend code
make lint
# lint only backend code
make lint-backend
```
**Note**: The results of `gofmt` are dependent on the version of `go` present.
You should run the same version of go that is on the continuous integration
server as mentioned above.
### Working on JS and CSS
Frontend development should follow [Guidelines for Frontend Development](../contributing/guidelines-frontend.md)
To build with frontend resources, either use the `watch-frontend` target mentioned above or just build once:
```bash
make build && ./gitea
```
Before committing, make sure the linters pass:
```bash
make lint-frontend
```
### Configuring local ElasticSearch instance
Start local ElasticSearch instance using docker:
```sh
mkdir -p $(pwd)/data/elasticsearch
sudo chown -R 1000:1000 $(pwd)/data/elasticsearch
docker run --rm --memory="4g" -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" -v "$(pwd)/data/elasticsearch:/usr/share/elasticsearch/data" docker.elastic.co/elasticsearch/elasticsearch:7.16.3
```
Configure `app.ini`:
```ini
[indexer]
ISSUE_INDEXER_TYPE = elasticsearch
ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
REPO_INDEXER_ENABLED = true
REPO_INDEXER_TYPE = elasticsearch
REPO_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
```
### Building and adding SVGs
SVG icons are built using the `make svg` target which compiles the icon sources into the output directory `public/assets/img/svg`. Custom icons can be added in the `web_src/svg` directory.
### Building the Logo
The PNG and SVG versions of the Gitea logo are built from a single SVG source file `assets/logo.svg` using the `TAGS="gitea" make generate-images` target. To run it, Node.js and npm must be available.
The same process can also be used to generate custom logo PNGs from a SVG source file by updating `assets/logo.svg` and running `make generate-images`. Omitting the `gitea` tag will update only the user-designated logo files.
### Updating the API
When creating new API routes or modifying existing API routes, you **MUST**
update and/or create [Swagger](https://swagger.io/docs/specification/2-0/what-is-swagger/)
documentation for these using [go-swagger](https://goswagger.io/) comments.
The structure of these comments is described in the [specification](https://goswagger.io/use/spec.html#annotation-syntax).
If you want more information about the Swagger structure, you can look at the
[Swagger 2.0 Documentation](https://swagger.io/docs/specification/2-0/basic-structure/)
or compare with a previous PR adding a new API endpoint, e.g. [PR #5483](https://github.com/go-gitea/gitea/pull/5843/files#diff-2e0a7b644cf31e1c8ef7d76b444fe3aaR20)
You should be careful not to break the API for downstream users which depend
on a stable API. In general, this means additions are acceptable, but deletions
or fundamental changes to the API will be rejected.
Once you have created or changed an API endpoint, please regenerate the Swagger
documentation using:
```bash
make generate-swagger
```
You should validate your generated Swagger file:
```bash
make swagger-validate
```
You should commit the changed swagger JSON file. The continuous integration
server will check that this has been done using:
```bash
make swagger-check
```
:::note
Please note you should use the Swagger 2.0 documentation, not the OpenAPI 3 documentation.
:::
### Creating new configuration options
When creating new configuration options, it is not enough to add them to the
`modules/setting` files. You should add information to `custom/conf/app.ini`
and to the
[configuration cheat sheet](../administration/config-cheat-sheet.md)
found in `docs/content/doc/administer/config-cheat-sheet.en-us.md`
### Changing the logo
When changing the Gitea logo SVG, you will need to run and commit the results
of:
```bash
make generate-images
```
This will create the necessary Gitea favicon and others.
### Database Migrations
If you make breaking changes to any of the database persisted structs in the
`models/` directory, you will need to make a new migration. These can be found
in `models/migrations/`. You can ensure that your migrations work for the main
database types using:
```bash
make test-sqlite-migration # with SQLite switched for the appropriate database
```
## Testing
There are two types of test run by Gitea: Unit tests and Integration Tests.
### Unit Tests
Unit tests are covered by `*_test.go` in `go test` system.
You can set the environment variable `GITEA_UNIT_TESTS_LOG_SQL=1` to display all SQL statements when running the tests in verbose mode (i.e. when `GOTESTFLAGS=-v` is set).
```bash
TAGS="bindata sqlite sqlite_unlock_notify" make test # Runs the unit tests
```
### Integration Tests
Unit tests will not and cannot completely test Gitea alone. Therefore, we
have written integration tests; however, these are database dependent.
```bash
TAGS="bindata sqlite sqlite_unlock_notify" make build test-sqlite
```
will run the integration tests in an SQLite environment. Integration tests
require `git lfs` to be installed. Other database tests are available but
may need adjustment to the local environment.
Take a look at [`tests/integration/README.md`](https://github.com/go-gitea/gitea/blob/main/tests/integration/README.md)
for more information and how to run a single test.
### Testing for a PR
Our continuous integration will test the code passes its unit tests and that
all supported databases will pass integration test in a Docker environment.
Migration from several recent versions of Gitea will also be tested.
Please submit your PR with additional tests and integration tests as
appropriate.
## Documentation for the website
Documentation for the website is found in `docs/`. If you change this you
can test your changes to ensure that they pass continuous integration using:
```bash
make lint-md
```
## Visual Studio Code
A `launch.json` and `tasks.json` are provided within `contrib/ide/vscode` for
Visual Studio Code. Look at
[`contrib/ide/README.md`](https://github.com/go-gitea/gitea/blob/main/contrib/ide/README.md)
for more information.
## GoLand
Clicking the `Run Application` arrow on the function `func main()` in `/main.go`
can quickly start a debuggable Gitea instance.
The `Output Directory` in `Run/Debug Configuration` MUST be set to the
gitea project directory (which contains `main.go` and `go.mod`),
otherwise, the started instance's working directory is a GoLand's temporary directory
and prevents Gitea from loading dynamic resources (eg: templates) in a development environment.
To run unit tests with SQLite in GoLand, set `-tags sqlite,sqlite_unlock_notify`
in `Go tool arguments` of `Run/Debug Configuration`.
## Submitting PRs
Once you're happy with your changes, push them up and open a pull request. It
is recommended that you allow Gitea Managers and Owners to modify your PR
branches as we will need to update it to main before merging and/or may be
able to help fix issues directly.
Any PR requires two approvals from the Gitea maintainers and needs to pass the
continuous integration. Take a look at our
[`CONTRIBUTING.md`](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md)
document.
If you need more help pop on to [Discord](https://discord.gg/gitea) #Develop
and chat there.
That's it! You are ready to hack on Gitea.

View File

@@ -1,18 +1,9 @@
---
date: "2019-04-15T17:29:00+08:00"
title: "Integrations"
slug: "integrations"
sidebar_position: 65
toc: false
draft: false
aliases:
- /en-us/integrations
menu:
sidebar:
parent: "development"
name: "Integrations"
sidebar_position: 65
identifier: "integrations"
---
# Integrations

View File

@@ -1,21 +1,12 @@
---
date: "2019-04-15T17:29:00+08:00"
title: "Migrations Interfaces"
slug: "migrations-interfaces"
sidebar_position: 55
toc: false
draft: false
aliases:
- /en-us/migrations-interfaces
menu:
sidebar:
parent: "development"
name: "Migrations Interfaces"
sidebar_position: 55
identifier: "migrations-interfaces"
---
# Migration Features
# Migration Interfaces
Complete migrations were introduced in Gitea 1.9.0. It defines two interfaces to support migrating
repository data from other Git host platforms to Gitea or, in the future, migrating Gitea data to other Git host platforms.

View File

@@ -0,0 +1,271 @@
---
date: "2023-06-01T08:40:00+08:00"
slug: "oauth2-provider"
sidebar_position: 41
aliases:
- /en-us/oauth2-provider
---
# OAuth2 Provider
Gitea supports acting as an OAuth2 Provider, allowing third-party applications to access its resources with user consent.
When acting as the OAuth2 Provider, Gitea verifies every authorization request against the related OAuth2 Application. This application can be set up by an individual user, an organization admin, or a Gitea instance admin.
Regardless of who configured the application, the first authorization attempt opens a new page in the user's web browser, prompting them to authorize the application.
## Configuration
An OAuth2 Application in Gitea requires the following configuration made in two steps:
### Gitea Step 1
- Name (`/admin/applications/`)
- Redirect URL (`/admin/applications/`)
![](/development/gitea_oauth2_step1.png)
### Gitea Step 2
- Client ID (`/admin/applications/oauth2/_id_`)
- Client Secret (`/admin/applications/oauth2/_id_`)
- Confidential client status (`/admin/applications/oauth2/_id_`)
![](/development/gitea_oauth2_step2.png)
### Third Party Step 3
The third-party (Relaying Parties) application's request must include:
- Credentials (Client ID and Client Secret)
- Desired scope and claims (expected to be provided by Gitea)
An example of MinIO:
![](/development/minio_oauth2.png)
### Gitea's User Approval Step 3
For example, logging in with a Gitea account on MinIO...
![](/development/minio_login.png)
...will display the approval popup after a successful login:
![](/development/gitea_approval.png)
By default, if the third party sets the scopes to `openid`, `email`, `profile`, and `groups`, and the user approves, the application gains full access to all of the user's public and private resources (repositories, issues, user information, etc.).
> **NOTE:** At present, an admin who sets up the OAuth2 Application in Gitea must rely on the scopes sent by the third party and an approval decision by the informed user if restrictive access is expected. There is no way for the admin to set restrictive access via scopes during the application setup process.
## Granular Scopes
As of version v1.23, Gitea supports granular scopes, allowing third parties to request more limited access. These scopes, previously available only for [Personal Access Tokens](#scopes), enable users to restrict access to specific URL routes.
Scopes are grouped by high-level API routes and further refined as follows:
- `read`: `GET` routes
- `write`: `POST`, `PUT`, `PATCH`, and `DELETE` routes (in addition to `GET`)
For example, a third party can request minimal access, allowing Gitea to act as a simple OpenID Connect (OIDC) Provider. If the third party adds only `public-only` to 'openid', no other or any combination of the scopes `email`, `userinfo`, or `groups`, Gitea will act as a basic Single Sign-On provider. This configuration provides only verification that the user can log in with the correct credentials, supplying only basic information such as username, email, and a list of public memberships in organizations and teams.
When any of the granular scopes known from Personal Access Tokens is introduced, Gitea will not allow full access (as it does by default). Instead, it will build granular access following read or write permissions to resources such as Repositories, Issues, ActivityPub, Admin functions, Organizations, Users, Packages, or miscellaneous features.
> **NOTE:** If third party adds any scope other than the OIDC ones: `openid`, `email`, `profile`, and `groups` or the ones found already in Personal Access Token the scope will fallback to full access as it was the case before v1.23
The approval page displayed to the user shows the list of scopes requested by the third party. Once approved, this decision is remembered. If the third party changes its requested scopes in future requests, the entire flow will fail, requiring re-authorization.
## Endpoints
| Endpoint | URL |
| ------------------------ | ----------------------------------- |
| OpenID Connect Discovery | `/.well-known/openid-configuration` |
| Authorization Endpoint | `/login/oauth/authorize` |
| Access Token Endpoint | `/login/oauth/access_token` |
| Token Introspection Endpoint | `/login/oauth/introspect` |
| OpenID Connect UserInfo | `/login/oauth/userinfo` |
| JSON Web Key Set | `/login/oauth/keys` |
## Supported OAuth2 Grants
At the moment Gitea only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the following extensions:
- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
To use the Authorization Code Grant as a third party application it is required to register a new application via the "Settings" (`/user/settings/applications`) section of the settings. To test or debug you can use the web-tool https://oauthdebugger.com/.
## Scopes
Gitea supports scoped access tokens, which allow users the ability to restrict tokens to operate only on selected url routes. Scopes are grouped by high-level API routes, and further refined to the following:
- `read`: `GET` routes
- `write`: `POST`, `PUT`, `PATCH`, and `DELETE` routes (in addition to `GET`)
Gitea token scopes are as follows:
| Name | Description |
| ---- |------------------------------------------------------------------------------------------------------------------------------------------------------|
| **(no scope)** | Not supported. A scope is required even for public repositories. |
| **activitypub** | `activitypub` API routes: ActivityPub related operations. |
| &nbsp;&nbsp;&nbsp; **read:activitypub** | Grants read access for ActivityPub operations. |
| &nbsp;&nbsp;&nbsp; **write:activitypub** | Grants read/write/delete access for ActivityPub operations. |
| **admin** | `/admin/*` API routes: Site-wide administrative operations (hidden for non-admin accounts). |
| &nbsp;&nbsp;&nbsp; **read:admin** | Grants read access for admin operations, such as getting cron jobs or registered user emails. |
| &nbsp;&nbsp;&nbsp; **write:admin** | Grants read/write/delete access for admin operations, such as running cron jobs or updating user accounts. |
| **issue** | `issues/*`, `labels/*`, `milestones/*` API routes: Issue-related operations. |
| &nbsp;&nbsp;&nbsp; **read:issue** | Grants read access for issues operations, such as getting issue comments, issue attachments, and milestones. |
| &nbsp;&nbsp;&nbsp; **write:issue** | Grants read/write/delete access for issues operations, such as posting or editing an issue comment or attachment, and updating milestones. |
| **misc** | Reserved for future usage. |
| &nbsp;&nbsp;&nbsp; **read:misc** | Reserved for future usage. |
| &nbsp;&nbsp;&nbsp; **write:misc** | Reserved for future usage. |
| **notification** | `notification/*` API routes: user notification operations. |
| &nbsp;&nbsp;&nbsp; **read:notification** | Grants read access to user notifications, such as which notifications users are subscribed to and read new notifications. |
| &nbsp;&nbsp;&nbsp; **write:notification** | Grants read/write/delete access to user notifications, such as marking notifications as read. |
| **organization** | `orgs/*` and `teams/*` API routes: Organization and team management operations. |
| &nbsp;&nbsp;&nbsp; **read:organization** | Grants read access to org and team status, such as listing all orgs a user has visibility to, teams, and team members. |
| &nbsp;&nbsp;&nbsp; **write:organization** | Grants read/write/delete access to org and team status, such as creating and updating teams and updating org settings. |
| **package** | `/packages/*` API routes: Packages operations |
| &nbsp;&nbsp;&nbsp; **read:package** | Grants read access to package operations, such as reading and downloading available packages. |
| &nbsp;&nbsp;&nbsp; **write:package** | Grants read/write/delete access to package operations. Currently the same as `read:package`. |
| **repository** | `/repos/*` API routes except `/repos/issues/*`: Repository file, pull-request, and release operations. |
| &nbsp;&nbsp;&nbsp; **read:repository** | Grants read access to repository operations, such as getting repository files, releases, collaborators. |
| &nbsp;&nbsp;&nbsp; **write:repository** | Grants read/write/delete access to repository operations, such as getting updating repository files, creating pull requests, updating collaborators. |
| **user** | `/user/*` and `/users/*` API routes: User-related operations. |
| &nbsp;&nbsp;&nbsp; **read:user** | Grants read access to user operations, such as getting user repo subscriptions and user settings. |
| &nbsp;&nbsp;&nbsp; **write:user** | Grants read/write/delete access to user operations, such as updating user repo subscriptions, followed users, and user settings. |
## Pre-configured Applications
Gitea creates OAuth applications for the following services by default on startup, as we assume that these are universally useful.
|Application|Description|Client ID|
|-----------|-----------|---------|
|[git-credential-oauth](https://github.com/hickford/git-credential-oauth)|Git credential helper|`a4792ccc-144e-407e-86c9-5e7d8d9c3269`|
|[Git Credential Manager](https://github.com/git-ecosystem/git-credential-manager)|Git credential helper|`e90ee53c-94e2-48ac-9358-a874fb9e0662`|
|[tea](https://gitea.com/gitea/tea)|tea|`d57cb8c4-630c-4168-8324-ec79935e18d4`|
To prevent unexpected behavior, they are being displayed as locked in the UI and their creation can instead be controlled by the `DEFAULT_APPLICATIONS` parameter in `app.ini`.
## Client types
Gitea supports both confidential and public client types, [as defined by RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1).
For public clients, a redirect URI of a loopback IP address such as `http://127.0.0.1/` allows any port. Avoid using `localhost`, [as recommended by RFC 8252](https://datatracker.ietf.org/doc/html/rfc8252#section-8.3).
## Examples
### Confidential client
:::note
This example does not use PKCE.
:::
1. Redirect the user to the authorization endpoint in order to get their consent for accessing the resources:
```curl
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&state=STATE
```
The `CLIENT_ID` can be obtained by registering an application in the settings. The `STATE` is a random string that will be sent back to your application after the user authorizes. The `state` parameter is optional, but should be used to prevent CSRF attacks.
![Authorization Page](/authorize.png)
The user will now be asked to authorize your application. If they authorize it, the user will be redirected to the `REDIRECT_URL`, for example:
```curl
https://[REDIRECT_URI]?code=RETURNED_CODE&state=STATE
```
2. Using the provided `code` from the redirect, you can request a new application and refresh token. The access token endpoint accepts POST requests with `application/json` and `application/x-www-form-urlencoded` body, for example:
```curl
POST https://[YOUR-GITEA-URL]/login/oauth/access_token
```
```json
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code": "RETURNED_CODE",
"grant_type": "authorization_code",
"redirect_uri": "REDIRECT_URI"
}
```
Response:
```json
{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjowLCJleHAiOjE1NTUxNzk5MTIsImlhdCI6MTU1NTE3NjMxMn0.0-iFsAwBtxuckA0sNZ6QpBQmywVPz129u75vOM7wPJecw5wqGyBkmstfJHAjEOqrAf_V5Z-1QYeCh_Cz4RiKug",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjoxLCJjbnQiOjEsImV4cCI6MTU1NzgwNDMxMiwiaWF0IjoxNTU1MTc2MzEyfQ.S_HZQBy4q9r5SEzNGNIoFClT43HPNDbUdHH-GYNYYdkRfft6XptJBkUQscZsGxOW975Yk6RbgtGvq1nkEcklOw"
}
```
The `CLIENT_SECRET` is the unique secret code generated for this application. Please note that the secret will only be visible after you created/registered the application with Gitea and cannot be recovered. If you lose the secret, you must regenerate the secret via the application's settings.
The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request.
3. Use the `access_token` to make [API requests](development/api-usage.md#oauth2-provider) to access the user's resources.
### Public client (PKCE)
PKCE (Proof Key for Code Exchange) is an extension to the OAuth flow which allows for a secure credential exchange without the requirement to provide a client secret.
**Note**: Please ensure you have registered your OAuth application as a public client.
To achieve this, you have to provide a `code_verifier` for every authorization request. A `code_verifier` has to be a random string with a minimum length of 43 characters and a maximum length of 128 characters. It can contain alphanumeric characters as well as the characters `-`, `.`, `_` and `~`.
Using this `code_verifier` string, a new one called `code_challenge` is created by using one of two methods:
- If you have the required functionality on your client, set `code_challenge` to be a URL-safe base64-encoded string of the SHA256 hash of `code_verifier`. In that case, your `code_challenge_method` becomes `S256`.
- If you are unable to do so, you can provide your `code_verifier` as a plain string to `code_challenge`. Then you have to set your `code_challenge_method` as `plain`.
After you have generated this values, you can continue with your request.
1. Redirect the user to the authorization endpoint in order to get their consent for accessing the resources:
```curl
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&code_challenge_method=CODE_CHALLENGE_METHOD&code_challenge=CODE_CHALLENGE&state=STATE
```
The `CLIENT_ID` can be obtained by registering an application in the settings. The `STATE` is a random string that will be sent back to your application after the user authorizes. The `state` parameter is optional, but should be used to prevent CSRF attacks.
![Authorization Page](/authorize.png)
The user will now be asked to authorize your application. If they authorize it, the user will be redirected to the `REDIRECT_URL`, for example:
```curl
https://[REDIRECT_URI]?code=RETURNED_CODE&state=STATE
```
2. Using the provided `code` from the redirect, you can request a new application and refresh token. The access token endpoint accepts POST requests with `application/json` and `application/x-www-form-urlencoded` body, for example:
```curl
POST https://[YOUR-GITEA-URL]/login/oauth/access_token
```
```json
{
"client_id": "YOUR_CLIENT_ID",
"code": "RETURNED_CODE",
"grant_type": "authorization_code",
"redirect_uri": "REDIRECT_URI",
"code_verifier": "CODE_VERIFIER",
}
```
Response:
```json
{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjowLCJleHAiOjE1NTUxNzk5MTIsImlhdCI6MTU1NTE3NjMxMn0.0-iFsAwBtxuckA0sNZ6QpBQmywVPz129u75vOM7wPJecw5wqGyBkmstfJHAjEOqrAf_V5Z-1QYeCh_Cz4RiKug",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjoxLCJjbnQiOjEsImV4cCI6MTU1NzgwNDMxMiwiaWF0IjoxNTU1MTc2MzEyfQ.S_HZQBy4q9r5SEzNGNIoFClT43HPNDbUdHH-GYNYYdkRfft6XptJBkUQscZsGxOW975Yk6RbgtGvq1nkEcklOw"
}
```
The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request.
3. Use the `access_token` to make [API requests](development/api-usage.md#oauth2-provider) to access the user's resources.

View File

@@ -0,0 +1,9 @@
{
"label": "Help",
"position": 5,
"link": {
"type": "generated-index",
"slug": "/help",
"title": "Help"
}
}

352
docs/help/faq.md Normal file
View File

@@ -0,0 +1,352 @@
---
date: "2019-04-05T16:00:00+02:00"
slug: "faq"
sidebar_position: 5
aliases:
- /en-us/faq
---
# FAQ
This page contains some common questions and answers.
For more help resources, check all [Support Options](help/support.md).
## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes?
Version 1.20.x will be used for this example.
On our [downloads page](https://dl.gitea.com/gitea/) you will see a 1.20 directory, as well as directories for 1.20.0, 1.20.1.
The 1.20 directory is the nightly build, which is built on each merged commit to the [`release/v1.20`](https://github.com/go-gitea/gitea/tree/release/v1.20) branch.
The 1.20.0 directory is a release build that was created when the [`v1.20.0`](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) tag was created.
The nightly builds (1.x) downloads will change as commits are merged to their respective branch, they contain the latest changes/fixes before a tag release is built.
If a bug fix is targeted on 1.20.1 but 1.20.1 is not released yet, you can get the "1.20-nightly" build to get the bug fix.
## How to find the config file "app.ini"
It depends on how you installed Gitea. If you didn't set a path for custom path or config file manually,
then the config file (app.ini) should exists in the "custom/conf" directory of your Gitea's working path.
Some package vendors might use "/etc/gitea" to store the config file, while some others don't.
You could manually find the config file (app.ini) by checking Gitea's startup logs
or reading the Gitea Web's Site Administrator -> Confugiraton Summary.
If you are using some isolated enviroments like container (docker),
the path you see usually is not what it is in the host's filesystem.
In this case you need to check the container's filesystem volume mapping
and figure out the real path of the config file on the host.
## Where does Gitea store what file
- _`AppWorkPath`_
- The `WORK_PATH` option in `app.ini`
- Else the `--work-path` flag
- Else Environment variable `GITEA_WORK_DIR`
- Else a built-in value set at build time
- Else the directory that contains the Gitea binary
- `AppDataPath` (default for database, indexers, etc.)
- `APP_DATA_PATH` from `app.ini`
- Else _`AppWorkPath`_`/data`
- _`CustomPath`_ (custom templates)
- The `--custom-path` flag
- Else Environment variable `GITEA_CUSTOM`
- Else a built-in value set at build time
- Else _`AppWorkPath`_`/custom`
- HomeDir
- Unix: Environment variable `HOME`
- Windows: Environment variable `USERPROFILE`, else environment variables `HOMEDRIVE`+`HOMEPATH`
- RepoRootPath
- `ROOT` in the \[repository] section of `app.ini` if absolute
- Else _`AppWorkPath`_`/ROOT` if `ROOT` in the \[repository] section of `app.ini` if relative
- Default `%(APP_DATA_PATH)/gitea-repositories`
- INI (config file)
- `--config` flag
- A possible built-in value set a build time
- Else _`CustomPath`_`/conf/app.ini`
- SQLite Database
- `PATH` in `database` section of `app.ini`
- Else `%(APP_DATA_PATH)/gitea.db`
## Not seeing a clone URL or the clone URL being incorrect
There are a few places that could make this show incorrectly.
1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide](../administration/reverse-proxies.md)
2. Make sure you have correctly set `ROOT_URL` in the `server` section of your `app.ini`
If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini`
- `DISABLE_HTTP_GIT`: if set to true, there will be no HTTP/HTTPS link
- `DISABLE_SSH`: if set to true, there will be no SSH link
- `SSH_EXPOSE_ANONYMOUS`: if set to false, SSH links will be hidden for anonymous users
## File upload fails with: 413 Request Entity Too Large
This error occurs when the reverse proxy limits the file upload size.
See the [reverse proxy guide](../administration/reverse-proxies.md) for a solution with nginx.
## Custom Templates not loading or working incorrectly
Gitea's custom templates must be added to the correct location or Gitea will not find and use them.
The correct path for the template(s) will be relative to the `CustomPath`
1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration
2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file)
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea](../administration/customizing-gitea.md) page to add your template to the correct location.
## Does Gitea have a "GitHub/GitLab pages" feature?
Gitea doesn't provide a built-in Pages server. You need a dedicated domain to serve static pages to avoid CSRF security risks.
For simple usage, you can use a reverse proxy to rewrite & serve static contents from Gitea's raw file URLs.
And there are already available third-party services, like a standalone [pages server](https://codeberg.org/Codeberg/pages-server) or a [caddy plugin](https://github.com/42wim/caddy-gitea), that can provide the required functionality.
## Active user vs login prohibited user
In Gitea, an "active" user refers to a user that has activated their account via email.
A "login prohibited" user is a user that is not allowed to log in to Gitea anymore
## What is Swagger?
[Swagger](https://swagger.io/) is what Gitea uses for its API documentation.
All Gitea instances have the built-in API and there is no way to disable it completely.
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://gitea.com/api/swagger
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
### Preventing spammers
There are multiple things you can combine to prevent spammers.
1. By whitelisting or blocklisting certain email domains
2. By only whitelisting certain domains with OpenID (see below)
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI](../administration/command-line.md), [API](development/api-usage.md), or Gitea's Admin UI
### Only allow/block certain email domains
You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]`
### Only allow/block certain OpenID providers
You can configure `WHITELISTED_URIS` or `BLACKLISTED_URIS` under `[openid]` in your `app.ini`
:::note
Whitelisted takes precedence, so if it is non-blank then blacklisted is ignored.
:::
### Issue only users
The current way to achieve this is to create/modify a user with a max repo creation limit of 0.
### Restricted users
Restricted users are limited to a subset of the content based on their organization/team memberships and collaborations, ignoring the public flag on organizations/repos etc.\_\_
Example use case: A company runs a Gitea instance that requires login. Most repos are public (accessible/browsable by all co-workers).
At some point, a customer or third party needs access to a specific repo and only that repo. Making such a customer account restricted and granting any needed access using team membership(s) and/or collaboration(s) is a simple way to achieve that without the need to make everything private.
### Enable Fail2ban
Use [Fail2Ban](../administration/fail2ban-setup.md) to monitor and stop automated login attempts or other malicious behavior based on log patterns
## SSHD vs built-in SSH
SSHD is the built-in SSH server on most Unix systems.
Gitea also provides its own SSH server, for usage when SSHD is not available.
## Translation is incorrect/how to add more translations
Our translations are currently crowd-sourced on our [Crowdin project](https://crowdin.com/project/gitea)
Whether you want to change a translation or add a new one, it will need to be there as all translations are overwritten in our CI via the Crowdin integration.
## Push Hook / Webhook / Actions aren't running
If you can push but can't see push activities on the home dashboard, or the push doesn't trigger webhook and Actions workflows, it's likely that the git hooks are not working.
There are a few possibilities:
1. The git hooks are out of sync. Run the following actions on the site admin panel:
- "Sync missed branches from git data to databases"
- "Sync tags from git data to database"
- "Resynchronize pre-receive, update and post-receive hooks of all repositories"
2. The git repositories (and hooks) are stored on some filesystems (ex: mounted by NAS) which don't support script execution, make sure the filesystem supports `chmod a+x any-script`. Also make sure that the filesystem of the repositories is not mounted with the `noexec` option.
3. If you are using docker, make sure Docker Server (not the client) >= 20.10.6
## SSH issues
If you cannot reach repositories over `ssh`, but `https` works fine, consider looking into the following.
First, make sure you can access Gitea via SSH.
`ssh git@myremote.example`
If the connection is successful, you should receive an error message like the following:
```
Hi there, You've successfully authenticated, but Gitea does not provide shell access.
If this is unexpected, please log in with password and setup Gitea under another user.
```
If you do not get the above message but still connect, it means your SSH key is **not** being managed by Gitea. This means hooks won't run, among other potential problems.
If you cannot connect at all, your SSH key may not be configured correctly locally.
This is specific to SSH and not Gitea, so will not be covered here.
### SSH Common Errors
```
Permission denied (publickey).
fatal: Could not read from remote repository.
```
This error signifies that the server rejected a log in attempt, check the
following things:
- On the client:
- Ensure the public and private ssh keys are added to the correct Gitea user.
- Make sure there are no issues in the remote url. In particular, ensure the name of the
Git user (before the `@`) is spelled correctly.
- Ensure public and private ssh keys are correct on client machine.
- On the server:
- Make sure the repository exists and is correctly named.
- Check the permissions of the `.ssh` directory in the system user's home directory.
- Verify that the correct public keys are added to `.ssh/authorized_keys`.
Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the
Gitea admin panel.
- Read Gitea logs.
- Read /var/log/auth (or similar).
- Check permissions of repositories.
The following is an example of a missing public SSH key where authentication
succeeded, but some other setting is preventing SSH from reaching the correct
repository.
```
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
In this case, look into the following settings:
- On the server:
- Make sure that the `git` system user has a usable shell set
- Verify this with `getent passwd git | cut -d: -f7`
- `usermod` or `chsh` can be used to modify this.
- Ensure that the `gitea serv` command in `.ssh/authorized_keys` uses the
correct configuration file.
## Missing releases after migrating repository with tags
To migrate an repository _with_ all tags, you need to do two things:
- Push tags to the repository:
```
git push --tags
```
- (Re-)sync tags of all repositories within Gitea:
```
gitea admin repo-sync-releases
```
## How can I create users before starting Gitea
Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands](../administration/command-line.md#admin) to add users like normal.
## How can I enable password reset
There is no setting for password resets. It is enabled when a [mail service](../administration/email-setup.md) is configured, and disabled otherwise.
## How can a user's password be changed
- As an **admin**, you can change any user's password (and optionally force them to change it on next login)...
- By navigating to your `Site Administration -> User Accounts` page and editing a user.
- By using the [admin CLI commands](../administration/command-line.md#admin).
Keep in mind most commands will also need a [global flag](../administration/command-line.md#global-options) to point the CLI at the correct configuration.
- As a **user** you can change it...
- In your account `Settings -> Account` page (this method **requires** you to know your current password).
- By using the `Forgot Password` link.
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service](../administration/email-setup.md).
## Warnings about struct defaults during database startup
Sometimes when there are migrations the old columns and default values may be left
unchanged in the database schema. This may lead to warning such as:
```
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
```
These can safely be ignored, but you are able to stop these warnings by getting Gitea to recreate these tables using:
```
gitea doctor recreate-table user
```
This will cause Gitea to recreate the user table and copy the old data into the new table
with the defaults set appropriately.
You can ask Gitea to recreate multiple tables using:
```
gitea doctor recreate-table table1 table2 ...
```
And if you would like Gitea to recreate all tables simply call:
```
gitea doctor recreate-table
```
It is highly recommended to back-up your database before running these commands.
## How to adopt repositories from disk
- Add your (bare) repositories to the correct spot for your configuration (`repository.ROOT`), ensuring they are in the correct layout `<REPO_ROOT>/[user]/[repo].git`.
- **Note:** the directory names must be lowercase.
- You can also check `<ROOT_URL>/-/admin/config` for the repository root path.
- Ensure that the user/org exists that you want to adopt repositories for.
- As an admin, go to `<ROOT_URL>/-/admin/repos/unadopted` and search.
- Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](../administration/config-cheat-sheet.md#repository-repository).
- If the above steps are done correctly, you should be able to select repositories to adopt.
- If no repositories are found, enable [debug logging](../administration/config-cheat-sheet.md#repository-repository) to check for any specific errors.
## Gitea can't start on NFS
In most cases, it's caused by broken NFS lock system. You can try to stop Gitea process and
run `flock -n /data-nfs/gitea/queues/LOCK echo 'lock acquired'` to see whether the lock can be acquired immediately.
If the lock can't be acquired, NFS might report some errors like `lockd: cannot monitor node-3, statd: server rpc.statd not responding, timed out` in its server logs.
Then the NFS lock could be reset by:
```bash
# /etc/init.d/nfs stop
# rm -rf /var/lib/nfs/sm/*
# /etc/init.d/nfs start
```

71
docs/help/support.md Normal file
View File

@@ -0,0 +1,71 @@
---
date: "2018-05-21T15:00:00+00:00"
slug: "support"
sidebar_position: 20
aliases:
- /en-us/seek-help
---
# Support Options
- [Paid Commercial Support](https://about.gitea.com/)
- [Discord](https://discord.gg/Gitea)
- [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://forum.gitea.com/c/5-category/5)
- QQ Group 328432459
# Bug Report
If you found a bug, please [create an issue on GitHub](https://github.com/go-gitea/gitea/issues).
:::note
When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need:
:::
1. Your `app.ini` (with any sensitive data scrubbed as necessary).
2. Any error messages you are seeing.
3. The Gitea logs, and all other related logs for the situation.
- It's more useful to collect `trace` / `debug` level logs (see the next section).
- When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs.
- When using docker, use `docker logs --tail 1000 <gitea-container>` to collect logs.
4. Reproducible steps so that others could reproduce and understand the problem more quickly and easily.
- [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".
# Advanced Bug Report Tips
## More Config Options for Logs
By default, the logs are outputted to console with `info` level.
If you need to set log level and/or collect logs from files,
you could just copy the following config into your `app.ini` (remove all other `[log]` sections),
then you will find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`).
```ini
; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
[log]
LEVEL=debug
MODE=console,file
```
## Collecting Stacktrace by Command Line
Gitea could use Golang's pprof handler and toolchain to collect stacktrace and other runtime information.
If the web UI stops working, you could try to collect the stacktrace by command line:
1. Set `app.ini`:
```
[server]
ENABLE_PPROF = true
```
2. Restart Gitea
3. Try to trigger the bug, when the requests get stuck for a while,
use `curl` or browser to visit: `http://127.0.0.1:6060/debug/pprof/goroutine?debug=1` to get the stacktrace.

110
docs/index.md Normal file
View File

@@ -0,0 +1,110 @@
---
date: "2016-11-08T16:00:00+02:00"
slug: /
sidebar_position: 10
---
# What is Gitea?
Gitea is a painless, self-hosted, all-in-one software development service. It includes Git hosting, code review, team collaboration, package registry, and CI/CD. It is similar to GitHub, Bitbucket and GitLab.
Gitea was originally forked from [Gogs](https://gogs.io) and almost all the code has been changed. See the [Gitea Announcement](https://blog.gitea.com/welcome-to-gitea/) blog post to read about the justification for a fork.
:::warning
Gitea does not send commits to upstream or cherry-pick commits from it, so there is no guarantee it will work if you upgrade from Gogs to Gitea. The recommended method is to migrate repositories from Gogs to Gitea.
:::
## Purpose
The goal of this project is to provide the easiest, fastest, and most painless way of setting
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://demo.gitea.com).
## Features
- **Code Hosting**
Gitea supports creating and managing repositories, browsing commit history and code files, reviewing and merging code submissions, managing collaborators, handling branches, and more. It also supports many common Git features such as tags, cherry-picking, hooks, integrated collaboration tools, and more.
- **Lightweight and Fast**
One of Gitea's design goals is to be lightweight and fast in response. Unlike some large code hosting platforms, it remains lean, performs well in terms of speed, and is suitable for resource-limited server environments.
- **Easy Deployment and Maintenance**
It can be easily deployed on various servers without complex configurations or dependencies. This makes it convenient for individual developers or small teams to set up and manage their own Git services.
- **Security**
Gitea places a strong emphasis on security, offering features such as user permission management, access control lists, and more to ensure the security of code and data.
- **Code Review**
Code review supports both the Pull Request workflow and AGit workflow. Reviewers can browse code online and provide review comments or feedback. Submitters can receive review comments and respond or modify code online. Code reviews can help individuals and organizations enhance code quality.
- **CI/CD**
Gitea Actions supports CI/CD functionality, compatible with GitHub Actions. Users can write workflows in familiar YAML format and reuse a variety of existing Actions plugins. Actions plugins support downloading from any Git website.
- **Project Management**
Gitea tracks project requirements, features, and bugs through columns and issues. Issues support features like branches, tags, milestones, assignments, time tracking, due dates, dependencies, and more.
- **Artifact Repository**
Gitea supports over 20 different types of public or private software package management, including Cargo, Chef, Composer, Conan, Conda, Container, Helm, Maven, npm, NuGet, Pub, PyPI, RubyGems, Vagrant, and more.
- **Open Source Community Support**
Gitea is an open-source project based on the MIT license. It has an active open-source community that continuously develops and improves the platform. The project also actively welcomes community contributions, ensuring updates and innovation.
- **Multilingual Support**
Gitea provides interfaces in multiple languages, catering to users globally and promoting internationalization and localization.
For more detailed information, please refer to: https://docs.gitea.com/installation/comparison#general-features
## System Requirements
- A Raspberry Pi 3 is powerful enough to run Gitea for small workloads.
- 2 CPU cores and 1GB RAM is typically sufficient for small teams/projects.
- Gitea should be run with a dedicated non-root system account on UNIX-type systems.
- Note: Gitea manages the `~/.ssh/authorized_keys` file. Running Gitea as a regular user could break that user's ability to log in.
- [Git](https://git-scm.com/) version 2.0.0 or later is required.
- [Git Large File Storage](https://git-lfs.github.com/) will be available if enabled and if your Git version is >= 2.1.2
- Git commit-graph rendering will be enabled automatically if your Git version is >= 2.18
## Browser Support
- Last 2 versions of Chrome, Firefox, Safari and Edge
- Firefox ESR
## Components
- Web server framework: [Chi](http://github.com/go-chi/chi)
- ORM: [XORM](https://xorm.io)
- UI frameworks:
- [jQuery](https://jquery.com)
- [Fomantic UI](https://fomantic-ui.com)
- [Vue3](https://vuejs.org)
- and various components (see package.json)
- Editors:
- [CodeMirror](https://codemirror.net)
- [EasyMDE](https://github.com/Ionaru/easy-markdown-editor)
- [Monaco Editor](https://microsoft.github.io/monaco-editor)
- Database drivers:
- [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)
- [github.com/lib/pq](https://github.com/lib/pq)
- [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)
- [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb)
## Integrated Support
Please visit [Awesome Gitea](https://gitea.com/gitea/awesome-gitea/) to get more third-party integrated support

View File

@@ -0,0 +1,9 @@
{
"label": "Installation",
"position": 10,
"link": {
"type": "generated-index",
"slug": "/installation",
"title": "Installation"
}
}

View File

@@ -0,0 +1,145 @@
---
date: "2018-05-07T13:00:00+02:00"
slug: "comparison"
sidebar_position: 5
aliases:
- /en-us/comparison
---
# Compared to other Git hosting
To help decide if Gitea is suited for your needs, here is how it compares to other Git self hosted options.
Be warned that we don't regularly check for feature changes in other products, so this list may be outdated. If you find anything that needs to be updated in the table below, please [open an issue](https://github.com/go-gitea/gitea/issues/new/choose).
_Symbols used in table:_
- _✓ - supported_
- _ - supported with limited functionality_
- _✘ - unsupported_
- _⚙ - supported through third-party software_
## General Features
| Feature | Gitea | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | RhodeCode EE |
| ------------------------------------------------ | --------------------------------------------------- | --------- | --------- | --------- | --------- | ------------ | ------------ |
| Open source and free | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ✓ |
| Low RAM/ CPU usage | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
| Multiple database support | ✓ | ✘ | | | ✓ | ✓ | ✓ |
| Multiple OS support | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ✓ |
| Easy upgrades | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ | ✓ |
| Telemetry | **✘** | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Third-party render tool support | ✓ | ✘ | ✘ | ✘ | ✓ | ✘ | ✘ |
| WebAuthn (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✓ |
| Extensive API | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Built-in Package/Container Registry | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Sync commits to an external repo (push mirror) | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ | ✓ |
| Sync commits from an external repo (pull mirror) | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ | ✓ |
| Light and Dark Theme | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Custom Theme Support | ✓ | ✘ | ✘ | ✘ | ✓ | ✓ | ✓ |
| Markdown support | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| CSV support | ✓ | ✓ | ✘ | ✘ | ✓ | ✘ | ✘ |
| 'GitHub / GitLab pages' | [⚙️][gitea-pages-server], [⚙️][gitea-caddy-plugin] | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Gists / Snippets | [⚙️][opengist] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Repo-specific wiki (as a repo itself) | ✓ | ✓ | ✓ | ✓ | / | ✘ | ✘ |
| Deploy Tokens | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Repository Tokens with write rights | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| RSS Feeds | ✓ | ✓ | ✘ | ✘ | ✘ | ✓ | ✓ |
| Built-in CI/CD | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Subgroups: groups within groups | [](https://github.com/go-gitea/gitea/issues/1872) | ✘ | ✓ | ✓ | ✘ | ✓ | ✓ |
| Interaction with other instances | [/](https://github.com/go-gitea/gitea/issues/18240) | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
| Mermaid diagrams in Markdown | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Math syntax in Markdown | ✓ | ✓ | ✓ | ✓ | ✘ | ✓ | ✓ |
## Code management
| Feature | Gitea | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | RhodeCode EE |
| ------------------------------------------- | --------------------------------------------------- | --------- | --------- | --------- | --------- | ------------ | ------------ |
| Repository topics | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Repository code search | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Global code search | ✓ | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ |
| Git LFS 2.0 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Group Milestones | [](https://github.com/go-gitea/gitea/issues/14622) | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Granular user roles (Code, Issues, Wiki, …) | ✓ | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Verified Committer | | ? | ✓ | ✓ | ✓ | ✘ | ✘ |
| GPG Signed Commits | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| SSH Signed Commits | ✓ | ✓ | ✓ | ✓ | ? | ✘ | ✘ |
| Reject unsigned commits | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Migrating repos from other services | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Repository Activity page | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Branch manager | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Create new branches | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Web code editor | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Commit graph | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Template Repositories | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✘ |
| Git Blame | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Visual comparison of image changes | ✓ | ✓ | ? | ? | ? | ✘ | ✘ |
- Gitea has builtin repository-level code search
- Better code search support could be achieved by [using a repository indexer](../administration/repo-indexer.md)
## Issue Tracker
| Feature | Gitea | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | RhodeCode EE |
| ----------------------------- | --------------------------------------------------- | --------- | --------- | --------- | --------- | ------------ | ------------ |
| Issue tracker | ✓ | ✓ | ✓ | ✓ | / | ✘ | ✘ |
| Issue templates | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Labels | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Time tracking | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Multiple assignees for issues | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ |
| Related issues | ✘ | | ✓ | ✓ | ✘ | ✘ | ✘ |
| Confidential issues | [](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Comment reactions | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Lock Discussion | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Batch issue handling | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Projects | [/](https://github.com/go-gitea/gitea/issues/14710) | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Create branch from issue | [](https://github.com/go-gitea/gitea/issues/20226) | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Convert comment to new issue | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Issue search | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Global issue search | [/](https://github.com/go-gitea/gitea/issues/2434) | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Issue dependency | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
| Create issue via email | [](https://github.com/go-gitea/gitea/issues/6226) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Service Desk | [](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
## Pull/Merge requests
| Feature | Gitea | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | RhodeCode EE |
| ----------------------------------------------- | -------------------------------------------------- | --------- | --------- | --------- | --------- | ------------ | ------------ |
| Pull/Merge requests | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Squash merging | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Rebase merging | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Pull/Merge request inline comments | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Pull/Merge request approval | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Pull/Merge require approval | ✓ | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ |
| Pull/Merge multiple reviewers | ✓ | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ |
| Merge conflict resolution | [](https://github.com/go-gitea/gitea/issues/9014) | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Restrict push and merge access to certain users | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Revert specific commits | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Pull/Merge requests templates | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Cherry-picking changes | ✓ | ✘ | ✓ | ✓ | ✘ | ✘ | ✓ |
| Download Patch | ✓ | ✓ | ✓ | ✓ | / | ✓ | ✓ |
| Merge queues | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ |
## 3rd-party integrations
| Feature | Gitea | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | RhodeCode EE |
| ---------------------------------------------- | -------------------------------------------------- | --------- | --------- | --------- | --------- | ------------ | ------------ |
| Webhooks | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Git Hooks | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| AD / LDAP integration | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Multiple LDAP / AD server support | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ | ✓ |
| LDAP user synchronization | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✓ |
| SAML 2.0 service provider | [](https://github.com/go-gitea/gitea/issues/5512) | ✓ | ✓ | ✓ | ✓ | ✘ | ✓ |
| OpenID Connect support | ✓ | ✓ | ✓ | ✓ | ? | ✘ | ✓ |
| OAuth 2.0 integration (external authorization) | ✓ | | ✓ | ✓ | ? | ✘ | ✓ |
| Act as OAuth 2.0 provider | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Two factor authentication (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✓ |
| Integration with the most common services | ✓ | | ✓ | ✓ | | ✓ | ✓ |
| Incorporate external CI/CD | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
[gitea-caddy-plugin]: https://github.com/42wim/caddy-gitea
[gitea-pages-server]: https://codeberg.org/Codeberg/pages-server
[opengist]: https://github.com/thomiceli/opengist

View File

@@ -0,0 +1,311 @@
---
date: "2020-01-16"
slug: "database-prep"
sidebar_position: 10
aliases:
- /en-us/database-prep
---
# Database Preparation
You need a database to use Gitea. Gitea supports PostgreSQL (>= 12), MySQL (>= 8.0), MariaDB (>= 10.4), SQLite (builtin), and MSSQL (>= 2012 SP4). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter.
:::warning
Converting one database type to another is not a well-tested process and you may experience issues. It is better to choose the final database type at the type of the first installation. Be aware that SQLite does not scale; if you expect your instance to grow at a later time, you should choose another database type.
:::
If you use an unsupported database version, please [get in touch](/help/support) with us for information on our Extended Support Contracts. We can provide testing and support for older databases and integrate those fixes into the Gitea codebase.
Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database).
:::note
All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers.
:::
## MySQL/MariaDB
1. For remote database setup, you will need to make MySQL listen to your IP address. Configure the `bind-address` option in `/etc/mysql/my.cnf` on database instance by adding the following lines:
```ini
[mysqld]
bind-address = 203.0.113.3
```
2. On database instance, login to database console as root:
```sh
mysql -u root -p
```
Enter the password as prompted.
3. Create database user which will be used by Gitea, authenticated by password. This example uses `'gitea'` as password. Please use a secure password for your instance.
For local database:
```sql
SET old_passwords=0;
CREATE USER 'gitea'@'%' IDENTIFIED BY 'gitea';
```
For remote database:
```sql
SET old_passwords=0;
CREATE USER 'gitea'@'192.0.2.10' IDENTIFIED BY 'gitea';
```
where `192.0.2.10` is the IP address of your Gitea instance.
Replace username and password above as appropriate.
4. Create database with UTF-8 charset and case-sensitive collation.
`utf8mb4_bin` is a common collation for both MySQL/MariaDB.
When Gitea starts, it will try to find a better collation (`utf8mb4_0900_as_cs` or `uca1400_as_cs`) and alter the database if it is possible.
If you would like to use other collation, you can set `[database].CHARSET_COLLATION` in the `app.ini` file.
```sql
CREATE DATABASE giteadb CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin';
```
Replace database name as appropriate.
5. Grant all privileges on the database to database user created above.
For local database:
```sql
GRANT ALL PRIVILEGES ON giteadb.* TO 'gitea';
FLUSH PRIVILEGES;
```
For remote database:
```sql
GRANT ALL PRIVILEGES ON giteadb.* TO 'gitea'@'192.0.2.10';
FLUSH PRIVILEGES;
```
6. Quit from database console by `exit`.
7. On your Gitea server, test connection to the database:
```
mysql -u gitea -h 203.0.113.3 -p giteadb
```
where `gitea` is database username, `giteadb` is database name, and `203.0.113.3` is IP address of database instance. Omit `-h` option for local database.
You should be connected to the database.
## PostgreSQL
1. For remote database setup, configure PostgreSQL on database instance to listen to your IP address by editing `listen_addresses` on `postgresql.conf` to:
```ini
listen_addresses = 'localhost, 203.0.113.3'
```
2. PostgreSQL uses `md5` challenge-response encryption scheme for password authentication by default. Nowadays this scheme is not considered secure anymore. Use SCRAM-SHA-256 scheme instead by editing the `postgresql.conf` configuration file on the database server to:
```ini
password_encryption = scram-sha-256
```
Restart PostgreSQL to apply the setting.
3. On the database server, login to the database console as superuser:
```
su -c "psql" - postgres
```
4. Create database user (role in PostgreSQL terms) with login privilege and password. Please use a secure, strong password instead of `'gitea'` below:
```sql
CREATE ROLE gitea WITH LOGIN PASSWORD 'gitea';
```
Replace username and password as appropriate.
5. Create database with UTF-8 charset and owned by the database user created earlier. Any `libc` collations can be specified with `LC_COLLATE` and `LC_CTYPE` parameter, depending on expected content:
```sql
CREATE DATABASE giteadb WITH OWNER gitea TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';
```
Replace database name as appropriate.
6. Allow the database user to access the database created above by adding the following authentication rule to `pg_hba.conf`.
For local database:
```ini
local giteadb gitea scram-sha-256
```
For remote database:
```ini
host giteadb gitea 192.0.2.10/32 scram-sha-256
```
Replace database name, user, and IP address of Gitea instance with your own.
:::note
Rules on `pg_hba.conf` are evaluated sequentially, that is the first matching rule will be used for authentication. Your PostgreSQL installation may come with generic authentication rules that match all users and databases. You may need to place the rules presented here above such generic rules if it is the case.
:::
Restart PostgreSQL to apply new authentication rules.
7. On your Gitea server, test connection to the database.
For local database:
```bash
psql -U gitea -d giteadb
```
For remote database:
```bash
psql "postgres://gitea@203.0.113.3/giteadb"
```
where `gitea` is database user, `giteadb` is database name, and `203.0.113.3` is IP address of your database instance.
You should be prompted to enter password for the database user, and connected to the database.
## Database Connection over TLS
If the communication between Gitea and your database instance is performed through a private network, or if Gitea and the database are running on the same server, this section can be omitted since the security between Gitea and the database instance is not critically exposed. If instead the database instance is on a public network, use TLS to encrypt the connection to the database, as it is possible for third-parties to intercept the traffic data.
### Prerequisites
- You need two valid TLS certificates, one for the database instance (database server) and one for the Gitea instance (database client). Both certificates must be signed by a trusted CA.
- The database certificate must contain `TLS Web Server Authentication` in the `X509v3 Extended Key Usage` extension attribute, while the client certificate needs `TLS Web Client Authentication` in the corresponding attribute.
- On the database server certificate, one of `Subject Alternative Name` or `Common Name` entries must be the fully-qualified domain name (FQDN) of the database instance (e.g. `db.example.com`). On the database client certificate, one of the entries mentioned above must contain the database username that Gitea will be using to connect.
- You need domain name mappings of both Gitea and database servers to their respective IP addresses. Either set up DNS records for them or add local mappings to `/etc/hosts` (`%WINDIR%\System32\drivers\etc\hosts` in Windows) on each system. This allows the database connections to be performed by domain name instead of IP address. See documentation of your system for details.
### PostgreSQL TLS
The PostgreSQL driver used by Gitea supports two-way TLS. In two-way TLS, both database client and server authenticate each other by sending their respective certificates to their respective opposite for validation. In other words, the server verifies client certificate, and the client verifies server certificate.
1. On the server with the database instance, place the following credentials:
- `/path/to/postgresql.crt`: Database instance certificate
- `/path/to/postgresql.key`: Database instance private key
- `/path/to/root.crt`: CA certificate chain to validate client certificates
2. Add following options to `postgresql.conf`:
```ini
ssl = on
ssl_ca_file = '/path/to/root.crt'
ssl_cert_file = '/path/to/postgresql.crt'
ssl_key_file = '/path/to/postgresql.key'
ssl_min_protocol_version = 'TLSv1.2'
```
3. Adjust credentials ownership and permission, as required by PostgreSQL:
```
chown postgres:postgres /path/to/root.crt /path/to/postgresql.crt /path/to/postgresql.key
chmod 0600 /path/to/root.crt /path/to/postgresql.crt /path/to/postgresql.key
```
4. Edit `pg_hba.conf` rule to only allow Gitea database user to connect over SSL, and to require client certificate verification.
For PostgreSQL 12:
```ini
hostssl giteadb gitea 192.0.2.10/32 scram-sha-256 clientcert=verify-full
```
For PostgreSQL 11 and earlier:
```ini
hostssl giteadb gitea 192.0.2.10/32 scram-sha-256 clientcert=1
```
Replace database name, user, and IP address of Gitea instance as appropriate.
5. Restart PostgreSQL to apply configurations above.
6. On the server running the Gitea instance, place the following credentials under the home directory of the user who runs Gitea (e.g. `git`):
- `~/.postgresql/postgresql.crt`: Database client certificate
- `~/.postgresql/postgresql.key`: Database client private key
- `~/.postgresql/root.crt`: CA certificate chain to validate server certificate
:::note
Those file names above are hardcoded in PostgreSQL and it is not possible to change them.
:::
7. Adjust credentials, ownership and permission as required:
```
chown git:git ~/.postgresql/postgresql.crt ~/.postgresql/postgresql.key ~/.postgresql/root.crt
chown 0600 ~/.postgresql/postgresql.crt ~/.postgresql/postgresql.key ~/.postgresql/root.crt
```
8. Test the connection to the database:
```
psql "postgres://gitea@example.db/giteadb?sslmode=verify-full"
```
You should be prompted to enter password for the database user, and then be connected to the database.
### MySQL/MariaDB TLS
While the MySQL driver used by Gitea also supports two-way TLS, Gitea currently supports only one-way TLS. See issue #10828 for details.
In one-way TLS, the database client verifies the certificate sent from server during the connection handshake, and the server assumes that the connected client is legitimate, since client certificate verification doesn't take place.
1. On the database instance, place the following credentials:
- `/path/to/mysql.crt`: Database instance certificate
- `/path/to/mysql.key`: Database instance key
- `/path/to/ca.crt`: CA certificate chain. This file isn't used on one-way TLS, but is used to validate client certificates on two-way TLS.
2. Add following options to `my.cnf`:
```ini
[mysqld]
ssl-ca = /path/to/ca.crt
ssl-cert = /path/to/mysql.crt
ssl-key = /path/to/mysql.key
tls-version = TLSv1.2,TLSv1.3
```
3. Adjust credentials ownership and permission:
```
chown mysql:mysql /path/to/ca.crt /path/to/mysql.crt /path/to/mysql.key
chmod 0600 /path/to/ca.crt /path/to/mysql.crt /path/to/mysql.key
```
4. Restart MySQL to apply the setting.
5. The database user for Gitea may have been created earlier, but it would authenticate only against the IP addresses of the server running Gitea. To authenticate against its domain name, recreate the user, and this time also set it to require TLS for connecting to the database:
```sql
DROP USER 'gitea'@'192.0.2.10';
CREATE USER 'gitea'@'example.gitea' IDENTIFIED BY 'gitea' REQUIRE SSL;
GRANT ALL PRIVILEGES ON giteadb.* TO 'gitea'@'example.gitea';
FLUSH PRIVILEGES;
```
Replace database user name, password, and Gitea instance domain as appropriate.
6. Make sure that the CA certificate chain required to validate the database server certificate is on the system certificate store of both the database and Gitea servers. Consult your system documentation for instructions on adding a CA certificate to the certificate store.
7. On the server running Gitea, test connection to the database:
```
mysql -u gitea -h example.db -p --ssl
```
You should be connected to the database.

View File

@@ -0,0 +1,238 @@
---
date: "2017-06-19T12:00:00+02:00"
slug: "install-from-binary"
sidebar_position: 15
aliases:
- /en-us/install-from-binary
---
# Installation from binary
All downloads come with SQLite, MySQL and PostgreSQL support, and are built with
embedded assets. This can be different from Gogs.
## Download
You can find the file matching your platform from the [downloads page](https://dl.gitea.com/gitea/) after navigating to the version you want to download.
### Choosing the right file
**For Linux**, you will likely want `linux-amd64`. It's for 64-bit Intel/AMD platforms, but there are other platforms available, including `arm64` (e.g. Raspberry PI 4), `386` (i.e. 32-bit), `arm-5`, and `arm-6`.
**For Windows**, you will likely want `windows-4.0-amd64`. It's for all modern versions of Windows, but there is also a `386` platform available designed for older, 32-bit versions of Windows.
:::info
There is also a `gogit-windows` file available that was created to help with some [performance problems](https://github.com/go-gitea/gitea/pull/15482) reported by some Windows users on older systems/versions. You should consider using this file if you're experiencing performance issues, and let us know if it improves performance.
:::
**For macOS**, you should choose `darwin-arm64` if your hardware uses Apple Silicon, or `darwin-amd64` for Intel.
**For FreeBSD**, you should choose `freebsd12-amd64` for 64-bit Intel/AMD platforms.
### Downloading with wget
Copy the commands below and replace the URL within the one you wish to download.
```shell
wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64
chmod +x gitea
```
Note that the above command will download Gitea @version@ for 64-bit Linux.
## Verify GPG signature
Gitea signs all binaries with a [GPG key](https://keys.openpgp.org/search?q=teabot%40gitea.io) to prevent against unwanted modification of binaries.
To validate the binary, download the signature file which ends in `.asc` for the binary you downloaded and use the GPG command line tool.
```sh
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
gpg --verify gitea-@version@-linux-amd64.asc gitea-@version@-linux-amd64
```
Look for the text `Good signature from "Teabot <teabot@gitea.io>"` to assert a good binary,
despite warnings like `This key is not certified with a trusted signature!`.
## Recommended server configuration
:::note
Many of the following directories can be configured using [Environment Variables](../administration/environment-variables.md) as well!
Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation.
:::
### Prepare environment
Check that Git is installed on the server. If it is not, install it first. Gitea requires Git version >= 2.0.
```sh
git --version
```
Create a user to run Gitea (e.g. `git`)
```sh
# On Ubuntu/Debian:
adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
# On Fedora/RHEL/CentOS:
groupadd --system git
adduser \
--system \
--shell /bin/bash \
--comment 'Git Version Control' \
--gid git \
--home-dir /home/git \
--create-home \
git
```
### Create required directory structure
```sh
mkdir -p /var/lib/gitea/{custom,data,log}
chown -R git:git /var/lib/gitea/
chmod -R 750 /var/lib/gitea/
mkdir /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea
```
:::note
> `/etc/gitea` is temporarily set with write permissions for user `git` so that the web installer can write the configuration file. After the installation is finished, it is recommended to set permissions to read-only using:
:::
>
> ```sh
> chmod 750 /etc/gitea
> chmod 640 /etc/gitea/app.ini
> ```
If you don't want the web installer to be able to write to the config file, it is possible to make the config file read-only for the Gitea user (owner/group `root:git`, mode `0640`) however you will need to edit your config file manually to:
* Set `INSTALL_LOCK= true`,
* Ensure all database configuration details are set correctly
* Ensure that the `SECRET_KEY` and `INTERNAL_TOKEN` values are set. (You may want to use the `gitea generate secret` to generate these secret keys.)
* Ensure that any other secret keys you need are set.
See the [command line documentation](../administration/command-line.md) for information on using `gitea generate secret`.
### Configure Gitea's working directory
:::note
If you plan on running Gitea as a Linux service, you can skip this step, as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
:::
```sh
export GITEA_WORK_DIR=/var/lib/gitea/
```
### Copy the Gitea binary to a global location
```sh
cp gitea /usr/local/bin/gitea
```
### Adding shell autocompletion (from 1.25)
Shell completion can be generated directly from binary with:
```sh
gitea completion <shell>
```
Supported values for `<shell>` are `bash`, `fish`, `pwsh` and `zsh`. Details on how to load the completion for your shell can be found in the completion command help.
## Running Gitea
After you complete the above steps, you can run Gitea two ways:
### 1. Creating a service file to start Gitea automatically (recommended)
See how to create [Linux service](installation/run-as-service-in-ubuntu.md)
### 2. Running from command-line/terminal
```sh
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
```
## Updating to a new version
You can update to a new version of Gitea by stopping Gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.
The binary file name should not be changed during the update to avoid problems in existing repositories.
It is recommended that you make a [backup](../administration/backup-and-restore.md) before updating your installation.
If you have carried out the installation steps as described above, the binary should
have the generic name `gitea`. Do not change this, i.e. to include the version number.
### 1. Restarting Gitea with systemd (recommended)
As we explained before, we recommend to use systemd as the service manager. In this case, `systemctl restart gitea` should be fine.
### 2. Restarting Gitea without systemd
To restart your Gitea instance, we recommend to use SIGHUP signal. If you know your Gitea PID, use `kill -1 $GITEA_PID`, otherwise you can use `killall -1 gitea`.
To gracefully stop the Gitea instance, a simple `kill $GITEA_PID` or `killall gitea` is enough.
:::note
We don't recommend to use the SIGKILL signal (`-9`); you may be forcefully stopping some of Gitea's internal tasks, and it will not gracefully stop (tasks in queues, indexers, etc.)
:::
See below for troubleshooting instructions to repair broken repositories after
an update of your Gitea version.
## Troubleshooting
### Old glibc versions
Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to load the
Gitea binary, usually producing an error such as `./gitea: /lib/x86_64-linux-gnu/libc.so.6:
version 'GLIBC\_2.14' not found (required by ./gitea)`. This is due to the integrated
SQLite support in the binaries provided by dl.gitea.com. In this situation, it is usually
possible to [install from source](installation/from-source.md), without including
SQLite support.
### Running Gitea on another port
For errors like `702 runWeb()] [E] Failed to start server: listen tcp 0.0.0.0:3000:
bind: address already in use`, Gitea needs to be started on another free port. This
is possible using `./gitea web -p $PORT`. It's possible another instance of Gitea
is already running.
### Running Gitea on Raspbian
As of v1.8, there is a problem with the arm7 version of Gitea, and it doesn't run on Raspberry Pis and similar devices.
It is recommended to switch to the arm6 version, which has been tested and shown to work on Raspberry Pis and similar devices.
{/* please remove after fixing the arm7 bug */}
### Git error after updating to a new version of Gitea
If during the update, the binary file name has been changed to a new version of Gitea,
Git Hooks in existing repositories will not work any more. In that case, a Git
error will be displayed when pushing to the repository.
```
remote: ./hooks/pre-receive.d/gitea: line 2: [...]: No such file or directory
```
The `[...]` part of the error message will contain the path to your previous Gitea
binary.
To solve this, go to the admin options and run the task `Resynchronize pre-receive,
update and post-receive hooks of all repositories` to update all hooks to contain
the new binary path. Please note that this overwrites all Git Hooks, including ones
with customizations made.
If you aren't using the Gitea built-in SSH server, you will also need to re-write
the authorized key file by running the `Update the '.ssh/authorized_keys' file with
Gitea SSH keys.` task in the admin options.

View File

@@ -1,18 +1,9 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Installation from package"
slug: "install-from-package"
sidebar_position: 20
toc: false
draft: false
aliases:
- /en-us/install-from-package
menu:
sidebar:
parent: "installation"
name: "From package"
sidebar_position: 20
identifier: "install-from-package"
---
# Installation from Package

View File

@@ -0,0 +1,254 @@
---
date: "2016-12-01T16:00:00+02:00"
slug: "install-from-source"
sidebar_position: 30
aliases:
- /en-us/install-from-source
---
# Installation from source
You should [install go](https://go.dev/doc/install) and set up your go
environment correctly. In particular, it is recommended to set the `$GOPATH`
environment variable and to add the go bin directory or directories
`${GOPATH//://bin:}/bin` to the `$PATH`. See the Go wiki entry for
[GOPATH](https://github.com/golang/go/wiki/GOPATH).
Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
required to build the JavaScript and CSS files. The minimum supported Node.js
version is @minNodeVersion@ and the latest LTS version is recommended.
:::note
Go version @minGoVersion@ or higher is required. However, it is recommended to
obtain the same version as our continuous integration, see the advice given in
[Hacking on Gitea](development/hacking-on-gitea.md)
:::
## Download
First, we must retrieve the source code. Since, the advent of go modules, the
simplest way of doing this is to use Git directly as we no longer have to have
Gitea built from within the GOPATH.
```bash
git clone https://github.com/go-gitea/gitea
```
(Previous versions of this document recommended using `go get`. This is
no longer necessary.)
Decide which version of Gitea to build and install. Currently, there are
multiple options to choose from. The `main` branch represents the current
development version. To build with main, skip to the [build section](#build).
To work with tagged releases, the following commands can be used:
```bash
git branch -a
git checkout @sourceBranch@
```
To validate a Pull Request, first enable the new branch (`xyz` is the PR id;
for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)):
```bash
git fetch origin pull/xyz/head:pr-xyz
```
To build Gitea from source at a specific tagged release (like @sourceVersion@), list the
available tags and check out the specific tag.
List available tags with the following.
```bash
git tag -l
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## Build
To build from source, the following programs must be present on the system:
- `go` @minGoVersion@ or higher, see [here](https://go.dev/dl/)
- `node` @minNodeVersion@ or higher with `npm`, see [here](https://nodejs.org/en/download/)
- `make`, see [here](development/hacking-on-gitea.md#installing-make)
Various [make tasks](https://github.com/go-gitea/gitea/blob/main/Makefile)
are provided to keep the build process as simple as possible.
Depending on requirements, the following build tags can be included.
- `bindata`: Build a single monolithic binary, with all assets included. Required for production build.
- `sqlite sqlite_unlock_notify`: Enable support for a
[SQLite3](https://sqlite.org/) database. Suggested only for tiny
installations.
- `pam`: Enable support for PAM (Linux Pluggable Authentication Modules). Can
be used to authenticate local users or extend authentication to methods
available to PAM.
- `gogit`: (EXPERIMENTAL) Use go-git variants of Git commands.
Bundling all assets (JS/CSS/templates, etc) into the binary. Using the `bindata` build tag is required for
production deployments. You could exclude `bindata` when you are developing/testing Gitea or able to separate the assets correctly.
To include all assets, use the `bindata` tag:
```bash
TAGS="bindata" make build
```
In the default release build of our continuous integration system, the build
tags are: `TAGS="bindata sqlite sqlite_unlock_notify"`. The simplest
recommended way to build from source is therefore:
```bash
TAGS="bindata sqlite sqlite_unlock_notify" make build
```
The `build` target is split into two sub-targets:
- `make backend` which requires [Go @minGoVersion@](https://go.dev/dl/) or greater.
- `make frontend` which requires [Node.js @minNodeVersion@](https://nodejs.org/en/download/) or greater.
If pre-built frontend files are present it is possible to only build the backend:
```bash
TAGS="bindata" make backend
```
## Test
After following the steps above, a `gitea` binary will be available in the working directory.
It can be tested from this directory or moved to a directory with test data. When Gitea is
launched manually from command line, it can be killed by pressing `Ctrl + C`.
```bash
./gitea web
```
## Changing default paths
Gitea will search for a number of things from the _`CustomPath`_. By default this is
the `custom/` directory in the current working directory when running Gitea. It will also
look for its configuration file _`CustomConf`_ in `$(CustomPath)/conf/app.ini`, and will use the
current working directory as the relative base path _`AppWorkPath`_ for a number configurable
values. Finally the static files will be served from _`StaticRootPath`_ which defaults to the _`AppWorkPath`_.
These values, although useful when developing, may conflict with downstream users preferences.
One option is to use a script file to shadow the `gitea` binary and create an appropriate
environment before running Gitea. However, when building you can change these defaults
using the `LDFLAGS` environment variable for `make`. The appropriate settings are as follows
- To set the _`CustomPath`_ use `LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.CustomPath=custom-path\""`
- For _`CustomConf`_ you should use `-X \"code.gitea.io/gitea/modules/setting.CustomConf=conf.ini\"`
- For _`AppWorkPath`_ you should use `-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=working-path\"`
- For _`StaticRootPath`_ you should use `-X \"code.gitea.io/gitea/modules/setting.StaticRootPath=static-root-path\"`
- To change the default PID file location use `-X \"code.gitea.io/gitea/cmd.PIDFile=/run/gitea.pid\"`
Add as many of the strings with their preceding `-X` to the `LDFLAGS` variable and run `make build`
with the appropriate `TAGS` as above.
Running `gitea help` will allow you to review what the computed settings will be for your `gitea`.
## Cross Build
The `go` compiler toolchain supports cross-compiling to different architecture targets that are supported by the toolchain. See [`GOOS` and `GOARCH` environment variable](https://go.dev/doc/install/source#environment) for the list of supported targets. Cross compilation is helpful if you want to build Gitea for less-powerful systems (such as Raspberry Pi).
To cross build Gitea with build tags (`TAGS`), you also need a C cross compiler which targets the same architecture as selected by the `GOOS` and `GOARCH` variables. For example, to cross build for Linux ARM64 (`GOOS=linux` and `GOARCH=arm64`), you need the `aarch64-unknown-linux-gnu-gcc` cross compiler. This is required because Gitea build tags uses `cgo`'s foreign-function interface (FFI).
Cross-build Gitea for Linux ARM64, without any tags:
```
GOOS=linux GOARCH=arm64 make build
```
Cross-build Gitea for Linux ARM64, with recommended build tags:
```
CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sqlite_unlock_notify" make build
```
Replace `CC`, `GOOS`, and `GOARCH` as appropriate for your architecture target.
You will sometimes need to build a static compiled image. To do this you will need to add:
```
LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="netgo osusergo $TAGS" make build
```
This can be combined with `CC`, `GOOS`, and `GOARCH` as above.
### Adding shell autocompletion (from 1.25)
Shell completion can be generated directly from binary with:
```sh
gitea completion <shell>
```
Supported values for `<shell>` are `bash`, `fish`, `pwsh` and `zsh`. Details on how to load the completion for your shell can be found in the completion command help.
## Compile or cross-compile using Linux with Zig
Follow [Getting Started of Zig](https://ziglang.org/learn/getting-started/#installing-zig) to install zig.
- Compile (Linux ➝ Linux)
```sh
CC="zig cc -target x86_64-linux-gnu" \
CGO_ENABLED=1 \
CGO_CFLAGS="-O2 -g -pthread" \
CGO_LDFLAGS="-linkmode=external -v"
GOOS=linux \
GOARCH=amd64 \
TAGS="bindata sqlite sqlite_unlock_notify" \
make build
```
- Cross-compile (Linux ➝ Windows)
```sh
CC="zig cc -target x86_64-windows-gnu" \
CGO_ENABLED=1 \
CGO_CFLAGS="-O2 -g -pthread" \
GOOS=windows \
GOARCH=amd64 \
TAGS="bindata sqlite sqlite_unlock_notify" \
make build
```
## Compile or cross-compile with Zig using Windows
Compile with `GIT BASH`.
- Compile (Windows ➝ Windows)
```sh
CC="zig cc -target x86_64-windows-gnu" \
CGO_ENABLED=1 \
CGO_CFLAGS="-O2 -g -pthread" \
GOOS=windows \
GOARCH=amd64 \
TAGS="bindata sqlite sqlite_unlock_notify" \
make build
```
- Cross-compile (Windows ➝ Linux)
```sh
CC="zig cc -target x86_64-linux-gnu" \
CGO_ENABLED=1 \
CGO_CFLAGS="-O2 -g -pthread" \
CGO_LDFLAGS="-linkmode=external -v"
GOOS=linux \
GOARCH=amd64 \
TAGS="bindata sqlite sqlite_unlock_notify" \
make build
```
## Source Maps
By default, gitea generates reduced source maps for frontend files to conserve space. This can be controlled with the `ENABLE_SOURCEMAP` environment variable:
- `ENABLE_SOURCEMAP=true` generates all source maps, the default for development builds
- `ENABLE_SOURCEMAP=reduced` generates limited source maps, the default for production builds
- `ENABLE_SOURCEMAP=false` generates no source maps

View File

@@ -0,0 +1,43 @@
---
date: "2016-12-01T16:00:00+02:00"
slug: "install-on-cloud-provider"
sidebar_position: 90
aliases:
- /en-us/install-on-cloud-provider
---
# Installation on Cloud Provider
## Cloudron
Gitea is available as a 1-click install on [Cloudron](https://cloudron.io).
Cloudron makes it easy to run apps like Gitea on your server and keep them up-to-date and secure.
[![Install](/cloudron.svg)](https://cloudron.io/button.html?app=io.gitea.cloudronapp)
The Gitea package is maintained [here](https://git.cloudron.io/cloudron/gitea-app).
There is a [demo instance](https://my.demo.cloudron.io) (username: cloudron password: cloudron) where
you can experiment with running Gitea.
## Linode
[Linode](https://www.linode.com/) has Gitea as an app in their marketplace.
To deploy Gitea to Linode, have a look at the [Linode Marketplace](https://www.linode.com/marketplace/apps/linode/gitea/).
## alwaysdata
[alwaysdata](https://www.alwaysdata.com/) has Gitea as an app in their marketplace.
To deploy Gitea to alwaysdata, have a look at the [alwaysdata Marketplace](https://www.alwaysdata.com/en/marketplace/gitea/).
## Exoscale
[Exoscale](https://www.exoscale.com/) provides Gitea managed by [Glasskube](https://glasskube.eu/) in their marketplace.
Exoscale is a European cloud service provider.
The package is maintained and update via the open source [Glasskube Kubernetes Operator](https://github.com/glasskube/operator).
To deploy Gitea to Exoscale, have a look at the [Exoscale Marketplace](https://www.exoscale.com/marketplace/listing/glasskube-gitea/).

View File

@@ -1,21 +1,12 @@
---
date: "2020-03-19T19:27:00+02:00"
title: "Install on Kubernetes"
slug: "install-on-kubernetes"
sidebar_position: 80
toc: false
draft: false
aliases:
- /en-us/install-on-kubernetes
menu:
sidebar:
parent: "installation"
name: "Kubernetes"
sidebar_position: 80
identifier: "install-on-kubernetes"
---
# Installation with Helm (on Kubernetes)
# Install on Kubernetes
Gitea provides a Helm Chart to allow for installation on kubernetes.
@@ -46,7 +37,7 @@ Gitea comes with a health check endpoint `/api/healthz`, you can configure it in
a successful health check response will respond with http code `200`, here's example:
```
```json
HTTP/1.1 200 OK
{

View File

@@ -1,18 +1,9 @@
---
date: "2017-07-21T12:00:00+02:00"
title: "Run as a Linux service"
slug: "linux-service"
sidebar_position: 40
toc: false
draft: false
aliases:
- /en-us/linux-service
menu:
sidebar:
parent: "installation"
name: "Linux service"
sidebar_position: 40
identifier: "linux-service"
---
# Run as a Linux service

View File

@@ -1,18 +1,9 @@
---
date: "2021-09-02T16:00:00+08:00"
title: "Upgrade from an old Gitea"
slug: "upgrade-from-gitea"
sidebar_position: 100
toc: false
draft: false
aliases:
- /en-us/upgrade-from-gitea
menu:
sidebar:
parent: "installation"
name: "Upgrade From Old Gitea"
sidebar_position: 100
identifier: "upgrade-from-gitea"
---
# Upgrade from an old Gitea

View File

@@ -1,26 +1,18 @@
---
date: "2016-12-21T15:00:00-02:00"
title: "Register as a Windows service"
slug: "windows-service"
sidebar_position: 50
toc: false
draft: false
aliases:
- /en-us/windows-service
menu:
sidebar:
parent: "installation"
name: "Windows Service"
sidebar_position: 50
identifier: "windows-service"
---
# Register as a Windows service
## Prerequisites
The following changes are made in C:\gitea\custom\conf\app.ini:
```
```ini title="app.ini"
RUN_USER = COMPUTERNAME$
```
@@ -32,7 +24,7 @@ COMPUTERNAME is whatever the response is from `echo %COMPUTERNAME%` on the comma
If you use SQLite3, change the `PATH` to include the full path:
```
```ini title="app.ini"
[database]
PATH = c:/gitea/data/gitea.db
```
@@ -42,7 +34,7 @@ PATH = c:/gitea/data/gitea.db
To register Gitea as a Windows service, open a command prompt (cmd) as an Administrator,
then run the following command:
```
```sh
sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\""
```
@@ -57,7 +49,7 @@ that was configured).
It was observed that on loaded systems during boot Gitea service may fail to start with timeout records in Windows Event Log.
In that case change startup type to `Automatic-Delayed`. This can be done during service creation, or by running config command
```
```sh
sc.exe config gitea start= delayed-auto
```
@@ -65,7 +57,7 @@ sc.exe config gitea start= delayed-auto
To add a startup dependency to the Gitea Windows service (eg Mysql, Mariadb), as an Administrator, then run the following command:
```
```sh
sc.exe config gitea depend= mariadb
```
@@ -75,6 +67,6 @@ This will ensure that when the Windows machine restarts, the automatic starting
To unregister Gitea as a Windows service, open a command prompt (cmd) as an Administrator and run:
```
```sh
sc.exe delete gitea
```

View File

@@ -0,0 +1,123 @@
---
date: "2020-02-09T20:00:00+02:00"
slug: "install-with-docker-rootless"
sidebar_position: 60
aliases:
- /en-us/install-with-docker-rootless
---
# Installation with Docker (rootless)
## Relation to rootful image
* 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.
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
The most simple setup just creates a volume and a network and starts the `docker.gitea.com/gitea:latest-rootless`
image as a service. Since there is no database available, one can be initialized using SQLite3.
Create a directory for `data` and `config`:
```sh
mkdir -p gitea/{data,config}
cd gitea
touch docker-compose.yml
```
Then paste the following content into a file named `docker-compose.yml`:
```yaml
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"
```
Note that the volume should be owned by the user/group with the UID/GID specified in the config file. By default Gitea in docker will use uid:1000 gid:1000. If needed you can set ownership on those folders with the command:
```sh
sudo chown 1000:1000 config/ data/
```
> 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`)
## Named volumes
To use named volumes instead of host volumes, define and use the named volume
within the `docker-compose.yml` configuration. This change will automatically
create the required volume. You don't need to worry about permissions with
named volumes; Docker will deal with that automatically.
```diff
+volumes:
+ gitea-data:
+ driver: local
+ gitea-config:
+ driver: local
+
services:
server:
image: docker.gitea.com/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
+ - gitea-data:/var/lib/gitea
- - ./config:/etc/gitea
+ - gitea-config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "2222:2222"
```
MySQL or PostgreSQL containers will need to be created separately.
## Custom user
You can choose to use a custom user (following --user flag definition https://docs.docker.com/engine/reference/run/#user).
As an example to clone the host user `git` definition use the command `id -u git` and add it to `docker-compose.yml` file:
Please make sure that the mounted folders are writable by the user.
```diff
services:
server:
image: docker.gitea.com/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
- ./data:/var/lib/gitea
- ./config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "2222:2222"
```

View File

@@ -0,0 +1,329 @@
---
date: "2020-03-19T19:27:00+02:00"
slug: "install-with-docker"
sidebar_position: 70
aliases:
- /en-us/install-with-docker
---
# 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
Docker images.
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
The most simple setup just creates a volume and a network and starts the `docker.gitea.com/gitea:latest`
image as a service. Since there is no database available, one can be initialized using SQLite3.
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
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
networks:
gitea:
external: false
services:
server:
image: docker.gitea.com/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
```
## Ports
To bind the integrated OpenSSH daemon 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
networks:
gitea:
external: false
services:
server:
image: docker.gitea.com/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- - "3000:3000"
- - "222:22"
+ - "8080:3000"
+ - "2221:22"
```
## Databases
### MySQL database
To start Gitea in combination with a MySQL database, apply these changes to the
`docker-compose.yml` file created above.
```diff
networks:
gitea:
external: false
services:
server:
image: docker.gitea.com/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
+ - GITEA__database__NAME=gitea
+ - GITEA__database__USER=gitea
+ - GITEA__database__PASSWD=gitea
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
+ 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
+ networks:
+ - 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
networks:
gitea:
external: false
services:
server:
image: docker.gitea.com/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
+ - GITEA__database__NAME=gitea
+ - GITEA__database__USER=gitea
+ - GITEA__database__PASSWD=gitea
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
+ depends_on:
+ - db
+
+ db:
+ image: docker.io/library/postgres:14
+ restart: always
+ environment:
+ - POSTGRES_USER=gitea
+ - POSTGRES_PASSWORD=gitea
+ - POSTGRES_DB=gitea
+ networks:
+ - gitea
+ volumes:
+ - ./postgres:/var/lib/postgresql/data
```
## Named volumes
To use named volumes instead of host volumes, define and use the named volume
within the `docker-compose.yml` configuration. This change will automatically
create the required volume. You don't need to worry about permissions with
named volumes; Docker will deal with that automatically.
```diff
networks:
gitea:
external: false
+volumes:
+ gitea:
+ driver: local
+
services:
server:
image: docker.gitea.com/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:
- gitea
volumes:
- - ./gitea:/data
+ - gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
```
MySQL or PostgreSQL containers will need to be created separately.
## Startup
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/`.
:::
## Installation
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.
## Configure the user inside Gitea using environment variables
- `USER`: **git**: The username of the user that runs Gitea within the container.
- `USER_UID`: **1000**: The UID (Unix user ID) of the user that runs Gitea within the container. Match this to the UID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes).
- `USER_GID`: **1000**: The GID (Unix group ID) of the user that runs Gitea within the container. Match this to the GID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes).
## Customization
Customization files described [here](../administration/customizing-gitea.md) should
be placed in `/data/gitea` 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/_data`. The configuration file will be saved at
`/data/gitea/conf/app.ini` after the installation.
Example: Analogous to the non-docker-installation customization linked above, you can create a `/public` folder within `/data/gitea` and place your custom `robots.txt` there which will then be served normally.
## Upgrading
:::warning
Make sure you have volumed data to somewhere outside Docker container
:::
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
```
## 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=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
`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.
```yaml
...
services:
server:
environment:
- GITEA__mailer__ENABLED=true
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
- GITEA__mailer__PROTOCOL=smtps
- GITEA__mailer__SMTP_ADDR=${GITEA__mailer__SMTP_ADDR:?GITEA__mailer__SMTP_ADDR not set}
- GITEA__mailer__SMTP_PORT=${GITEA__mailer__SMTP_PORT:?GITEA__mailer__SMTP_PORT not set}
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
```
Gitea will generate new secrets/tokens for every new installation automatically and write them into the app.ini. If you want to set the secrets/tokens manually, you can use the following docker commands to use of Gitea's built-in [generate utility functions](../administration/command-line.md#generate). Do not lose/change your SECRET_KEY after the installation, otherwise the encrypted data can not be decrypted anymore.
The following commands will output a new `SECRET_KEY` and `INTERNAL_TOKEN` to `stdout`, which you can then place in your environment variables.
```bash
docker run -it --rm docker.gitea.com/gitea:1 gitea generate secret SECRET_KEY
docker run -it --rm docker.gitea.com/gitea:1 gitea generate secret INTERNAL_TOKEN
```
```yaml
...
services:
server:
environment:
- GITEA__security__SECRET_KEY=[value returned by generate secret SECRET_KEY]
- GITEA__security__INTERNAL_TOKEN=[value returned by generate secret INTERNAL_TOKEN]
```
### 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.

View File

@@ -0,0 +1,9 @@
{
"label": "Usage",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/usage",
"title": "Usage"
}
}

View File

@@ -0,0 +1,9 @@
{
"label": "Access Control",
"position": 100,
"link": {
"type": "generated-index",
"slug": "/usage/access-control",
"description": "Permissions, security, and access control features"
}
}

View File

@@ -0,0 +1,47 @@
---
date: "2024-01-31T00:00:00+00:00"
slug: "blocking-user"
sidebar_position: 25
aliases:
- /blocking-user
---
# Blocking a user
Gitea supports blocking of users to restrict how they can interact with you and your content.
You can block a user in your account settings, from the user's profile or from comments created by the user.
The user is not directly notified about the block, but they can notice they are blocked when they attempt to interact with you.
Organization owners can block anyone who is not a member of the organization too.
If a blocked user has admin permissions, they can still perform all actions even if blocked.
### When you block a user
- the user stops following you
- you stop following the user
- the user's stars are removed from your repositories
- your stars are removed from their repositories
- the user stops watching your repositories
- you stop watching their repositories
- the user's issue assignments are removed from your repositories
- your issue assignments are removed from their repositories
- the user is removed as a collaborator on your repositories
- you are removed as a collaborator on their repositories
- any pending repository transfers to or from the blocked user are canceled
### When you block a user, the user cannot
- follow you
- watch your repositories
- star your repositories
- fork your repositories
- transfer repositories to you
- open issues or pull requests on your repositories
- comment on issues or pull requests you've created
- comment on issues or pull requests on your repositories
- react to your comments on issues or pull requests
- react to comments on issues or pull requests on your repositories
- assign you to issues or pull requests
- add you as a collaborator on their repositories
- send you notifications by @mentioning your username
- be added as team member (if blocked by an organization)

View File

@@ -1,18 +1,10 @@
---
date: "2021-12-13:10:10+08:00"
title: "Permissions"
slug: "permissions"
sidebar_position: 14
toc: false
draft: false
aliases:
- /en-us/permissions
menu:
sidebar:
parent: "usage"
name: "Permissions"
sidebar_position: 14
identifier: "permissions"
- /permissions
---
# Permissions

View File

@@ -0,0 +1,90 @@
---
date: "2025-11-20T00:00:00-07:00"
slug: "protected-branches"
sidebar_position: 44
aliases:
- /en-us/protected-branches
- /en-us/protected-branch
- /protected-branches
---
# Protected branches
Protected branches prevent unwanted changes by enforcing push and merge policies on selected branches. The rules are enforced for every Git protocol (HTTP(S), SSH), the web editor, the API, and background jobs such as auto-merge. Only repository owners and administrators can manage the rules, and the Branches page is read-only while a repository is archived.
## Creating or editing a rule
1. Open the repository and select **Settings → Branches** (repository admin permission required).
2. Select **Add new rule** or **Edit** next to an existing rule.
3. Fill in the **Protected branch name pattern** and optional file patterns, then configure the push, merge, and review options described below.
4. Select **Save rule**.
The rule immediately applies to all matching branches, even if the branches are created in the future.
## Rule matching and priorities
- The **Protected branch name pattern** accepts [glob](https://github.com/gobwas/glob) expressions and matches the entire branch name. Patterns are case-sensitive. Using a simple name such as `main` without glob special characters always matches that specific branch (case-insensitive).
- If multiple rules match the same branch, only the first rule is used. Reorder the list on the **Branches** page by dragging the grab handle. The first entry (priority 1) has the highest priority, so place patterns such as `main` or `release/*` before generic fallbacks such as `*`.
Example patterns:
| Pattern | Matches |
| -------------- | ------------------------------- |
| `main` | The `main` branch only |
| `release/*` | `release/v1.0`, `release/april` |
| `hotfix/**` | Nested branches such as `hotfix/security/CVE` |
| `*` | Every branch (use as a fallback) |
### File-level pattern controls
- **Protected file patterns** block changes to sensitive files (for example `.drone.yml` or `/docs/**/*.txt`). Patterns are case-insensitive and separated by semicolons. Commits and merge attempts that touch one of the files are rejected.
- **Unprotected file patterns** do the opposite: if pushes are blocked, users with write access can still push commits that modify only the listed files. This is useful for letting contributors update documentation while still requiring pull requests for code.
Both fields use the same `glob` syntax and match paths relative to the repository root.
## Controlling direct pushes
The **Push** section controls direct pushes (including the web editor and API).
- **Disable push** makes the branch read-only. Any attempt to push directly fails, and changes must be merged through pull requests.
- **Enable push** allows anyone with [write access](./permissions.md) to push (force pushes are still blocked unless explicitly allowed).
- **Allowlist restricted push** requires being on the allowlist. Choose users and, for organization-owned repositories, teams. Deploy keys that already have write access can also be allowlisted.
When a push is blocked, the server-side hook rejects the update with an explanation.
### Force pushes
Force pushes have their own set of options:
- **Disable force push** completely forbids rewriting history on the branch.
- **Enable force push** allows anyone who can push to also force push.
- **Allowlist restricted force push** limits force pushes to a separate allowlist (users, teams, and optionally deploy keys) **and** requires the person to already have regular push access.
## Pull request merges and approvals
- **Merge allowlist**: keep the default to let anyone with write access merge pull requests, or enable the allowlist to restrict merges to selected users/teams.
- **Required approvals**: specify how many approvals are needed before a merge is allowed. Reviews from users with write access count, unless the **Restrict approvals to allowlisted users or teams** option is enabled.
- **Dismiss stale approvals** removes existing approvals whenever new commits that change the pull request content are pushed.
- **Ignore stale approvals** keeps approvals but does not count reviews that were made on older commits. This option is disabled while dismissal of stale approvals is enabled.
- **Block merge on rejected reviews** prevents merging while any official reviewer has requested changes.
- **Block merge on official review requests** blocks merges while there are outstanding review requests (for example when CODEOWNERS requires a review).
- **Block merge if the pull request is outdated** makes sure the head branch is up to date with the base branch before it can be merged.
- **Administrators must follow branch protection rules** removes the ability for repository administrators to bypass the rules with the "Force merge" button.
Protected file patterns apply to pull requests as well. When a pull request changes one of the protected files, the pull request banner shows the affected paths and merging stays disabled.
## Status checks
Enable status checks to require one or more CI jobs to succeed before merging:
1. Check **Enable status check**.
2. Enter one pattern per line in **Status check patterns**. Each pattern is a `glob` expression that matches the context name reported by Actions, Drone, Woodpecker, or another Check API client (for example `actions/test-*`).
3. Pick contexts from the table of jobs that have reported results in the last week to verify their names.
When the option is active, Gitea requires at least one context that matches each pattern to report success on the pull request head commit. An empty list is not allowed; use `*` to require the latest commit to be successful regardless of the context name.
## Signed commits and other safeguards
- **Require signed commits** rejects pushes that contain unsigned or unverifiable commits. The check runs inside the server hook before the push is accepted.
- **Protected file patterns** (see above) prevent both pushes and merges that modify sensitive files.
- **Unprotected file patterns** allow limited pushes while keeping the branch protected.

View File

@@ -1,18 +1,10 @@
---
date: "2021-05-14T00:00:00-00:00"
title: "Protected tags"
slug: "protected-tags"
sidebar_position: 45
toc: false
draft: false
aliases:
- /en-us/protected-tags
menu:
sidebar:
parent: "usage"
name: "Protected tags"
sidebar_position: 45
identifier: "protected-tags"
- /protected-tags
---
# Protected tags

View File

@@ -0,0 +1,9 @@
{
"label": "Actions",
"position": 30,
"link": {
"type": "generated-index",
"slug": "/usage/actions",
"description": "Automating workflows with Actions"
}
}

View File

@@ -1,18 +1,7 @@
---
date: "2023-02-25T00:00:00+00:00"
title: "Badge"
slug: "badge"
sidebar_position: 11
toc: false
draft: false
aliases:
- /en-us/badge
menu:
sidebar:
parent: "usage"
name: "Badge"
sidebar_position: 11
identifier: "Badge"
sidebar_position: 110
---
# Badge
@@ -27,7 +16,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}&style={style}
```
- `{owner}`: The owner of the repository.
@@ -35,3 +24,4 @@ https://your-gitea-instance.com/{owner}/{repo}/actions/workflows/{workflow_file}
- `{workflow_file}`: The name of the workflow file.
- `{branch}`: Optional. The branch of the workflow. Default to your repository's default branch.
- `{event}`: Optional. The event of the workflow. Default to none.
- `{style}`: Optional. Style of the badge, either `flat` or `flat-square`. Default to `flat`.

View File

@@ -0,0 +1,116 @@
---
date: "2023-04-27T15:00:00+08:00"
slug: "comparison"
sidebar_position: 120
---
# Compared to GitHub Actions
Even though Gitea Actions is designed to be compatible with GitHub Actions, there are some differences between them.
## Additional features
### Absolute action URLs
Gitea Actions supports defining actions via absolute URL, which means that you can use actions from any git repository.
Like `uses: https://github.com/actions/checkout@v4` or `uses: http://your_gitea.com/owner/repo@branch`.
### Actions written in Go
Gitea Actions supports writing actions in Go.
See [Creating Go Actions](https://blog.gitea.com/creating-go-actions/).
### Support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly on schedule
Github Actions doesn't support that. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
## Unsupported workflows syntax
### `jobs.<job_id>.timeout-minutes`
See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes).
It's ignored by Gitea Actions now.
### `jobs.<job_id>.continue-on-error`
See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error).
It's ignored by Gitea Actions now.
### `jobs.<job_id>.environment`
See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idenvironment).
It's ignored by Gitea Actions now.
### Complex `runs-on`
See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on).
Gitea Actions only supports `runs-on: xyz` or `runs-on: [xyz]` now.
## Missing features
### Package repository authorization
The `GITEA_TOKEN` for a job running within a repository should be able to publish to the associated package repository (i.e. to upload OCI images). See the "packages" scope for the "default access" in [Automatic token authentication](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token).
This is not implemented in Gitea Actions now. A workaround for Gitea Actions is to use a Personal Access Token (PAT). See this [github issue and comment](https://github.com/go-gitea/gitea/issues/23642#issuecomment-2119876692) for tracking this feature.
### Problem Matchers
Problem Matchers are a way to scan the output of actions for a specified regex pattern and surface that information prominently in the UI.
See [Problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md).
It's ignored by Gitea Actions now.
### Create an error annotation
See [Creating an annotation for an error](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-creating-an-annotation-for-an-error)
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
Pre and Post steps don't have their own section in the job log user interface.
### Services steps
Services steps don't have their own section in the job log user interface.
## Different behavior
### Job token permissions (`permissions`)
Gitea supports `permissions` and `jobs.<job_id>.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`.
We have since restricted this option to only allow two values (`github` and `self`).
When set to `github`, the new default, Gitea will download non-fully-qualified actions from `https://github.com`.
For example, if you use `uses: actions/checkout@v4`, it will download the checkout repository from `https://github.com/actions/checkout.git`.
If you want to download an action from another git hoster, you can use an absolute URL, e.g. `uses: https://gitea.com/actions/checkout@v4`.
If your Gitea instance is in an intranet or a restricted area, you can set the URL to `self` to only download actions from your own instance by default.
Of course, you can still use absolute URLs in workflows.
More details about the `[actions].DEFAULT_ACTIONS_URL` configuration can be found in the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions)。
### Context availability
Context availability is not checked, so you can use the env context on more places.
See [Context availability](https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability).

View File

@@ -0,0 +1,98 @@
---
date: "2023-04-27T15:00:00+08:00"
slug: "design"
sidebar_position: 140
---
# Design of Gitea Actions
Gitea Actions has multiple components. This document describes them individually.
## Gitea Runner
Gitea Runner is based on a hard fork of [nektos/act](https://github.com/nektos/act).
Like other CI runners, we designed it as an external part of Gitea, which means it should run on a different server than Gitea.
To ensure that the runner connects to the correct Gitea instance, we need to register it with a token.
Additionally, the runner will introduce itself to Gitea and declare what kind of jobs it can run by reporting its labels.
Earlier, we mentioned that `runs-on: ubuntu-latest` in a workflow file means that the job will be run on a runner with the `ubuntu-latest` label.
But how does the runner know to run `ubuntu-latest`? The answer lies in mapping the label to an environment.
That's why when you add custom labels during registration, you will need to input some complex content like `my_custom_label:docker://centos:7`.
This means that the runner can take the job which needs to run on `my_custom_label`, and it will run it via a docker container with the image `centos:7`.
Docker isn't the only option, though.
The runner also supports running jobs directly on the host.
This is achieved through labels like `linux_arm:host`.
This label indicates that the runner can take a job that needs to run on `linux_arm` and run it directly on the host.
The label's design follows the format `label[:schema[:args]]`.
If the schema is omitted, it defaults to `host`.
So,
- `my_custom_label:docker://node:18`: Run jobs labeled with `my_custom_label` using the `node:18` Docker image.
- `my_custom_label:host`: Run jobs labeled with `my_custom_label` directly on the host.
- `my_custom_label`: Same as `my_custom_label:host`.
- `my_custom_label:vm:ubuntu-latest`: (Example only, not implemented) Run jobs labeled with `my_custom_label` using a virtual machine with the `ubuntu-latest` ISO.
## Communication protocol
As the runner is an independent part of Gitea, we needed a protocol for runners to communicate with the Gitea instance.
However, we did not think it was a good idea to have Gitea listen on a new port.
Instead, we wanted to reuse the HTTP port, which means we needed a protocol that is compatible with HTTP.
We chose to use gRPC over HTTP.
We use [actions-proto-def](https://gitea.com/gitea/actions-proto-def) and [actions-proto-go](https://gitea.com/gitea/actions-proto-go) to wire them up.
More information about gRPC can be found on [its website](https://grpc.io/).
## Network architecture
Let's examine the overall network architecture.
This will help you troubleshoot some problems and explain why it's a bad idea to register a runner with a loopback address of the Gitea instance.
![network](/images/usage/actions/network.png)
There are four network connections marked in the picture, and the direction of the arrows indicates the direction of establishing the connections.
### Connection 1, runner to Gitea instance
The runner must be able to connect to Gitea to receive tasks and send back the execution results.
### Connection 2, job containers to Gitea instance
The job containers have different network namespaces than the runner, even if they are on the same machine.
They need to connect to Gitea to fetch codes if there is `actions/checkout@v4` in the workflow, for example.
Fetching code is not always necessary to run some jobs, but it is required in most cases.
If you use a loopback address to register a runner, the runner can connect to Gitea when it is on the same machine.
However, if a job container tries to fetch code from localhost, it will fail because Gitea is not in the same container.
### Connection 3, runner to internet
When you use some actions like `actions/checkout@v4`, the runner downloads the scripts, not the job containers.
By default, it downloads from [github.com](http://github.com/), so it requires access to the internet. If you configure the `DEFAULT_ACTIONS_URL` to `self`, then it will download from your Gitea instance by default. Then it will not connect to internet when downloading the action itself.
It also downloads some docker images from Docker Hub by default, which also requires internet access.
However, internet access is not strictly necessary.
You can configure your Gitea instance to fetch actions or images from your intranet facilities.
In fact, your Gitea instance can serve as both the actions marketplace and the image registry.
You can mirror actions repositories from GitHub to your Gitea instance, and use them as normal.
And [Gitea Container Registry](usage/packages/container.md) can be used as a Docker image registry.
### Connection 4, job containers to internet
When using actions such as `actions/setup-go@v5`, it may be necessary to download resources from the internet to set up the Go language environment in job containers.
Therefore, access to the internet is required for the successful completion of these actions.
However, it is optional as well.
You can use your own custom actions to avoid relying on internet access, or you can use your packaged Docker image to run jobs with all dependencies installed.
## Summary
Using Gitea Actions only requires ensuring that the runner can connect to the Gitea instance.
Internet access is optional, but not having it will require some additional work.
In other words: The runner works best when it can query the internet itself, but you don't need to expose it to the internet (in either direction).
If you encounter any network issues while using Gitea Actions, hopefully the image above can help you troubleshoot them.

175
docs/usage/actions/faq.md Normal file
View File

@@ -0,0 +1,175 @@
---
date: "2023-04-27T15:00:00+08:00"
slug: "faq"
sidebar_position: 200
---
# Frequently Asked Questions
This page contains some common questions and answers about Gitea Actions.
## Is it possible to disable Actions for new repositories by default for my own instance?
Yes, when you enable Actions for the instance, you can choose to enable the `actions` unit for all new repositories by default.
```ini
[repository]
; remove repo.actions will not enable actions for newly created repositories.
DEFAULT_REPO_UNITS = ...,repo.actions
```
## Should we use `${{ github.xyz }}` or `${{ gitea.xyz }}` in workflow files?
You can use `github.xyz` and Gitea will work fine.
As mentioned, Gitea Actions is designed to be compatible with GitHub Actions.
However, we recommend using `gitea.xyz` in case Gitea adds something that GitHub does not have to avoid different kinds of secrets in your workflow file (and because you are using this workflow on Gitea, not GitHub).
Still, this is completely optional since both options have the same effect at the moment.
## Where will the runner download scripts when using actions such as `actions/checkout@v4`?
There are tens of thousands of [actions scripts](https://github.com/marketplace?type=actions) in GitHub, and when you write `uses: actions/checkout@v4`, it downloads the scripts from [github.com/actions/checkout](http://github.com/actions/checkout) by default.
But what if you want to use actions from other places such as gitea.com instead of GitHub?
The good news is that you can specify the URL prefix to use actions from anywhere.
This is an extra syntax in Gitea Actions.
For example:
- `uses: https://gitea.com/xxx/xxx@xxx`
- `uses: https://github.com/xxx/xxx@xxx`
- `uses: http://your_gitea_instance.com/xxx@xxx`
Be careful, the `https://` or `http://` prefix is necessary!
This is one of the differences from GitHub Actions which supports actions scripts only from GitHub.
But it should allow users much more flexibility in how they run Actions.
Alternatively, if you want your runners to download actions from your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`.
See [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions).
## How to limit the permission of the runners?
Runners have no more permissions than simply connecting to your Gitea instance.
When any runner receives a job to run, it will temporarily gain limited permission to the repository associated with the job.
If you want to give more permissions to the runner, allowing it to access more private repositories or external systems, you can pass [secrets](usage/actions/secrets.md) to it.
Refined permission control to Actions is a complicated job.
In the future, we will add more options to Gitea to make it more configurable, such as allowing more write access to repositories or read access to all repositories in the same organization.
## Which operating systems are supported by Gitea Runner?
We released official binaries for Linux, macOS, and Windows.
While other operating systems are theoretically supported if it is supported by golang and docker(docker mode enabled).
One thing to note is that if you choose to run jobs directly on the host instead of in job containers, the environmental differences between operating systems may cause unexpected failures.
For example, bash is not available on Windows in most cases, while act tries to use bash to run scripts by default.
Therefore, you need to specify `powershell` as the default shell in your workflow file, see [defaults.run](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun).
```yaml
defaults:
run:
shell: powershell
```
## How to avoid being hacked?
There are two types of possible attacks: unknown runner stealing the code or secrets from your repository, or malicious scripts controlling your runner.
Avoiding the former means not allowing people you don't know to register runners for your repository, organization, or instance.
The latter is a bit more complicated.
If you're using a private Gitea instance for your company, you may not need to worry about security since you trust your colleagues and can hold them accountable.
For public instances, things are a little different.
Here's how we do it on [gitea.com](http://gitea.com/):
- We only register runners for the "gitea" organization, so our runners will not execute jobs from other repositories.
- Our runners always run jobs with isolated containers. While it is possible to do this directly on the host, we choose not to for more security.
- To run actions for fork pull requests, approval is required. See [#22803](https://github.com/go-gitea/gitea/pull/22803).
- If someone registers their own runner for their repository or organization on [gitea.com](http://gitea.com/), we have no objections and will just not use it in our org. However, they should take care to ensure that the runner is not used by other users they do not know.
## Why choose GitHub Actions? Why not something compatible with GitLab CI/CD?
[@lunny](https://gitea.com/lunny) has explained this in the [issue to implement actions](https://github.com/go-gitea/gitea/issues/13539).
Furthermore, Actions is not only a CI/CD system but also an automation tool.
There have also been numerous [marketplace actions](https://github.com/marketplace?type=actions) implemented in the open-source world.
It is exciting to be able to reuse them.
## What if it runs on multiple labels, such as `runs-on: [label_a, label_b]`?
This is valid syntax.
It means that it should run on runners that have both the `label_a` **and** `label_b` labels, see [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on).
Unfortunately, the runner does not work this way until v0.2.11.
As mentioned, we map labels to environments:
- `ubuntu``ubuntu:22.04`
- `centos``centos:8`
But we need to map label groups to environments instead, like so:
- `[ubuntu]``ubuntu:22.04`
- `[with-gpu]``linux:with-gpu`
- `[ubuntu, with-gpu]``ubuntu:22.04_with-gpu`
We also need to re-design how tasks are assigned to runners.
A runner with `ubuntu`, `centos`, or `with-gpu` does not necessarily indicate that it can accept jobs with `[centos, with-gpu]`.
Therefore, the runner should inform the Gitea instance that it can only accept jobs with `[ubuntu]`, `[centos]`, `[with-gpu]`, and `[ubuntu, with-gpu]`.
This is not a technical problem, it was just overlooked in the early design.
See [runtime.go#L65](https://gitea.com/gitea/runner/src/commit/90b8cc6a7a48f45cc28b5ef9660ebf4061fcb336/runtime/runtime.go#L65).
Currently, the runner attempts to match everyone in the labels and uses the first match it finds.
## What is the difference between agent labels and custom labels for a runner?
![labels](/images/usage/actions/labels.png)
Agent labels are reported to the Gitea instance by the runner during registration.
Custom labels, on the other hand, are added manually by a Gitea administrator or owners of the organization or repository (depending on the level of the runner).
However, the design here needs improvement, as it currently has some rough edges.
You can add a custom label such as `centos` to a registered runner, which means the runner will receive jobs with `runs-on: centos`.
However, the runner may not know which environment to use for this label, resulting in it using a default image or leading to a logical dead end.
This default may not match user expectations.
See [runtime.go#L71](https://gitea.com/gitea/runner/src/commit/90b8cc6a7a48f45cc28b5ef9660ebf4061fcb336/runtime/runtime.go#L71).
In the meantime, we suggest that you re-register your runner if you want to change its labels.
## Will there be more implementations for Gitea Actions runner?
Although we would like to provide more options, our limited manpower means that Gitea Runner will be the only officially supported runner at the moment.
However, both Gitea and Gitea Runner are completely open source under MIT License, so anyone can modify the code to satisfy their requirements.
In case you fork Gitea Runner to create your own version: Please contribute the changes back if you can and if you think your changes will help others as well.
## What workflow trigger events does Gitea support?
All events listed in this table are supported events and are compatible with GitHub.
For events supported only by GitHub, see GitHub's [documentation](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
| trigger event | activity types |
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------|
| create | not applicable |
| delete | not applicable |
| fork | not applicable |
| gollum | not applicable |
| 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`, `synchronized`, `labeled`, `unlabeled` |
| pull_request_review | `submitted`, `edited` |
| pull_request_review_comment | `created`, `edited` |
| release | `published`, `edited` |
| registry_package | `published` |
| workflow_dispatch | not applicable |
| workflow_run | `requested`, `completed` |
> For `pull_request` events, in [GitHub Actions](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request), the `ref` is `refs/pull/:prNumber/merge`, which is a reference to the merge commit preview. However, Gitea has no such reference.
> Therefore, the `ref` in Gitea Actions is `refs/pull/:prNumber/head`, which points to the head of pull request rather than the preview of the merge commit.
## How to share actions and reusable workflows from private repositories?
Go to the repository's **Settings** > **Actions** > **General** page and add collaborative owners.
The private repositories of collaborative owners are allowed to access the actions and workflows in the current repository.

View File

@@ -0,0 +1,38 @@
---
date: "2023-04-27T15:00:00+08:00"
slug: "overview"
sidebar_position: 1
---
# Overview
Starting with Gitea **1.19**, Gitea Actions are available as a built-in CI/CD solution.
## Name
It is similar and mostly compatible to [GitHub Actions](https://github.com/features/actions), and its name is inspired by it too.
To avoid confusion, we have clarified the spelling here:
- "Gitea Actions" (with an "s", both words capitalized) is the name of the Gitea feature.
- "GitHub Actions" is the name of the GitHub feature.
- "Actions" could refer to either of the above, depending on the context. So it refers to "Gitea Actions" in this document.
- "action" or "actions" refer to some scripts/plugins to be used, like "actions/checkout@v4" or "actions/cache@v3".
## Runners
Just like other CI/CD solutions, Gitea doesn't run the jobs itself, but delegates the jobs to runners.
The runner of Gitea Actions is called [Gitea Runner](https://gitea.com/gitea/runner), it is a standalone program and also written in Go.
An important part of the application comes from a hard fork of [nektos/act](http://github.com/nektos/act).
Because the runner is deployed independently, there could be potential security issues.
To avoid them, please follow two simple rules:
- Don't use a runner you don't trust for your repository, organization or instance.
- Don't provide a runner to a repository, organization or instance you don't trust.
For Gitea instances used internally, such as instances used by enterprises or individuals, neither of these two rules is a problem, they are naturally so.
However, for public Gitea instances, such as [gitea.com](https://gitea.com), these two rules should be kept in mind when adding or using runners.
## Status
Gitea Actions is stable enough for production usage and we use Gitea Actions in all the repositories in https://gitea.com/gitea.

View File

@@ -0,0 +1,138 @@
---
date: "2023-04-27T15:00:00+08:00"
slug: "quickstart"
sidebar_position: 10
---
# Quick Start
This page will guide you through the process of using Gitea Actions.
## Set up Gitea
First of all, you need a Gitea instance.
You can follow the [documentation](installation/from-package.md) to set up a new instance or upgrade your existing one.
It doesn't matter how you install or run Gitea, as long as its version is 1.19.0 or higher.
Since 1.21.0, Actions are enabled by default. If you are using versions before 1.21.0, you need to add the following to the configuration file to enable it:
```ini
[actions]
ENABLED=true
```
If you want to learn more or encounter any problems while configuring it, please refer to the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions).
### Set up runner
Gitea Actions requires [Gitea Runner](https://gitea.com/gitea/runner) to run the jobs.
In order to avoid consuming too many resources and affecting the Gitea instance, it is recommended to start runners on separate machines from the Gitea instance.
You can use the [pre-built binaries](http://dl.gitea.com/gitea-runner) or the [docker images](https://hub.docker.com/r/gitea/runner/tags) to set up the runner.
Before proceeding any further, we suggest running it as a command line with pre-built binaries to ensure that it works with your environment, especially if you are running a runner on your localhost.
And it could be easier to debug if something goes wrong.
The runner can run the jobs in isolated Docker containers, so you need to make sure that the Docker has been installed and Docker daemon is running.
While it is not strictly necessary, because the runner can also run the jobs directly on the host, it depends on how you configure it.
However, it is recommended to use Docker to run the jobs, because it is more secure and easier to manage.
Before running a runner, you should first register it to your Gitea instance using the following command:
```bash
./runner register --no-interactive --instance <instance> --token <token>
```
There are two arguments required, `instance` and `token`.
`instance` refers to the address of your Gitea instance, like `http://192.168.8.8:3000` or `https://gitea.com`.
The runner and job containers (which are started by the runner to execute jobs) will connect to this address.
This means that it could be different from the `ROOT_URL` of your Gitea instance, which is configured for web access.
It is always a bad idea to use a loopback address such as `127.0.0.1` or `localhost`.
If you are unsure which address to use, the LAN address is usually the right choice.
`token` is used for authentication and identification, such as `P2U1U0oB4XaRCi8azcngmPCLbRpUGapalhmddh23`.
Each token can be used to create multiple runners, until it is replaced with a new token using the reset link.
You can obtain different levels of 'tokens' from the following places to create the corresponding level of 'runners':
- Instance level: The admin settings page, like `<your_gitea.com>/-/admin/actions/runners`.
- Organization level: The organization settings page, like `<your_gitea.com>/<org>/settings/actions/runners`.
- Repository level: The repository settings page, like `<your_gitea.com>/<owner>/<repo>/settings/actions/runners`.
![register runner](/images/usage/actions/register-runner.png)
After registering, a new file named `.runner` will appear in the current directory.
This file stores the registration information.
Please do not edit it manually.
If this file is missing or corrupted, you can simply remove it and register again.
Finally, it's time to start the runner:
```bash
./runner daemon
```
And you can see the new runner in the management page:
![view runner](/images/usage/actions/view-runner.png)
You can find more information by visiting [Gitea Runner](runner.mdx).
### Use Actions
Even if Actions is enabled for the Gitea instance, repositories still disable Actions by default.
To enable it, go to the settings page of your repository like `your_gitea.com/<owner>/repo/settings` and enable `Enable Repository Actions`.
![enable actions](/images/usage/actions/enable-actions.png)
The next steps may be rather complicated.
You will need to study [the workflow syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions) for Actions and write the workflow files you want.
However, we can just start from a simple demo:
```yaml
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
```
:::warning
Certain actions may not function correctly within SHA256 repositories or when Gitea runs on subpath. This includes [actions/checkout](https://github.com/actions/checkout/issues/1843).
:::
You can upload it as a file with the extension `.yaml` in the directory `.gitea/workflows/` of the repository, for example `.gitea/workflows/demo.yaml`.
You might notice that this is fairly similar from the [Quickstart for GitHub Actions](https://docs.github.com/en/actions/quickstart).
That is because Gitea Actions is designed to be compatible with GitHub Actions wherever possible.
Be careful, the demo file contains some emojis.
Please make sure your database supports them, especially when using MySQL.
If the charset is not `utf8mb4`, errors will occur, such as `Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1`.
See [Database Preparation](../../installation/database-preparation.md#mysqlmariadb) for more information.
Alternatively, you can remove all emojis from the demo file and try again.
The line `on: [push]` indicates that the workflow will be triggered when you push commits to this repository.
However, when you upload the YAML file, it also pushes a commit, so you should see a new task in the Actions tab.
![view job](/images/usage/actions/view-job.png)
Great job! You have successfully started working with Actions.

View File

@@ -0,0 +1,461 @@
---
date: "2023-04-27T15:00:00+08:00"
slug: "runner"
sidebar_position: 20
aliases:
- /act-runner
---
# Gitea Runner
This page will introduce the [Gitea Runner](https://gitea.com/gitea/runner) in detail, which is the runner for Gitea Actions.
## Requirements
Currently the runner supports three modes in which it can be run.
1. Host: runner will run as an application on the host. This provides no encapsulation.
2. Docker (recommended): Runs jobs in a [Docker](https://docker.com) container. If you choose this mode, you need to [install Docker](https://docs.docker.com/engine/install/) first and make sure that the Docker daemon is running.
3. Docker-in-Docker (DinD): Puts the runner into rootless mode. It then runs in a Docker container with its own Docker daemon that has fewer privileges. It will spawn job containers from there. Best security but more complex setup.
Other OCI container engines which are compatible with Docker's API should also work, but are untested.
However, if you are sure that you want to run jobs directly on the host only, then Docker is not required.
There are multiple ways to install the runner.
## Installation with binary
### Download the binary
You can download the binary from the [release page](https://gitea.com/gitea/runner/releases).
However, if you want to use the latest nightly build, you can download it from the [download page](https://dl.gitea.com/gitea-runner/).
When you download the binary, please make sure that you have downloaded the correct one for your platform.
You can check it by running the following command if you are in a Unix-style OS.
```bash
chmod +x runner
./runner --version
```
If you see the version information, it means that you have downloaded the correct binary.
### Obtain a registration token
You can register a runner at different levels. It can be:
- Instance level: The runner will run jobs for all repositories in the instance.
- Organization level: The runner will run jobs for all repositories in the organization.
- Repository level: The runner will run jobs for the repository it belongs to.
Note that the repository may still use instance-level or organization-level runners even if it has its own repository-level runners. A future release may provide an option to allow more control over this.
Before registering the runner and running it, you need a registration token. The level of the runner determines where to obtain the registration token.
- Instance level: The admin settings page, like `<your_gitea.com>/-/admin/actions/runners`.
- Organization level: The organization settings page, like `<your_gitea.com>/<org>/settings/actions/runners`.
- Repository level: The repository settings page, like `<your_gitea.com>/<owner>/<repo>/settings/actions/runners`.
If you cannot see the settings page, please make sure that you have the right permissions and that Actions have been enabled.
The format of the registration token is a random string `D0gvfu2iHfUjNqCYVljVyRV14fISpJxxxxxxxxxx`.
A registration token can also be obtained from the Gitea [command-line interface](../../administration/command-line.md#actions-generate-runner-token):
```
gitea --config /etc/gitea/app.ini actions generate-runner-token
```
You can also use `GITEA_RUNNER_REGISTRATION_TOKEN`/`GITEA_RUNNER_REGISTRATION_TOKEN_FILE` environment variables to set a global runner registration token when Gitea starts, for example:
```
openssl rand -hex 24 > /some-dir/runner-token
export GITEA_RUNNER_REGISTRATION_TOKEN_FILE=/some-dir/runner-token
./gitea --config ...
```
The token from the environment is valid until you reset the token (re-create a new one) via the web UI or API.
Tokens are valid for registering multiple runners, until they are revoked and replaced by a new token using the token reset link in the web interface.
### Configuration
Configuration is done via a configuration file. It is optional, and the default configuration will be used when no configuration file is specified. You can generate a configuration file by running the following command:
```bash
./runner generate-config
```
The default configuration is safe to use without any modification, so you can just use it directly.
```bash
./runner generate-config > config.yaml
./runner --config config.yaml [command]
```
### Register the runner
Registration is required before running Gitea Runner, because the runner needs to know where to get jobs from. It is also important for the Gitea instance to identify the runner.
If this has been installed using the binary package, the runner can be registered by running the following command.
```bash
./runner register
```
Alternatively, you can use the `--config` option to specify the configuration file mentioned in the previous section.
```bash
./runner --config config.yaml register
```
You will be asked to input the registration information step by step. This includes:
- The Gitea instance URL, like `https://gitea.com/` or `http://192.168.8.8:3000/`.
- The registration token.
- The runner name, which is optional. If you leave it blank, the hostname will be used.
- The runner labels, which is optional. If you leave it blank, the default labels will be used.
You may be confused about the runner labels, which will be explained later.
If you want to register the runner in a non-interactive way, you can use arguments to do it.
```bash
./runner register --no-interactive --instance <instance_url> --token <registration_token> --name <runner_name> --labels <runner_labels>
```
When you have registered the runner, you can find a new file named `.runner` in the current directory.
This file stores the registration information.
Please do not edit it manually.
If this file is missing or corrupted, you can simply remove it and register again.
If you want to store the registration information in another place, you can specify it in the configuration file,
and don't forget to specify the `--config` option.
#### Ephemeral Runners
Ephemeral runners provide a security hardening mechanism for enabling organization- or instance-wide runners without requiring full user trust. Once a job is assigned within a spot VM or container, the runner's exposed credentials are automatically revoked—blocking it from polling further jobs before any untrusted code runs, while still allowing it to report progress until completion by either Gitea or the runner.
Gitea Runner **0.2.12+** is required.
The updated commands for registering the runner as ephemeral are listed below. Refer to the previous section for detailed information on registering the runner.
```bash
./runner register --ephemeral
```
```bash
./runner --config config.yaml register --ephemeral
```
```bash
./runner register --no-interactive --ephemeral --instance <instance_url> --token <registration_token> --name <runner_name> --labels <runner_labels>
```
The runner must be registered each time it is intended to receive a job. After completing the single job it is designed to execute, the runner terminates.
To automate the registration and startup of new runners when a job is queued, use the `workflow_job` webhook.
### Start the runner from the command line
After you have registered the runner, you can run it with the following command:
```shell
./runner daemon
```
or
```bash
./runner daemon --config config.yaml
```
The runner will fetch jobs from the Gitea instance and run them automatically.
### Start the runner with Systemd
It is also possible to run Gitea Runner as a [systemd](https://en.wikipedia.org/wiki/Systemd) service. Create an unprivileged `runner` user on your system, and create the following file in `/etc/systemd/system/runner.service`. The paths in `ExecStart` and `WorkingDirectory` may need to be adjusted depending on where you installed the `runner` binary, its configuration file, and the home directory of the `runner` user.
```ini
[Unit]
Description=Gitea Actions runner
Documentation=https://gitea.com/gitea/runner
After=docker.service
[Service]
ExecStart=/usr/local/bin/runner daemon --config /etc/runner/config.yaml
ExecReload=/bin/kill -s HUP $MAINPID
WorkingDirectory=/var/lib/runner
TimeoutSec=0
RestartSec=10
Restart=always
User=runner
[Install]
WantedBy=multi-user.target
```
Then:
```bash
# load the new systemd unit file
sudo systemctl daemon-reload
# start the service and enable it at boot
sudo systemctl enable runner --now
```
If using Docker, the `runner` user should also be added to the `docker` group before starting the service. Keep in mind that this effectively gives `runner` root access to the system [[1]](https://docs.docker.com/engine/security/#docker-daemon-attack-surface).
### Start the runner with LaunchDaemon (macOS)
Mac uses `launchd` in place of systemd for registering daemon processes. By default, daemons run as the root user, so if desired an unprivileged `_runner` user can be created via the `dscl` tool. The following file should then be created in the directory `/Library/LaunchDaemon/com.gitea.runner.plist`. The paths for `WorkingDirectory`, `ProgramArguments`, `StandardOutPath`, `StandardErrPath`, and the `HOME` environment variable may need to be updated to reflect your installation. Also note that any executables outside of the example `PATH` shown will need to be explicitly included and will not be inherited from existing configurations.
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.gitea.runner</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/runner</string>
<string>daemon</string>
<string>--config</string>
<string>/etc/runner/config.yaml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WorkingDirectory</key>
<string>/var/lib/runner</string>
<key>StandardOutPath</key>
<string>/var/lib/runner/runner.log</string>
<key>StandardErrorPath</key>
<string>/var/lib/runner/runner.err</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<key>HOME</key>
<string>/var/lib/runner</string>
</dict>
<key>UserName</key>
<string>_runner</string>
</dict>
</plist>
```
Then:
```bash
sudo launchctl load /Library/LaunchDaemon/com.gitea.runner.plist
```
You can also set up a Linux or Windows service to let the runner run automatically.
## Install with the docker image
### Pull the image
You can use the docker image from [Docker Hub](https://hub.docker.com/r/gitea/runner/tags).
Just like the binary, you can use the latest nightly build by using the `nightly` tag, while the `latest` tag is the latest stable release.
```bash
docker pull docker.io/gitea/runner:latest # for the latest stable release
```
If you want to use the newest or experimental features, you can also use the nightly image.
```bash
docker pull docker.io/gitea/runner:nightly # for the latest nightly build
```
### Configuration
Configuration is optional, but you can also generate a config file with docker:
```bash
docker run --entrypoint="" --rm -it docker.io/gitea/runner:latest runner generate-config > config.yaml
```
When you are using the docker image, you can specify the configuration file by using the `CONFIG_FILE` environment variable. Make sure that the file is mounted into the container as a volume:
```bash
docker run -v $PWD/config.yaml:/config.yaml -e CONFIG_FILE=/config.yaml ...
```
You may notice the commands above are incomplete because it is not time to run the runner yet.
Before running the runner, we need to register it to your Gitea instance first.
### Start the runner with docker
If you are using the docker image, behavior will be slightly different. Registration and running are combined into one step in this case, so you need to specify the registration information when running the runner.
A quick start with docker run along with a minimal parameter set is shown below. You need to get the `<registration_token>` from the above step, and set a unique name for `<gitea_runner_name>` and for `<container_name>`.
```bash
docker run \
-e GITEA_INSTANCE_URL=<instance_url> \
-e GITEA_RUNNER_REGISTRATION_TOKEN=<registration_token> \
-e GITEA_RUNNER_NAME=<gitea_runner_name> \
--name <container_name> \
-v /var/run/docker.sock:/var/run/docker.sock \
-d docker.io/gitea/runner:latest
```
You can add more parameters to use a custom config, add a `data` directory for non-volatile file storage, etc.
```bash
docker run \
-v $PWD/config.yaml:/config.yaml \
-v $PWD/data:/data \
-v /var/run/docker.sock:/var/run/docker.sock \
-e CONFIG_FILE=/config.yaml \
-e GITEA_INSTANCE_URL=<instance_url> \
-e GITEA_RUNNER_REGISTRATION_TOKEN=<registration_token> \
-e GITEA_RUNNER_NAME=<gitea_runner_name> \
-e GITEA_RUNNER_LABELS=<runner_labels> \
--name <container_name> \
-d docker.io/gitea/runner:latest
```
You may notice that we have mounted `/var/run/docker.sock` into the container.
This is because with this setup, the runner will execute jobs in temporary Docker containers, so it needs to communicate with the Docker daemon.
As mentioned, you can remove it if you want to run jobs on the host directly.
To be clear, the "host" actually means the container that is running the runner now, instead of the host machine.
---
To enable ephemeral runners, set the environment variable `GITEA_RUNNER_EPHEMERAL=1` in the runner image. This setup doesn't use a `/data` volume because the credentials are single-use and not intended to be reused. You can find more details about this mode under [Ephemeral runners](#ephemeral-runners).
```bash
docker run \
-e GITEA_INSTANCE_URL=<instance_url> \
-e GITEA_RUNNER_REGISTRATION_TOKEN=<registration_token> \
-e GITEA_RUNNER_EPHEMERAL=1 \
-e GITEA_RUNNER_NAME=<runner_name> \
--name my_runner \
-d docker.io/gitea/runner:nightly
```
```bash
docker run \
-v $PWD/config.yaml:/config.yaml \
-v /var/run/docker.sock:/var/run/docker.sock \
-e CONFIG_FILE=/config.yaml \
-e GITEA_INSTANCE_URL=<instance_url> \
-e GITEA_RUNNER_REGISTRATION_TOKEN=<registration_token> \
-e GITEA_RUNNER_EPHEMERAL=1 \
-e GITEA_RUNNER_NAME=<runner_name> \
-e GITEA_RUNNER_LABELS=<runner_labels> \
--name my_runner \
-d docker.io/gitea/runner:nightly
```
Mounting the host's Docker socket using `/var/run/docker.sock:/var/run/docker.sock` introduces a potential security vulnerability. If a job can access this socket, the reusable `GITEA_RUNNER_REGISTRATION_TOKEN` could be exposed through Docker inspect data.
### Start the runner using docker compose
You could also set up the runner using the following `docker-compose.yml`:
```yml
version: "3.8"
services:
runner:
image: docker.io/gitea/runner:nightly
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "${INSTANCE_URL}"
GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
GITEA_RUNNER_NAME: "${RUNNER_NAME}"
GITEA_RUNNER_LABELS: "${RUNNER_LABELS}"
volumes:
- ./config.yaml:/config.yaml
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
```
When using docker, there is no requirement to enter the container and manually run `./runner daemon` command as shown below. Once the container has been started successfully, it will show up as an active runner in your Gitea instance.
---
To enable ephemeral runners, set the environment variable `GITEA_RUNNER_EPHEMERAL=1` in the runner image. This setup doesn't use a `/data` volume because the credentials are single-use and not intended to be reused. You can find more details about this mode under [Ephemeral runners](#ephemeral-runners).
```yml
version: "3.8"
services:
runner:
image: docker.io/gitea/runner:nightly
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "${INSTANCE_URL}"
GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
GITEA_RUNNER_NAME: "${RUNNER_NAME}"
GITEA_RUNNER_LABELS: "${RUNNER_LABELS}"
GITEA_RUNNER_EPHEMERAL: "1"
volumes:
- ./config.yaml:/config.yaml
- /var/run/docker.sock:/var/run/docker.sock
```
Mounting the host's Docker socket using `/var/run/docker.sock:/var/run/docker.sock` introduces a potential security vulnerability. If a job can access this socket, the reusable `GITEA_RUNNER_REGISTRATION_TOKEN` could be exposed through Docker inspect data.
### More start examples
A couple more usage examples can be found in the [runner](https://gitea.com/gitea/runner/src/branch/main/examples) repository.
## Advanced Configurations
### Configuring cache when starting a runner using the docker image
If you do not intend to use `actions/cache` in your workflow, you can ignore this section.
If you use `actions/cache` without any additional configuration, it will return the following error:
> Failed to restore: getCacheEntry failed: connect ETIMEDOUT IP:PORT
The error occurs because the runner container and job container are on different networks, so the job container cannot access the runner container.
Therefore, it is essential to configure the cache action to ensure its proper functioning. Follow these steps:
- 1. Obtain the LAN IP address of the host machine where the runner container is running.
- 2. Find an available port number on the host machine where the runner container is running.
- 3. Configure the following settings in the configuration file:
```yaml
cache:
enabled: true
dir: ""
# Use the LAN IP obtained in step 1
host: "192.168.8.17"
# Use the port number obtained in step 2
port: 8088
```
- 4. When starting the container, map the cache port to the host machine:
```bash
docker run \
--name gitea-docker-runner \
-p 8088:8088 \
-d docker.io/gitea/runner:nightly
```
### Labels
The labels of a runner are used to determine which jobs the runner can run, and how to run them.
The default labels are `ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster`.
It is a comma-separated list, and each item is a label.
Let's take `ubuntu-22.04:docker://node:16-bullseye` as an example.
It means that the runner can run jobs with `runs-on: ubuntu-22.04`, and the job will be run in a docker container with the image `node:16-bullseye`.
If the default image is insufficient for your needs, and you have enough disk space to use a better and bigger one, you can change it to `ubuntu-22.04:docker://<the image you like>`.
You can find more useful images on [act images](https://github.com/nektos/act/blob/master/IMAGES.md).
If you want to run jobs on the host directly, you can change it to `ubuntu-22.04:host` or just `ubuntu-22.04`; `:host` is optional.
However, we suggest you use a special name like `linux_amd64:host` or `windows:host` to avoid misusing it.
Starting with Gitea 1.21, you can change labels by modifying `runners.labels` in the runner configuration file (if you don't have a configuration file, please refer to [configuration tutorials](#configuration)).
The runner will use these new labels as soon as you restart it, i.e., by calling `./runner daemon --config config.yaml`.

View File

@@ -1,18 +1,7 @@
---
date: "2022-12-19T21:26:00+08:00"
title: "Secrets"
date: "2024-07-10T09:23:00+02:00"
slug: "secrets"
sidebar_position: 50
draft: false
toc: false
aliases:
- /en-us/secrets
menu:
sidebar:
parent: "usage"
name: "Secrets"
sidebar_position: 50
identifier: "usage-secrets"
---
# Secrets
@@ -36,4 +25,11 @@ The following rules apply to secret names:
For example, a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level.
### Using secrets
After creating configuration variables, they will be automatically filled in the `secrets` context.
They can be accessed through expressions like `${{ secrets.SECRET_NAME }}` in the workflow.
### Precedence
If a secret with the same name exists at multiple levels, the secret at the lowest level takes precedence. For example, if an organization-level secret has the same name as a repository-level secret, then the repository-level secret takes precedence.

View File

@@ -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.<job_id>.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.

View File

@@ -0,0 +1,140 @@
---
date: "2024-04-10T22:21:00+08:00"
slug: "actions-variables"
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
The following rules apply to variable names:
- Variable names can only contain alphanumeric characters (`[a-z]`, `[A-Z]`, `[0-9]`) or underscores (`_`). Spaces are not allowed.
- Variable names must not start with the `GITHUB_` and `GITEA_` prefix.
- Variable names must not start with a number.
- Variable names are case-insensitive.
- Variable names must be unique at the level they are created at.
- Variable names must not start with `CI`.
### 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
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.<name> }}`. For compatibility, `${{ github.<name> }}` works as an alias.
| Name | Description | Example |
|---|---|---|
| `gitea.action`<br/>`github.action` | The name of the action currently running, or the `id` of a step. | `__run` |
| `gitea.action_path`<br/>`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`<br/>`github.action_ref` | The ref of the action being executed. | `v4` |
| `gitea.action_repository`<br/>`github.action_repository` | The owner and repository name of the action. | `actions/checkout` |
| `gitea.action_status`<br/>`github.action_status` | The current result of a composite action. | `success` |
| `gitea.actor`<br/>`github.actor` | The username of the user that triggered the initial workflow run. | `silverwind` |
| `gitea.api_url`<br/>`github.api_url` | The URL of the REST API. | `https://gitea.com/api/v1` |
| `gitea.base_ref`<br/>`github.base_ref` | The target branch of a pull request. Only set for `pull_request` and `pull_request_target` events. | `main` |
| `gitea.env`<br/>`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`<br/>`github.event` | The full event webhook payload as an object. | `{...}` |
| `gitea.event_name`<br/>`github.event_name` | The name of the event that triggered the workflow run. | `push` |
| `gitea.event_path`<br/>`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`<br/>`github.head_ref` | The source branch of a pull request. Only set for `pull_request` and `pull_request_target` events. | `feature-branch` |
| `gitea.job`<br/>`github.job` | The `job_id` of the current job. | `build` |
| `gitea.ref`<br/>`github.ref` | The fully-formed ref that triggered the workflow. | `refs/heads/main` |
| `gitea.ref_name`<br/>`github.ref_name` | The short ref name. | `main` |
| `gitea.ref_protected`<br/>`github.ref_protected` | `true` if branch protections are configured for the ref that triggered the workflow run. | `true` |
| `gitea.ref_type`<br/>`github.ref_type` | The type of ref: `branch` or `tag`. | `branch` |
| `gitea.path`<br/>`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`<br/>`github.repository` | The owner and repository name. | `gitea/docs` |
| `gitea.repository_owner`<br/>`github.repository_owner` | The repository owner's username. | `gitea` |
| `gitea.repositoryUrl`<br/>`github.repositoryUrl` | The HTML URL to the repository. | `https://gitea.com/gitea/docs` |
| `gitea.retention_days`<br/>`github.retention_days` | The number of days that workflow run logs and artifacts are kept. | `90` |
| `gitea.run_id`<br/>`github.run_id` | A unique number for each workflow run within a repository. Does not change on re-run. | `1234` |
| `gitea.run_number`<br/>`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`<br/>`github.run_attempt` | A unique number for each re-run attempt. Starts at 1 and increments with each re-run. | `1` |
| `gitea.secret_source`<br/>`github.secret_source` | The source of a secret used in a workflow. Always `Actions` in Gitea. | `Actions` |
| `gitea.server_url`<br/>`github.server_url` | The URL of the Gitea instance. | `https://gitea.com` |
| `gitea.sha`<br/>`github.sha` | The commit SHA that triggered the workflow. | `a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2` |
| `gitea.token`<br/>`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`<br/>`github.triggering_actor` | The username of the user that initiated the workflow run. May differ from `actor` on re-runs. | `silverwind` |
| `gitea.workflow`<br/>`github.workflow` | The name of the workflow. If unnamed, the full path of the workflow file. | `CI` |
| `gitea.workspace`<br/>`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 runner executing the workflow. | `0.2.11` |
| `GITEA_ENV`<br/>`GITHUB_ENV` | Path to the file that sets environment variables for subsequent steps. | `/home/runner/work/_temp/_runner_file_commands/set_env_***` |
| `GITEA_OUTPUT`<br/>`GITHUB_OUTPUT` | Path to the file that sets step output parameters. | `/home/runner/work/_temp/_runner_file_commands/set_output_***` |
| `GITEA_PATH`<br/>`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`<br/>`GITHUB_STATE` | Path to the file that sets step state variables. | `/home/runner/work/_temp/_runner_file_commands/save_state_***` |
| `GITEA_STEP_SUMMARY`<br/>`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/` |

View File

@@ -0,0 +1,9 @@
{
"label": "Issues & Pull Requests",
"position": 20,
"link": {
"type": "generated-index",
"slug": "/usage/issues-prs",
"description": "Issues and Pull Requests workflow, templates, and collaboration features"
}
}

View File

@@ -0,0 +1,49 @@
---
date: " 2022-09-01T20:50:42+0000"
slug: "agit"
sidebar_position: 12
aliases:
- /en-us/agit-setup
- /agit-setup
- /agit
---
# AGit
In Gitea `1.13`, support for [AGit](https://git-repo.info/en/2020/03/agit-flow-and-git-repo/) was added. AGit enables users to create pull requests directly, even without write permissions of the repository, eliminating the need to fork it. This helps reduce the number of duplicated repositories and minimizes unnecessary disk usage.
:::note
Git version 2.29 or higher is required on the server side for this to work.
:::
## Creating PRs with AGit
AGit allows to create PRs while pushing code to the remote repo.
This can be done by pushing to the branch followed by a specific refspec (a location identifier known to git).
The following example illustrates this:
```shell
git push origin HEAD:refs/for/main
```
The command has the following structure:
- `HEAD`: The target branch
- `origin`: The target repository (not a fork!)
- `HEAD`: The local branch containing the changes you are proposing
- `refs/<for|draft|for-review>/<branch>`: The target PR type and configuration
- `for`: Create a normal PR with `<branch>` as the target branch
- `draft`/`for-review`: Currently ignored silently
- `<branch>/`: The branch you want your changes to be merged into
- `-o <topic|title|description>`: Options for the PR
- `topic`: The topic of this change. It will become the name of the branch holding the changes waiting for review. This is REQUIRED to trigger a pull request.
- `title`: The PR title (optional but recommended), only used for topics not already having an associated PR.
- `description`: The PR description (optional but recommended), only used for topics not already having an associated PR.
- `force-push=true`: Specifies whether to force-update the target branch.
- Note: omitting the value and using just `-o force-push` will also work.
Here's another advanced example for creating a new PR targeting `main` with `topic`, `title`, and `description`:
```shell
git push origin HEAD:refs/for/main -o topic="topic_of_my_PR" -o title="Title of the PR" -o description="# The PR Description\nThis can be **any** markdown content.\n- [x] Ok"
```

View File

@@ -0,0 +1,331 @@
---
date: "2018-05-10T16:00:00+02:00"
slug: "issue-pull-request-templates"
sidebar_position: 15
aliases:
- /en-us/issue-pull-request-templates
---
# Issue and Pull Request Templates
Some projects have a standard list of questions that users need to answer
when creating an issue or pull request. Gitea supports adding templates to the
**default branch of the repository** so that they can autopopulate the form when users are
creating issues and pull requests. This will cut down on the initial back and forth
of getting some clarifying details.
It is currently not possible to provide generic issue/pull-request templates globally.
Additionally, the New Issue page URL can be suffixed with `?title=Issue+Title&body=Issue+Text` and the form will be populated with those strings. Those strings will be used instead of the template if there is one.
## File names
Possible file names for issue templates:
- `ISSUE_TEMPLATE.md`
- `ISSUE_TEMPLATE.yaml`
- `ISSUE_TEMPLATE.yml`
- `issue_template.md`
- `issue_template.yaml`
- `issue_template.yml`
- `.gitea/ISSUE_TEMPLATE.md`
- `.gitea/ISSUE_TEMPLATE.yaml`
- `.gitea/ISSUE_TEMPLATE.yml`
- `.gitea/issue_template.md`
- `.gitea/issue_template.yaml`
- `.gitea/issue_template.yml`
- `.github/ISSUE_TEMPLATE.md`
- `.github/ISSUE_TEMPLATE.yaml`
- `.github/ISSUE_TEMPLATE.yml`
- `.github/issue_template.md`
- `.github/issue_template.yaml`
- `.github/issue_template.yml`
Possible file names for issue config:
- `.gitea/ISSUE_TEMPLATE/config.yaml`
- `.gitea/ISSUE_TEMPLATE/config.yml`
- `.gitea/issue_template/config.yaml`
- `.gitea/issue_template/config.yml`
- `.github/ISSUE_TEMPLATE/config.yaml`
- `.github/ISSUE_TEMPLATE/config.yml`
- `.github/issue_template/config.yaml`
- `.github/issue_template/config.yml`
Possible file names for PR templates:
- `PULL_REQUEST_TEMPLATE.md`
- `PULL_REQUEST_TEMPLATE.yaml`
- `PULL_REQUEST_TEMPLATE.yml`
- `pull_request_template.md`
- `pull_request_template.yaml`
- `pull_request_template.yml`
- `.gitea/PULL_REQUEST_TEMPLATE.md`
- `.gitea/PULL_REQUEST_TEMPLATE.yaml`
- `.gitea/PULL_REQUEST_TEMPLATE.yml`
- `.gitea/pull_request_template.md`
- `.gitea/pull_request_template.yaml`
- `.gitea/pull_request_template.yml`
- `.github/PULL_REQUEST_TEMPLATE.md`
- `.github/PULL_REQUEST_TEMPLATE.yaml`
- `.github/PULL_REQUEST_TEMPLATE.yml`
- `.github/pull_request_template.md`
- `.github/pull_request_template.yaml`
- `.github/pull_request_template.yml`
## Directory names
Alternatively, users can create multiple issue templates inside a special directory and allow users to choose one that more specifically
addresses their problem.
Possible directory names for issue templates:
- `ISSUE_TEMPLATE`
- `issue_template`
- `.gitea/ISSUE_TEMPLATE`
- `.gitea/issue_template`
- `.github/ISSUE_TEMPLATE`
- `.github/issue_template`
- `.gitlab/ISSUE_TEMPLATE`
- `.gitlab/issue_template`
Inside the directory can be multiple markdown (`.md`) or yaml (`.yaml`/`.yml`) issue templates of the form.
## Syntax for markdown template
```md
---
name: "Template Name"
about: "This template is for testing!"
title: "[TEST] "
ref: "main"
assignees: ["user1"]
projects:
- Example Project
labels:
- bug
- "help needed"
---
This is the template!
```
In the above example, when a user is presented with the list of issues they can submit, this would show as `Template Name` with the description
`This template is for testing!`. When submitting an issue with the above example, the issue title would be pre-populated with
`[TEST] ` while the issue body would be pre-populated with `This is the template!`.
The issue would be assigned to `user1`.
The issue would be assigned to the project `Example Project`.
The issue would also be assigned two labels,
`bug` and `help needed`, and the issue will have a reference to `main`.
## Syntax for yaml template
This example YAML configuration file defines an issue form using several inputs to report a bug.
```yaml
name: Bug Report
about: File a bug report
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
# some markdown that will only be visible once the issue has been created
- type: markdown
attributes:
value: |
This issue was created by an issue **template** :)
visible: [content]
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. email@example.com
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of our software are you running?
options:
- 1.0.2 (Default)
- 1.0.3 (Edge)
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
hide_label: true
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
options:
- label: I agree to follow this project's Code of Conduct
required: true
- label: I have also read the CONTRIBUTION.MD
required: true
visible: [form]
- label: This is a TODO only visible after issue creation
visible: [content]
```
### Markdown
You can use a `markdown` element to display Markdown in your form that provides extra context to the user, but is not submitted by default.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------|--------------------------------------------------------------|----------|--------|---------|--------------|
| value | The text that is rendered. Markdown formatting is supported. | Required | String | - | - |
visible: Default is **[form]**
### Textarea
You can use a `textarea` element to add a multi-line text field to your form. Contributors can also attach files in `textarea` fields.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|--------------|---------------------------|
| label | A brief description of the expected user input, which is also displayed in the form. | Required | String | - | - |
| hide_label | If true, the label normally used as a headline is not visible. | Optional | Boolean | false | - |
| description | A description of the text area to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | - |
| placeholder | A semi-opaque placeholder that renders in the text area when empty. | Optional | String | Empty String | - |
| value | Text that is pre-filled in the text area. | Optional | String | - | - |
| render | If a value is provided, submitted text will be formatted into a codeblock. When this key is provided, the text area will not expand for file attachments or Markdown editing. | Optional | String | - | Languages known to Gitea. |
Validations:
| Key | Description | Required | Type | Default | Valid values |
|----------|------------------------------------------------------|----------|---------|---------|--------------|
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
visible: Default is **[form, content]**
### Input
You can use an `input` element to add a single-line text field to your form.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|--------------------------------------------------------------------------------------------|----------|---------|--------------|--------------|
| label | A brief description of the expected user input, which is also displayed in the form. | Required | String | - | - |
| hide_label | If true, the label normally used as a headline is not visible. | Optional | Boolean | false | - |
| description | A description of the field to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | - |
| placeholder | A semi-transparent placeholder that renders in the field when empty. | Optional | String | Empty String | - |
| value | Text that is pre-filled in the field. | Optional | String | - | - |
Validations:
| Key | Description | Required | Type | Default | Valid values |
|-----------|--------------------------------------------------------------------------------------------------|----------|---------|---------|--------------------------------------------------------------------------|
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
| is_number | Prevents form submission until element is filled with a number. | Optional | Boolean | false | - |
| regex | Prevents form submission until element is filled with a value that match the regular expression. | Optional | String | - | a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) |
visible: Default is **[form, content]**
### Dropdown
You can use a `dropdown` element to add a dropdown menu in your form.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|-----------------------------------------------------------------------------------------------------|----------|--------------|--------------|--------------|
| label | A brief description of the expected user input, which is displayed in the form. | Required | String | - | - |
| hide_label | If true, the label normally used as a headline is not visible. | Optional | Boolean | false | - |
| description | A description of the dropdown to provide extra context or guidance, which is displayed in the form. | Optional | String | Empty String | - |
| multiple | Determines if the user can select more than one option. | Optional | Boolean | false | - |
| list | If true, display as a list. If false, print items on one line with commas. | Optional | Boolean | false | - |
| options | An array of options the user can choose from. Cannot be empty and all choices must be distinct. | Required | String array | - | - |
Validations:
| Key | Description | Required | Type | Default | Valid values |
|----------|------------------------------------------------------|----------|---------|---------|--------------|
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
visible: Default is **[form, content]**
### Checkboxes
You can use the `checkboxes` element to add a set of checkboxes to your form.
Attributes:
| Key | Description | Required | Type | Default | Valid values |
|-------------|-------------------------------------------------------------------------------------------------------|----------|---------|--------------|--------------|
| label | A brief description of the expected user input, which is displayed in the form. | Required | String | - | - |
| hide_label | If true, the label normally used as a headline is not visible. | Optional | Boolean | false | - |
| description | A description of the set of checkboxes, which is displayed in the form. Supports Markdown formatting. | Optional | String | Empty String | - |
| options | An array of checkboxes that the user can select. For syntax, see below. | Required | Array | - | - |
For each value in the options array, you can set the following keys.
| Key | Description | Required | Type | Default | Options |
|--------------|------------------------------------------------------------------------------------------------------------------------------------------|----------|--------------|---------|---------|
| label | The identifier for the option, which is displayed in the form. Markdown is supported for bold or italic text formatting, and hyperlinks. | Required | String | - | - |
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
| visible | Whether a specific checkbox appears in the form only, in the created issue only, or both. Valid options are "form" and "content". | Optional | String array | false | - |
visible: Default is **[form, content]**
## Syntax for issue config
This is a example for a issue config file
```yaml
blank_issues_enabled: true
contact_links:
- name: Gitea
url: https://gitea.com
about: Visit the Gitea Website
```
### Possible Options
| Key | Description | Type | Default |
|----------------------|-------------------------------------------------------|--------------------|-------------|
| blank_issues_enabled | If set to false, the User is forced to use a Template | Boolean | true |
| contact_links | Custom Links to show in the Choose Box | Contact Link Array | Empty Array |
### Contact Link
| Key | Description | Type | Required |
|-------|----------------------------------|--------|----------|
| name | the name of your link | String | true |
| url | The URL of your Link | String | true |
| about | A short description of your Link | String | true |

View File

@@ -0,0 +1,33 @@
---
date: "2023-03-04T19:00:00+00:00"
slug: "labels"
sidebar_position: 13
aliases:
- /en-us/labels
---
# Labels
You can use labels to classify issues and pull requests and to improve your overview over them.
## Creating Labels
For repositories, labels can be created by going to `Issues` and clicking on `Labels`.
For organizations, you can define organization-wide labels that are shared with all organization repositories, including both already-existing repositories as well as newly created ones. Organization-wide labels can be created in the organization `Settings`.
Labels have a mandatory name, a mandatory color, an optional description, and must either be exclusive or not (see `Scoped Labels` below).
When you create a repository, you can ensure certain labels exist by using the `Issue Labels` option. This option lists a number of available label sets that are [configured globally on your instance](../../administration/customizing-gitea.md#labels). Its contained labels will all be created as well while creating the repository.
## Scoped Labels
Scoped labels are used to ensure at most a single label with the same scope is assigned to an issue or pull request. For example, if labels `kind/bug` and `kind/enhancement` have the Exclusive option set, an issue can only be classified as a bug or an enhancement.
A scoped label must contain `/` in its name (not at either end of the name). The scope of a label is determined based on the **last** `/`, so for example the scope of label `scope/subscope/item` is `scope/subscope`.
## Filtering by Label
Issue and pull request lists can be filtered by label. Selecting multiple labels shows issues and pull requests that have all selected labels assigned.
By holding alt to click the label, issues and pull requests with the chosen label are excluded from the list.

View File

@@ -0,0 +1,194 @@
---
date: "2019-11-21T17:00:00-03:00"
slug: "automatically-linked-references"
sidebar_position: 15
aliases:
- /en-us/automatically-linked-references
---
# Automatically Linked References
When an issue, pull request or comment is posted, the text description is parsed
in search for references. These references will be shown as links in the Issue View
and, in some cases, produce certain _actions_.
Likewise, commit messages are parsed when they are listed, and _actions_
can be triggered when they are pushed to the main branch.
To prevent the creation of unintended references, there are certain rules
for them to be recognized. For example, they should not be included inside code
text. They should also be reasonably cleared from their surrounding text
(for example, using spaces).
## User, Team and Organization Mentions
When a text in the form `@username` is found and `username` matches the name
of an existing user, a _mention_ reference is created. This will be shown
by changing the text into a link to said user's profile, and possibly create
a notification for the mentioned user depending on whether they have
the necessary permission to access the contents.
Example:
> [@John](#), can you give this a look?
This is also valid for teams and organizations:
> [@Documenters](#), we need to plan for this.
> [@CoolCompanyInc](#), this issue concerns us all!
Teams will receive mail notifications when appropriate, but whole organizations won't.
Commit messages do not produce user notifications.
## Commits
Commits can be referenced using their SHA1 hash, or a portion of it of
at least seven characters. They will be shown as a link to the corresponding
commit.
Example:
> This bug was introduced in [e59ff077](#)
## Issues and Pull Requests
A reference to another issue or pull request can be created using the simple
notation `#1234`, where _1234_ is the number of an issue or pull request
in the same repository. These references will be shown as links to the
referenced content.
The effect of creating this type of reference is that a _notice_ will be
created in the referenced document, provided the creator of the reference
has reading permissions on it.
Example:
> This seems related to [#1234](#)
Issues and pull requests in other repositories can be referred to as well
using the form `owner/repository#1234`:
> This seems related to [mike/compiler#1234](#)
Alternatively, the `!1234` notation can be used as well. Even when in Gitea
a pull request is a form of issue, the `#1234` form will always link to
an issue; if the linked entry happens to be a pull request instead, Gitea
will redirect as appropriate. With the `!1234` notation, a pull request
link will be created, which will be redirected to an issue if required.
However, this distinction could be important if an external tracker is
used, where links to issues and pull requests are not interchangeable.
## Actionable References in Pull Requests and Commit Messages
Sometimes a commit or pull request may fix or bring back a problem documented
in a particular issue. Gitea supports closing and reopening the referenced
issues by preceding the reference with a particular _keyword_. Common keywords
include "closes", "fixes", "reopens", etc. This list can be
[customized](../../administration/config-cheat-sheet.md) by the
site administrator.
Example:
> This PR _closes_ [#1234](#)
If the actionable reference is accepted, this will create a notice on the
referenced issue announcing that it will be closed when the referencing PR
is merged.
For an actionable reference to be accepted, _at least one_ of the following
conditions must be met:
- The commenter has permissions to close or reopen the issue at the moment
of creating the reference.
- The reference is inside a commit message.
- The reference is posted as part of the pull request description.
In the last case, the issue will be closed or reopened only if the merger
of the pull request has permissions to do so.
Additionally, only pull requests and commit messages can create an action,
and only issues can be closed or reopened this way.
The default _keywords_ are:
- **Closing**: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
- **Reopening**: reopen, reopens, reopened
## Time tracking in Pull Requests and Commit Messages
When commit or merging of pull request results in automatic closing of issue
it is possible to also add spent time resolving this issue through commit message.
To specify spent time on resolving issue you need to specify time in format
`@<number><time-unit>` after issue number. In one commit message you can specify
multiple fixed issues and spent time for each of them.
Supported time units (`<time-unit>`):
- `m` - minutes
- `h` - hours
- `d` - days (equals to 8 hours)
- `w` - weeks (equals to 5 days)
- `mo` - months (equals to 4 weeks)
Numbers to specify time (`<number>`) can be also decimal numbers, ex. `@1.5h` would
result in one and half hours. Multiple time units can be combined, ex. `@1h10m` would
mean 1 hour and 10 minutes.
Example of commit message:
> Fixed #123 spent @1h, refs #102, fixes #124 @1.5h
This would result in 1 hour added to issue #123 and 1 and half hours added to issue #124.
## External Trackers
Gitea supports the use of external issue trackers, and references to issues
hosted externally can be created in pull requests. However, if the external
tracker uses numbers to identify issues, they will be indistinguishable from
the pull requests hosted in Gitea. To address this, Gitea allows the use of
the `!` marker to identify pull requests. For example:
> This is issue [#1234](#), and links to the external tracker.
> This is pull request [!1234](#), and links to a pull request in Gitea.
The `!` and `#` can be used interchangeably for issues and pull request _except_
for this case, where a distinction is required. If the repository uses external
tracker, commit message for squash merge will use `!` as reference by default.
## Issues and Pull Requests References Summary
This table illustrates the different kinds of cross-reference for issues and pull requests.
In the examples, `User1/Repo1` refers to the repository where the reference is used, while
`UserZ/RepoZ` indicates a different repository.
| Reference in User1/Repo1 | Repo1 issues are external | RepoZ issues are external | Should render |
| --------------------------- | :-----------------------: | :-----------------------: | ------------------------------------------------------- |
| `#1234` | no | - | A link to issue/pull 1234 in `User1/Repo1` |
| `!1234` | no | - | A link to issue/pull 1234 in `User1/Repo1` |
| `#1234` | yes | - | A link to _external issue_ 1234 for `User1/Repo1` |
| `!1234` | yes | - | A link to _PR_ 1234 for `User1/Repo1` |
| `User1/Repo1#1234` | no | - | A link to issue/pull 1234 in `User1/Repo1` |
| `User1/Repo1!1234` | no | - | A link to issue/pull 1234 in `User1/Repo1` |
| `User1/Repo1#1234` | yes | - | A link to _external issue_ 1234 for `User1/Repo1` |
| `User1/Repo1!1234` | yes | - | A link to _PR_ 1234 for `User1/Repo1` |
| `UserZ/RepoZ#1234` | - | no | A link to issue/pull 1234 in `UserZ/RepoZ` |
| `UserZ/RepoZ!1234` | - | no | A link to issue/pull 1234 in `UserZ/RepoZ` |
| `UserZ/RepoZ#1234` | - | yes | A link to _external issue_ 1234 for `UserZ/RepoZ` |
| `UserZ/RepoZ!1234` | - | yes | A link to _PR_ 1234 for `UserZ/RepoZ` |
| **Alphanumeric issue IDs:** | - | - | - |
| `AAA-1234` | yes | - | A link to _external issue_ `AAA-1234` for `User1/Repo1` |
| `!1234` | yes | - | A link to _PR_ 1234 for `User1/Repo1` |
| `User1/Repo1!1234` | yes | - | A link to _PR_ 1234 for `User1/Repo1` |
| _Not supported_ | - | yes | A link to _external issue_ `AAA-1234` for `UserZ/RepoZ` |
| `UserZ/RepoZ!1234` | - | yes | A link to _PR_ 1234 in `UserZ/RepoZ` |
_The last section is for repositories with external issue trackers that use alphanumeric format._
_**-**: not applicable._
:::note
Automatic references between repositories with different types of issues (external vs. internal) are not fully supported
and may render invalid links.
:::

View File

@@ -0,0 +1,46 @@
---
date: "2022-08-31T17:35:40+08:00"
slug: "merge-message-templates"
sidebar_position: 15
aliases:
- /en-us/merge-message-templates
---
# Merge Message templates
## File names
Possible file names for PR default merge message templates:
- `.gitea/default_merge_message/MERGE_TEMPLATE.md`
- `.gitea/default_merge_message/REBASE_TEMPLATE.md`
- `.gitea/default_merge_message/REBASE-MERGE_TEMPLATE.md`
- `.gitea/default_merge_message/SQUASH_TEMPLATE.md`
- `.gitea/default_merge_message/MANUALLY-MERGED_TEMPLATE.md`
- `.gitea/default_merge_message/REBASE-UPDATE-ONLY_TEMPLATE.md`
## Variables
You can use the following variables enclosed in `${}` inside these templates which follow [os.Expand](https://pkg.go.dev/os#Expand) syntax:
- BaseRepoOwnerName: Base repository owner name of this pull request
- BaseRepoName: Base repository name of this pull request
- BaseBranch: Base repository target branch name of this pull request
- HeadRepoOwnerName: Head repository owner name of this pull request
- HeadRepoName: Head repository name of this pull request
- HeadBranch: Head repository branch name of this pull request
- PullRequestTitle: Pull request's title
- PullRequestDescription: Pull request's description
- PullRequestPosterName: Pull request's poster name
- PullRequestIndex: Pull request's index number
- PullRequestReference: Pull request's reference char with index number. i.e. #1, !2
- ClosingIssues: return a string contains all issues which will be closed by this pull request i.e. `close #1, close #2`
- ReviewedOn: Which pull request this commit belongs to. For example `Reviewed-on: https://gitea.com/foo/bar/pulls/1`
- ReviewedBy: Who approved the pull request before the merge. For example `Reviewed-by: Jane Doe <jane.doe@example.com>`
## Rebase
When rebasing without a merge commit, `REBASE_TEMPLATE.md` modifies the message of the last commit. The following additional variables are available in this template:
- CommitTitle: Commit's title
- CommitBody: Commits's body text

View File

@@ -0,0 +1,76 @@
---
date: "2018-06-01T19:00:00+02:00"
slug: "pull-request"
sidebar_position: 13
aliases:
- /en-us/pull-request
---
# Pull Request
A Pull Request (PR) is a way to propose changes to a repository.
It is a request to merge one branch into another, accompanied by a description of the changes that were made.
Pull Requests are commonly used as a way for contributors to propose changes and for maintainers to review and merge those changes.
## Creating a pull request
To create a PR, you'll need to follow these steps:
1. **Fork the repository** - If you don't have permission to make changes to the repository directly, you'll need to fork the repository to your own account.
This creates a copy of the repository that you can make changes to.
2. **Create a branch (optional)** - Create a new branch on your forked repository that contains the changes you want to propose.
Give the branch a descriptive name that indicates what the changes are for.
3. **Make your changes** - Make the changes you want, commit, and push them to your forked repository.
4. **Create the PR** - Go to the original repository and go to the "Pull Requests" tab. Click the "New Pull Request" button and select your new branch as the source branch.
Enter a descriptive title and description for your Pull Request and click "Create Pull Request".
## Reviewing a pull request
When a PR is created, it triggers a review process. The maintainers of the repository are notified of the PR and can review the changes that were made.
They can leave comments, request changes, or approve the changes.
If the maintainers request changes, you'll need to make those changes in your branch and push the changes to your forked repository.
The PR will be updated automatically with the new changes.
If the maintainers approve the changes, they can merge the PR into the repository.
## Closing a pull request
If you decide that you no longer want to merge a PR, you can close it.
To close a PR, go to the open PR and click the "Close Pull Request" button. This will close the PR without merging it.
## "Work In Progress" pull requests
Marking a pull request as being a work in progress will prevent that pull request from being accidentally merged.
To mark a pull request as being a work in progress, you must prefix its title by `WIP:` or `[WIP]` (case insensitive).
Those values are configurable in your `app.ini` file:
```ini
[repository.pull-request]
WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP]
```
The first value of the list will be used in helpers.
## Default pull request title
When opening a new pull request, Gitea pre-fills the title field. The source of that title is controlled by the `DEFAULT_TITLE_SOURCE` setting in `app.ini`:
```ini
[repository.pull-request]
DEFAULT_TITLE_SOURCE = first-commit
```
Two modes are available:
- **`first-commit`** (default): The title is taken from the summary line of the oldest commit in the branch. This applies regardless of how many commits are included in the PR.
- **`auto`**: When the PR contains a single commit, its summary line is used as the title (same as `first-commit` for one commit). When the PR contains multiple commits, Gitea converts the branch name into a human-readable sentence: dashes, underscores, and `camelCase` word boundaries are replaced with spaces, and the first letter is capitalized.
Example: branch name `fix-user-login-flow` with multiple commits produces the title `Fix user login flow` under `auto`, but would use the oldest commit's message under `first-commit`.
## Pull Request Templates
You can find more information about pull request templates at the page [Issue and Pull Request templates](issue-pull-request-templates.md).

View File

@@ -0,0 +1,9 @@
{
"label": "Packages",
"position": 40,
"link": {
"type": "generated-index",
"slug": "/usage/packages",
"description": "Managing packages and package registries"
}
}

Some files were not shown because too many files have changed in this diff Show More