Author SHA1 Message Date
Gitea Bot 4cb2040a84 Update the runner reference pages 2026-11-16 03:31:46 +00:00
c0e2b5ae00 Document FORCE_USER_ACTIVITY_VISIBILITY (#624)
Documents the `[service] FORCE_USER_ACTIVITY_VISIBILITY` option from https://github.com/go-gitea/gitea/pull/40002, which replaced the earlier `change_activity_visibility` disabled feature.

_Written by Claude (Opus 5.5)._

---------

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
Co-authored-by: Shivansh Garg <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/624
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: SHIVANSH GARG <[email protected]>
2026-11-16 00:14:44 +00:00
silverwindandLunny Xiao c9c3e39b0f Document OpenID 2.0 removal (#633)
Documents https://github.com/go-gitea/gitea/pull/40231 for main, which removes OpenID 2.0 authentication. Drops the `[openid]` settings and OpenID 2.0 mentions from the current docs in all three languages. OpenID Connect docs are unchanged.

_Written by Claude (Opus 5.5)._

---------

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/633
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-15 23:56:06 +00:00
silverwindandLunny Xiao 01c8000cfd Document multiple LDAP hosts (#635)
Documents https://github.com/go-gitea/gitea/pull/40201 for main, which lets the LDAP Host field list several servers as hosts or `ldap://`, `ldaps://` and `ldap+starttls://` URLs. WIP until that PR merges.

_Written by Claude (Opus 5.5)._

---------

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/635
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-15 23:55:57 +00:00
silverwindandLunny Xiao cfd22c91bd Remove repository adoption docs (#639)
Documents https://github.com/go-gitea/gitea/pull/40181 for main, which removes repository adoption and the `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES` and `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES` settings.

The FAQ entry now points to the Gitea importer for importing repositories from disk. Draft until the Gitea PR merges.

_Written by Claude (Opus 5.5)._

---------

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/639
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-15 23:50:35 +00:00
bircni bf8f4ce394 update to 28.4.0 (#648)
Bump the v28 docs to the 28.4.0 release:

- point the `28` version variables (`version`, `sourceVersion`, `dockerVersion`, `displayVersion`) at 28.4.0
- update the v28 entry in `update_api_docs.sh` to `28.4.0`
- regenerate `static/swagger-28.json` and `static/openapi3-28.json` from the `v28.4.0` tag, which marks `path` as required in `CreatePullReviewComment` (go-gitea/gitea#40260)

Reviewed-on: https://gitea.com/gitea/docs/pulls/648
Reviewed-by: TheFox0x7 <[email protected]>
2026-11-15 21:03:40 +00:00
silverwind 757fb1927a Document code search and its query syntax (#615)
Documents https://github.com/go-gitea/gitea/pull/39403: a new user page for code search with the query syntax, results and API endpoints, and an update to the repository indexer page saying that `git grep` search needs Git with PCRE.

_Written by Claude._

Reviewed-on: https://gitea.com/gitea/docs/pulls/615
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-13 18:45:17 +00:00
silverwind d5a68736bd Remove the DSA minimum key size option (#646)
Documents https://github.com/go-gitea/gitea/pull/40332 for main, which removes SSH DSA key support. Drops the `DSA` option of `[ssh.minimum_key_sizes]` from the current docs in all three languages. Draft until the Gitea PR merges.

_Written by Claude (Opus 5.5)._

Reviewed-on: https://gitea.com/gitea/docs/pulls/646
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-12 18:22:57 +00:00
23 changed files with 118 additions and 162 deletions

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ Events cover security-relevant changes, grouped by action family:
- **User**: create and delete, admin, restricted and active status, name, - **User**: create and delete, admin, restricted and active status, name,
password and password reset requests, visibility, emails, authentication password and password reset requests, visibility, emails, authentication
source, 2FA, WebAuthn, OpenID, external logins, access tokens, OAuth2 source, 2FA, WebAuthn, external logins, access tokens, OAuth2
applications and grants, SSH/GPG/principal keys, secrets, webhooks, applications and grants, SSH/GPG/principal keys, secrets, webhooks,
impersonation, failed two-factor authentication impersonation, failed two-factor authentication
- **Organization**: create and delete, name, visibility, members, teams, - **Organization**: create and delete, name, visibility, members, teams,
+4 -8
View File
@@ -18,12 +18,13 @@ Both the LDAP via BindDN and the simple auth LDAP share the following fields:
- Host **(required)** - Host **(required)**
- The address where the LDAP server can be reached. - Comma-separated LDAP servers. Each is a host using the Port and Security Protocol fields, or an `ldap://`, `ldaps://` or `ldap+starttls://` URL with an optional port. `ldap://` requires the Unencrypted Security Protocol, the other URLs require an encrypted one.
- Example: `mydomain.com` - The next server is tried when the previous one fails or takes over 250 ms to connect. Bind and search failures do not move on to it.
- Example: `ldap1.mydomain.com, ldaps://ldap2.mydomain.com:636`
- Port **(required)** - Port **(required)**
- The port to use when connecting to the server. - The port to use when connecting to hosts given without a URL.
- Example: `389` for LDAP or `636` for LDAP SSL - Example: `389` for LDAP or `636` for LDAP SSL
- Enable TLS Encryption (optional) - Enable TLS Encryption (optional)
@@ -431,8 +432,3 @@ USERNAME = nickname
; what to do when the username or email is already taken ; what to do when the username or email is already taken
ACCOUNT_LINKING = login ACCOUNT_LINKING = login
``` ```
:::note
This is unrelated to `ENABLE_OPENID_SIGNIN` and the `[openid]` section, which
configure the older OpenID 2.0 sign-in.
:::
-7
View File
@@ -50,13 +50,6 @@ Listing all embedded files with `openid` in their path:
```sh ```sh
$ gitea embedded list '**openid**' $ gitea embedded list '**openid**'
public/assets/img/auth/openid_connect.svg public/assets/img/auth/openid_connect.svg
public/assets/img/openid-16x16.png
templates/user/auth/finalize_openid.tmpl
templates/user/auth/signin_openid.tmpl
templates/user/auth/signup_openid_connect.tmpl
templates/user/auth/signup_openid_navbar.tmpl
templates/user/auth/signup_openid_register.tmpl
templates/user/settings/security_openid.tmpl
``` ```
## Extracting resources ## Extracting resources
+8 -8
View File
@@ -205,8 +205,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source. - `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. Required. - `--security-protocol value`: Security protocol name. Required.
- `--skip-tls-verify`: Disable TLS verification. - `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached. Required. - `--host value`: Comma-separated LDAP hosts or `ldap://`, `ldaps://` or `ldap+starttls://` URLs, tried in order. Required.
- `--port value`: The port to use when connecting to the LDAP server. Required. - `--port value`: The port to use when connecting to hosts given without a URL. Required.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for. 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. - `--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. - `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
@@ -231,8 +231,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source. - `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. - `--security-protocol value`: Security protocol name.
- `--skip-tls-verify`: Disable TLS verification. - `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached. - `--host value`: Comma-separated LDAP hosts or `ldap://`, `ldaps://` or `ldap+starttls://` URLs, tried in order.
- `--port value`: The port to use when connecting to the LDAP server. - `--port value`: The port to use when connecting to hosts given without a URL.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for. - `--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. - `--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. - `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
@@ -257,8 +257,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source. - `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. Required. - `--security-protocol value`: Security protocol name. Required.
- `--skip-tls-verify`: Disable TLS verification. - `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached. Required. - `--host value`: Comma-separated LDAP hosts or `ldap://`, `ldaps://` or `ldap+starttls://` URLs, tried in order. Required.
- `--port value`: The port to use when connecting to the LDAP server. Required. - `--port value`: The port to use when connecting to hosts given without a URL. Required.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for. - `--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. - `--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. - `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
@@ -279,8 +279,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source. - `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. - `--security-protocol value`: Security protocol name.
- `--skip-tls-verify`: Disable TLS verification. - `--skip-tls-verify`: Disable TLS verification.
- `--host value`: The address where the LDAP server can be reached. - `--host value`: Comma-separated LDAP hosts or `ldap://`, `ldaps://` or `ldap+starttls://` URLs, tried in order.
- `--port value`: The port to use when connecting to the LDAP server. - `--port value`: The port to use when connecting to hosts given without a URL.
- `--user-search-base value`: The LDAP base at which user accounts will be searched for. - `--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. - `--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. - `--admin-filter value`: An LDAP filter specifying if a user should be given administrator privileges.
+3 -14
View File
@@ -151,8 +151,6 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
- `DISABLE_MIGRATIONS`: **false**: Disable migrating feature. - `DISABLE_MIGRATIONS`: **false**: Disable migrating feature.
- `DISABLE_STARS`: **false**: Disable stars feature. - `DISABLE_STARS`: **false**: Disable stars feature.
- `DEFAULT_BRANCH`: **main**: Default branch name of all repositories. - `DEFAULT_BRANCH`: **main**: Default branch name of all repositories.
- `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: Allow non-admin users to adopt unadopted repositories
- `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: Allow non-admin users to delete unadopted repositories
- `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: Don't allow download source archive files from UI - `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: Don't allow download source archive files from UI
- `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: Allow to fork repositories without maximum number limit - `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: Allow to fork repositories without maximum number limit
- `ALLOW_FORK_INTO_SAME_OWNER`: **false**: Allow to fork repositories into the same owner (user or organization). - `ALLOW_FORK_INTO_SAME_OWNER`: **false**: Allow to fork repositories into the same owner (user or organization).
@@ -569,7 +567,7 @@ And the following unique queues:
- `manage_ssh_keys`: User cannot configure ssh keys. - `manage_ssh_keys`: User cannot configure ssh keys.
- `manage_gpg_keys`: User cannot configure gpg keys. - `manage_gpg_keys`: User cannot configure gpg keys.
- `manage_mfa`: a User cannot configure mfa devices. - `manage_mfa`: a User cannot configure mfa devices.
- `manage_credentials`: a user cannot configure emails, passwords, or openid - `manage_credentials`: a user cannot configure emails or passwords
- `change_username`: a user cannot change their username - `change_username`: a user cannot change their username
- `change_full_name`: a user cannot change their full name - `change_full_name`: a user cannot change their full name
- `EXTERNAL_USER_DISABLE_FEATURES`: **_empty_**: Comma separated list of disabled features ONLY if the user has an external login type (eg. LDAP, Oauth, etc.), could be `deletion`, `manage_ssh_keys`, `manage_gpg_keys`, `manage_mfa`, `manage_credentials`. This setting is independent from `USER_DISABLED_FEATURES` and supplements its behavior. - `EXTERNAL_USER_DISABLE_FEATURES`: **_empty_**: Comma separated list of disabled features ONLY if the user has an external login type (eg. LDAP, Oauth, etc.), could be `deletion`, `manage_ssh_keys`, `manage_gpg_keys`, `manage_mfa`, `manage_credentials`. This setting is independent from `USER_DISABLED_FEATURES` and supplements its behavior.
@@ -577,7 +575,7 @@ And the following unique queues:
- `manage_ssh_keys`: User cannot configure ssh keys. - `manage_ssh_keys`: User cannot configure ssh keys.
- `manage_gpg_keys`: User cannot configure gpg keys. - `manage_gpg_keys`: User cannot configure gpg keys.
- `manage_mfa`: a User cannot configure mfa devices. - `manage_mfa`: a User cannot configure mfa devices.
- `manage_credentials`: a user cannot configure emails, passwords, or openid - `manage_credentials`: a user cannot configure emails or passwords
- `change_username`: a user cannot change their username - `change_username`: a user cannot change their username
- `change_full_name`: a user cannot change their full name - `change_full_name`: a user cannot change their full name
@@ -679,15 +677,6 @@ And the following unique queues:
- `HMAC_KEY`: **_empty_**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled. - `HMAC_KEY`: **_empty_**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled.
- `ALWAYS`: **false**: Set to true to use camo for both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied. `ALLWAYS` is deprecated and will be removed in a future release. - `ALWAYS`: **false**: Set to true to use camo for both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied. `ALLWAYS` is deprecated and will be removed in a future release.
## OpenID (`openid`)
- `ENABLE_OPENID_SIGNIN`: **false**: Allow authentication in via OpenID.
- `ENABLE_OPENID_SIGNUP`: **false**: Allow registering via OpenID.
- `WHITELISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching
OpenID URI's to permit.
- `BLACKLISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching
OpenID URI's to block.
## OAuth2 Client (`oauth2_client`) ## OAuth2 Client (`oauth2_client`)
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section) - `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section)
@@ -765,6 +754,7 @@ And the following unique queues:
- `CF_TURNSTILE_SECRET` **""**: Go to https://dash.cloudflare.com/?to=/:account/turnstile to get a secret for cloudflare turnstile. - `CF_TURNSTILE_SECRET` **""**: Go to https://dash.cloudflare.com/?to=/:account/turnstile to get a secret for cloudflare turnstile.
- `CF_TURNSTILE_SITEKEY` **""**: Go to https://dash.cloudflare.com/?to=/:account/turnstile to get a sitekey for cloudflare turnstile. - `CF_TURNSTILE_SITEKEY` **""**: Go to https://dash.cloudflare.com/?to=/:account/turnstile to get a sitekey for cloudflare turnstile.
- `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: By default set users to keep their email address private. - `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: By default set users to keep their email address private.
- `FORCE_USER_ACTIVITY_VISIBILITY`: **_empty_**: Force all users' activity to "public" or "private", overwriting their "Hide Activity" setting.
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: Allow new users to create organizations by default. - `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: Allow new users to create organizations by default.
- `DEFAULT_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default - `DEFAULT_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default
- `DEFAULT_ENABLE_DEPENDENCIES`: **true**: Enable this to have dependencies enabled by default. - `DEFAULT_ENABLE_DEPENDENCIES`: **true**: Enable this to have dependencies enabled by default.
@@ -811,7 +801,6 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
- `ED25519`: **256** - `ED25519`: **256**
- `ECDSA`: **256** - `ECDSA`: **256**
- `RSA`: **3071**: We set 3071 here because an otherwise valid 3072 RSA key can be reported as 3071 length. - `RSA`: **3071**: We set 3071 here because an otherwise valid 3072 RSA key can be reported as 3071 length.
- `DSA`: **-1**: DSA is now disabled by default. Set to **1024** to re-enable but ensure you may need to reconfigure your SSHD provider
## Webhook (`webhook`) ## Webhook (`webhook`)
+4 -3
View File
@@ -10,9 +10,10 @@ aliases:
## Builtin repository code search without indexer ## Builtin repository code search without indexer
Users could do repository-level code search without setting up a repository indexer. Users can search the code of a single repository without setting up a repository indexer.
The builtin code search is based on the `git grep` command, which is fast and efficient for small repositories. This search uses `git grep`, which is fast for small repositories and requires Git built with PCRE support, as most distributions provide.
Better code search support could be achieved by setting up the repository indexer. Searching across repositories requires the repository indexer.
See [Code Search](../usage/code-search.md) for the query syntax.
## Setting up the repository indexer ## Setting up the repository indexer
+4 -19
View File
@@ -134,22 +134,13 @@ You can also see an example of the `swagger.json` file at https://gitea.com/swag
There are multiple things you can combine to prevent spammers. There are multiple things you can combine to prevent spammers.
1. By whitelisting or blocklisting certain email domains 1. By whitelisting or blocklisting certain email domains
2. By only whitelisting certain domains with OpenID (see below) 2. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY` 3. 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
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 ### Only allow/block certain email domains
You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]` 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 ### Issue only users
The current way to achieve this is to create/modify a user with a max repo creation limit of 0. The current way to achieve this is to create/modify a user with a max repo creation limit of 0.
@@ -328,14 +319,8 @@ It is highly recommended to back-up your database before running these commands.
## How to adopt repositories from disk ## 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`. To import repositories from disk, use the [Gitea importer](https://gitea.com/gitea/importer) with `--source-type local`.
- **Note:** the directory names must be lowercase. If the repositories are already under Gitea's repository root, move them outside it before importing to avoid conflicts with destination paths.
- 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 ## Gitea can't start on NFS
+42
View File
@@ -0,0 +1,42 @@
---
date: "2026-10-29T00:00:00+00:00"
slug: "code-search"
sidebar_position: 50
---
# Code Search
Search code in a single repository with the search box on the repository's code tab. To search across repositories, use the **Code** tab on the explore page or on a user or organization profile. Searching across repositories requires the [repository indexer](../administration/repo-indexer.md).
## Query syntax
A file is found when every term matches its content or its path. Matching ignores case and also finds terms inside longer words, so `port` matches `import`.
| Syntax | Example | Finds files that |
| --- | --- | --- |
| `term` | `getUser` | contain `getUser` |
| `term term` | `user cache` | contain both `user` and `cache` |
| `"phrase"` | `"func main()"` | contain the exact text, including spaces |
| `/regexp/` | `/get\w+User/` | have a line matching the regular expression |
| `path:DIR` | `path:src/utils` | are inside the `src/utils` directory |
| `language:NAME` | `language:go` | are written in Go |
| `repo:OWNER/NAME` | `repo:gitea/tea` | are in the `gitea/tea` repository |
| `user:NAME`, `org:NAME` | `org:gitea` | are in a repository owned by `gitea` |
- `repo:`, `user:` and `org:` only work when searching across repositories. Repeat them to search several, for example `repo:gitea/tea repo:gitea/act`.
- Regular expressions only work when the repository indexer is not enabled. They match one line at a time, so use `\s` for spaces, as a space separates terms.
- `language:` only works with the repository indexer.
- `AND`, `OR`, `NOT`, negated qualifiers like `-path:`, and qualifiers like `content:` or `extension:` are not supported and show an error.
## Results
Each file shows up to 10 snippets with the matches highlighted. Binary files are only found by their path.
Without the repository indexer, a search stops after 50 files and shows a notice. Narrow the query with more terms or `path:` to see the rest.
## API
- `GET /api/v1/repos/{owner}/{repo}/code/search?q=...` searches one repository. Set `ref` to search a branch, tag or commit other than the default branch. It always supports regular expressions, but not `language:`.
- `GET /api/v1/search/code?q=...` searches the default branches of all repositories you can read. It requires the repository indexer and does not support regular expressions.
Both return results in GitHub's format, including `text_matches` with the match positions. Results can be paged up to the 1000th file.
@@ -18,12 +18,13 @@ aliases:
- 主机名 **(必选)** - 主机名 **(必选)**
- LDAP 服务的主机地址. - 以逗号分隔的 LDAP 服务地址。每一项可以是使用端口号和安全协议设置的主机名,也可以是带可选端口的 `ldap://`、`ldaps://` 或 `ldap+starttls://` URL。`ldap://` 仅可用于未加密的安全协议,其他 URL 仅可用于加密的安全协议。
- 例如:`mydomain.com` - 前一个服务连接失败或超过 250 毫秒仍未连上时,会尝试下一个服务。绑定或搜索失败不会切换到下一个服务。
- 例如:`ldap1.mydomain.com, ldaps://ldap2.mydomain.com:636`
- 端口号 **(必选)** - 端口号 **(必选)**
- LDAP 服务的端口号. - 未以 URL 形式给出的主机所使用的端口号.
- 例如: LDAP `389`/ LDAPs `636` - 例如: LDAP `389`/ LDAPs `636`
- 安全协议 (可选) - 安全协议 (可选)
@@ -42,13 +42,6 @@ gitea embedded list [--include-vendored] [patterns...]
```sh ```sh
$ gitea embedded list '**openid**' $ gitea embedded list '**openid**'
public/assets/img/auth/openid_connect.svg public/assets/img/auth/openid_connect.svg
public/assets/img/openid-16x16.png
templates/user/auth/finalize_openid.tmpl
templates/user/auth/signin_openid.tmpl
templates/user/auth/signup_openid_connect.tmpl
templates/user/auth/signup_openid_navbar.tmpl
templates/user/auth/signup_openid_register.tmpl
templates/user/settings/security_openid.tmpl
``` ```
## 提取资源 ## 提取资源
@@ -189,8 +189,8 @@ aliases:
- `--not-active`:停用认证源。 - `--not-active`:停用认证源。
- `--security-protocol value`:安全协议名称。必填。 - `--security-protocol value`:安全协议名称。必填。
- `--skip-tls-verify`:禁用 TLS 验证。 - `--skip-tls-verify`:禁用 TLS 验证。
- `--host value`:LDAP 服务器的地址。必填。 - `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。必填。
- `--port value`:连接到 LDAP 服务器时使用的端口。必填。 - `--port value`:连接未以 URL 形式给出的主机时使用的端口。必填。
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。必填。 - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。必填。
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。 - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
@@ -215,8 +215,8 @@ aliases:
- `--not-active`:停用认证源。 - `--not-active`:停用认证源。
- `--security-protocol value`:安全协议名称。 - `--security-protocol value`:安全协议名称。
- `--skip-tls-verify`:禁用 TLS 验证。 - `--skip-tls-verify`:禁用 TLS 验证。
- `--host value`:LDAP 服务器的地址。 - `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。
- `--port value`:连接到 LDAP 服务器时使用的端口。 - `--port value`:连接未以 URL 形式给出的主机时使用的端口。
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。 - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。 - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
@@ -241,8 +241,8 @@ aliases:
- `--not-active`:停用认证源。 - `--not-active`:停用认证源。
- `--security-protocol value`:安全协议名称。必填。 - `--security-protocol value`:安全协议名称。必填。
- `--skip-tls-verify`:禁用 TLS 验证。 - `--skip-tls-verify`:禁用 TLS 验证。
- `--host value`:LDAP 服务器的地址。必填。 - `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。必填。
- `--port value`:连接到 LDAP 服务器时使用的端口。必填。 - `--port value`:连接未以 URL 形式给出的主机时使用的端口。必填。
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。 - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。 - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
@@ -263,8 +263,8 @@ aliases:
- `--not-active`:停用认证源。 - `--not-active`:停用认证源。
- `--security-protocol value`:安全协议名称。 - `--security-protocol value`:安全协议名称。
- `--skip-tls-verify`:禁用 TLS 验证。 - `--skip-tls-verify`:禁用 TLS 验证。
- `--host value`:LDAP 服务器的地址。 - `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。
- `--port value`:连接到 LDAP 服务器时使用的端口。 - `--port value`:连接未以 URL 形式给出的主机时使用的端口。
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。 - `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。 - `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。 - `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
@@ -114,8 +114,6 @@ aliases:
- `DISABLE_MIGRATIONS`: **false**: 禁用迁移功能。 - `DISABLE_MIGRATIONS`: **false**: 禁用迁移功能。
- `DISABLE_STARS`: **false**: 禁用点赞功能。 - `DISABLE_STARS`: **false**: 禁用点赞功能。
- `DEFAULT_BRANCH`: **main**: 所有仓库的默认分支名称。 - `DEFAULT_BRANCH`: **main**: 所有仓库的默认分支名称。
- `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: 允许非管理员用户认领未被认领的仓库。
- `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: 允许非管理员用户删除未被认领的仓库。
- `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: 不允许从用户界面下载源代码存档文件。 - `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: 不允许从用户界面下载源代码存档文件。
- `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: 允许无限制得派生仓库。 - `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: 允许无限制得派生仓库。
- `ALLOW_FORK_INTO_SAME_OWNER`: **false**: 允许将仓库派生到同一所有者(用户或组织)中。此功能为实验性功能,尚未完全测试,将来可能会更改。 - `ALLOW_FORK_INTO_SAME_OWNER`: **false**: 允许将仓库派生到同一所有者(用户或组织)中。此功能为实验性功能,尚未完全测试,将来可能会更改。
@@ -509,7 +507,7 @@ Gitea 创建以下非唯一队列:
- `manage_ssh_keys`:用户不能配置 SSH 密钥。 - `manage_ssh_keys`:用户不能配置 SSH 密钥。
- `manage_gpg_keys`:用户不能配置 GPG 密钥。 - `manage_gpg_keys`:用户不能配置 GPG 密钥。
- `manage_mfa`:用户不能配置 MFA 设备。 - `manage_mfa`:用户不能配置 MFA 设备。
- `manage_credentials`:用户不能配置邮箱、密码或 OpenID。 - `manage_credentials`:用户不能配置邮箱或密码。
- `change_username`:用户不能更改其用户名。 - `change_username`:用户不能更改其用户名。
- `change_full_name`:用户不能更改其全名。 - `change_full_name`:用户不能更改其全名。
@@ -575,13 +573,6 @@ Gitea 创建以下非唯一队列:
- `HMAC_KEY`: **_empty_**: 为 URL 编码提供 HMAC 密钥,如果启用 camo,则**必填**。 - `HMAC_KEY`: **_empty_**: 为 URL 编码提供 HMAC 密钥,如果启用 camo,则**必填**。
- `ALWAYS`: **false**: 设置为 true 以在 HTTP 和 HTTPS 内容上使用 camo,否则仅代理非 HTTPS URL。`ALLWAYS` 已经过期,并且会在未来版本中删除。 - `ALWAYS`: **false**: 设置为 true 以在 HTTP 和 HTTPS 内容上使用 camo,否则仅代理非 HTTPS URL。`ALLWAYS` 已经过期,并且会在未来版本中删除。
## OpenID (`openid`)
- `ENABLE_OPENID_SIGNIN`: **true**: 允许通过 OpenID 进行身份验证。
- `ENABLE_OPENID_SIGNUP`: **! DISABLE_REGISTRATION**: 允许通过 OpenID 进行注册。
- `WHITELISTED_URIS`: **_empty_**: 如果非空,是一组匹配 OpenID URI 的 POSIX 正则表达式模式,用于允许访问。
- `BLACKLISTED_URIS`: **_empty_**: 如果非空,是一组匹配 OpenID URI 的 POSIX 正则表达式模式,用于阻止访问。
## OAuth2 Client (`oauth2_client`) ## OAuth2 Client (`oauth2_client`)
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 设置此项以启用或禁用 OAuth2 自动注册的电子邮件确认。(覆盖`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`设置) - `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 设置此项以启用或禁用 OAuth2 自动注册的电子邮件确认。(覆盖`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`设置)
@@ -630,6 +621,7 @@ Gitea 创建以下非唯一队列:
- `CF_TURNSTILE_SECRET` **""**: 访问 https://dash.cloudflare.com/?to=/:account/turnstile 以获取 cloudflare turnstile 的密钥。 - `CF_TURNSTILE_SECRET` **""**: 访问 https://dash.cloudflare.com/?to=/:account/turnstile 以获取 cloudflare turnstile 的密钥。
- `CF_TURNSTILE_SITEKEY` **""**: 访问 https://dash.cloudflare.com/?to=/:account/turnstile 以获取 cloudflare turnstile 的站点密钥。 - `CF_TURNSTILE_SITEKEY` **""**: 访问 https://dash.cloudflare.com/?to=/:account/turnstile 以获取 cloudflare turnstile 的站点密钥。
- `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: 默认情况下,将用户设置为保持其电子邮件地址私有。 - `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: 默认情况下,将用户设置为保持其电子邮件地址私有。
- `FORCE_USER_ACTIVITY_VISIBILITY`: **_empty_**: 强制所有用户的活动为 "public" 或 "private",并覆盖其“隐藏活动”设置。
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: 默认情况下,允许新用户创建组织。 - `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: 默认情况下,允许新用户创建组织。
- `DEFAULT_USER_IS_RESTRICTED`: **false**: 默认情况下,为新用户分配受限权限。 - `DEFAULT_USER_IS_RESTRICTED`: **false**: 默认情况下,为新用户分配受限权限。
- `DEFAULT_ENABLE_DEPENDENCIES`: **true**: 启用此项以默认启用依赖项。 - `DEFAULT_ENABLE_DEPENDENCIES`: **true**: 启用此项以默认启用依赖项。
@@ -677,7 +669,6 @@ Gitea 创建以下非唯一队列:
- `ED25519`:**256** - `ED25519`:**256**
- `ECDSA`:**256** - `ECDSA`:**256**
- `RSA`:**3071**: 我们在这里设置为 2047,因为一个其他方面有效的 3072 RSA 密钥可能被报告为 3071 长度。 - `RSA`:**3071**: 我们在这里设置为 2047,因为一个其他方面有效的 3072 RSA 密钥可能被报告为 3071 长度。
- `DSA`:**-1**: 默认情况下禁用 DSA。设置为**1024**以重新启用,但请注意可能需要重新配置您的 SSHD 提供者
## Webhook (`webhook`) ## Webhook (`webhook`)
+4 -17
View File
@@ -143,20 +143,13 @@ Gitea 不提供内置的 Pages 服务器。您需要一个专用的域名来提
有多种方法可以组合使用来防止垃圾邮件发送者: 有多种方法可以组合使用来防止垃圾邮件发送者:
1. 通过设置电子邮件域名的白名单或黑名单。 1. 通过设置电子邮件域名的白名单或黑名单。
2. 通过设置一些域名或者 OpenID 白名单(见下文)。 2. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
3. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。 3. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。
4. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。
### 仅允许/阻止特定的电子邮件域名 ### 仅允许/阻止特定的电子邮件域名
您可以在`app.ini`中的`[service]`下的配置`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。 您可以在`app.ini`中的`[service]`下的配置`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
### 仅允许/阻止特定的 OpenID 提供商
您可以在`app.ini`的`[openid]`下配置`WHITELISTED_URI`或`BLACKLISTED_URIS`。
**注意**: 白名单优先,如果白名单非空,则忽略黑名单。
### 仅允许发布问题的用户 ### 仅允许发布问题的用户
目前实现这一点的方法是创建/修改一个具有最大仓库创建限制为 0 的用户。 目前实现这一点的方法是创建/修改一个具有最大仓库创建限制为 0 的用户。
@@ -423,11 +416,5 @@ gitea doctor recreate-table
## 如何从磁盘采用存储库 ## 如何从磁盘采用存储库
- 将您的(裸)存储库添加到正确的位置,即您的配置所在的地方(`repository.ROOT`),确保它们位于正确的布局`<REPO_ROOT>/[user]/[repo].git`。 要从磁盘导入仓库,请使用 [Gitea importer](https://gitea.com/gitea/importer),参数:`--source-type local`。
- **注意:**目录名必须为小写。 如果仓库已位于 Gitea 的仓库根目录下,请先将其移到该目录之外,再导入,以免与目标路径冲突。
- 您还可以在`<ROOT_URL>/admin/config`中检查存储库根路径。
- 确保存在要采用存储库的用户/组织。
- 作为管理员,转到`<ROOT_URL>/admin/repos/unadopted`并搜索。
- 用户也可以通过配置[`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](../administration/config-cheat-sheet.md#仓库) 获得类似的权限。
- 如果上述步骤都正确执行,您应该能够选择要采用的存储库。
- 如果没有找到存储库,请启用[调试日志记录](../administration/config-cheat-sheet.md#仓库)以检查是否有特定错误。
@@ -18,12 +18,13 @@ aliases:
- 主機名 **(必選)** - 主機名 **(必選)**
- LDAP 服務的主機地址. - 以逗號分隔的 LDAP 服務地址。每一項可以是使用端口號和安全協議設定的主機名,也可以是帶可選端口的 `ldap://`、`ldaps://` 或 `ldap+starttls://` URL。`ldap://` 僅可用於未加密的安全協議,其他 URL 僅可用於加密的安全協議。
- 例如:`mydomain.com` - 前一個服務連線失敗或超過 250 毫秒仍未連上時,會嘗試下一個服務。綁定或搜尋失敗不會切換到下一個服務。
- 例如:`ldap1.mydomain.com, ldaps://ldap2.mydomain.com:636`
- 端口號 **(必選)** - 端口號 **(必選)**
- LDAP 服務的端口號. - 未以 URL 形式給出的主機所使用的端口號.
- 例如: LDAP `389`/ LDAPs `636` - 例如: LDAP `389`/ LDAPs `636`
- 安全協議 (可選) - 安全協議 (可選)
@@ -42,13 +42,6 @@ gitea embedded list [--include-vendored] [patterns...]
```sh ```sh
$ gitea embedded list '**openid**' $ gitea embedded list '**openid**'
public/assets/img/auth/openid_connect.svg public/assets/img/auth/openid_connect.svg
public/assets/img/openid-16x16.png
templates/user/auth/finalize_openid.tmpl
templates/user/auth/signin_openid.tmpl
templates/user/auth/signup_openid_connect.tmpl
templates/user/auth/signup_openid_navbar.tmpl
templates/user/auth/signup_openid_register.tmpl
templates/user/settings/security_openid.tmpl
``` ```
## 提取資源 ## 提取資源
@@ -189,8 +189,8 @@ aliases:
- `--not-active`:停用認證源。 - `--not-active`:停用認證源。
- `--security-protocol value`:安全協議名稱。必填。 - `--security-protocol value`:安全協議名稱。必填。
- `--skip-tls-verify`:禁用 TLS 驗證。 - `--skip-tls-verify`:禁用 TLS 驗證。
- `--host value`:LDAP 伺服器的地址。必填。 - `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。必填。
- `--port value`:連接到 LDAP 伺服器時使用的端口。必填。 - `--port value`:連接未以 URL 形式給出的主機時使用的端口。必填。
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。必填。 - `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。必填。
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。必填。 - `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。必填。
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。 - `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
@@ -215,8 +215,8 @@ aliases:
- `--not-active`:停用認證源。 - `--not-active`:停用認證源。
- `--security-protocol value`:安全協議名稱。 - `--security-protocol value`:安全協議名稱。
- `--skip-tls-verify`:禁用 TLS 驗證。 - `--skip-tls-verify`:禁用 TLS 驗證。
- `--host value`:LDAP 伺服器的地址。 - `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。
- `--port value`:連接到 LDAP 伺服器時使用的端口。 - `--port value`:連接未以 URL 形式給出的主機時使用的端口。
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。 - `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。 - `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。 - `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
@@ -241,8 +241,8 @@ aliases:
- `--not-active`:停用認證源。 - `--not-active`:停用認證源。
- `--security-protocol value`:安全協議名稱。必填。 - `--security-protocol value`:安全協議名稱。必填。
- `--skip-tls-verify`:禁用 TLS 驗證。 - `--skip-tls-verify`:禁用 TLS 驗證。
- `--host value`:LDAP 伺服器的地址。必填。 - `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。必填。
- `--port value`:連接到 LDAP 伺服器時使用的端口。必填。 - `--port value`:連接未以 URL 形式給出的主機時使用的端口。必填。
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。 - `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。必填。 - `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。必填。
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。 - `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
@@ -263,8 +263,8 @@ aliases:
- `--not-active`:停用認證源。 - `--not-active`:停用認證源。
- `--security-protocol value`:安全協議名稱。 - `--security-protocol value`:安全協議名稱。
- `--skip-tls-verify`:禁用 TLS 驗證。 - `--skip-tls-verify`:禁用 TLS 驗證。
- `--host value`:LDAP 伺服器的地址。 - `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。
- `--port value`:連接到 LDAP 伺服器時使用的端口。 - `--port value`:連接未以 URL 形式給出的主機時使用的端口。
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。 - `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。 - `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。 - `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
@@ -115,8 +115,6 @@ aliases:
- `DISABLE_MIGRATIONS`: **false**: 禁用遷移功能。 - `DISABLE_MIGRATIONS`: **false**: 禁用遷移功能。
- `DISABLE_STARS`: **false**: 禁用點贊功能。 - `DISABLE_STARS`: **false**: 禁用點贊功能。
- `DEFAULT_BRANCH`: **main**: 所有儲存庫的預設分支名稱。 - `DEFAULT_BRANCH`: **main**: 所有儲存庫的預設分支名稱。
- `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: 允許非管理員使用者認領未被認領的儲存庫。
- `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: 允許非管理員使用者刪除未被認領的儲存庫。
- `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: 不允許從使用者介面下載源程式碼存檔文件。 - `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: 不允許從使用者介面下載源程式碼存檔文件。
- `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: 允許無限制得派生儲存庫。 - `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: 允許無限制得派生儲存庫。
- `ALLOW_FORK_INTO_SAME_OWNER`: **false**: 允許將儲存庫派生到同一所有者(使用者或組織)中。此功能為實驗性功能,尚未完全測試,將來可能會更改。 - `ALLOW_FORK_INTO_SAME_OWNER`: **false**: 允許將儲存庫派生到同一所有者(使用者或組織)中。此功能為實驗性功能,尚未完全測試,將來可能會更改。
@@ -512,7 +510,7 @@ Gitea 建立以下非唯一隊列:
- `manage_ssh_keys`:使用者不能設定 SSH 密鑰。 - `manage_ssh_keys`:使用者不能設定 SSH 密鑰。
- `manage_gpg_keys`:使用者不能設定 GPG 密鑰。 - `manage_gpg_keys`:使用者不能設定 GPG 密鑰。
- `manage_mfa`:使用者不能設定 MFA 設備。 - `manage_mfa`:使用者不能設定 MFA 設備。
- `manage_credentials`:使用者不能設定郵箱、密碼或 OpenID。 - `manage_credentials`:使用者不能設定郵箱或密碼。
- `change_username`:使用者不能更改其使用者名稱。 - `change_username`:使用者不能更改其使用者名稱。
- `change_full_name`:使用者不能更改其全名。 - `change_full_name`:使用者不能更改其全名。
@@ -580,13 +578,6 @@ Gitea 建立以下非唯一隊列:
- `HMAC_KEY`: **_empty_**: 為 URL 編碼提供 HMAC 密鑰,如果啟用 camo,則**必填**。 - `HMAC_KEY`: **_empty_**: 為 URL 編碼提供 HMAC 密鑰,如果啟用 camo,則**必填**。
- `ALWAYS`: **false**: 設定為 true 以在 HTTP 和 HTTPS 內容上使用 camo,否則僅代理非 HTTPS URL。`ALLWAYS` 已經過期,並且會在未來版本中刪除。 - `ALWAYS`: **false**: 設定為 true 以在 HTTP 和 HTTPS 內容上使用 camo,否則僅代理非 HTTPS URL。`ALLWAYS` 已經過期,並且會在未來版本中刪除。
## OpenID (`openid`)
- `ENABLE_OPENID_SIGNIN`: **true**: 允許透過 OpenID 進行身份驗證。
- `ENABLE_OPENID_SIGNUP`: **! DISABLE_REGISTRATION**: 允許透過 OpenID 進行註冊。
- `WHITELISTED_URIS`: **_empty_**: 如果非空,是一組匹配 OpenID URI 的 POSIX 正則表達式模式,用於允許訪問。
- `BLACKLISTED_URIS`: **_empty_**: 如果非空,是一組匹配 OpenID URI 的 POSIX 正則表達式模式,用於阻止訪問。
## OAuth2 Client (`oauth2_client`) ## OAuth2 Client (`oauth2_client`)
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 設定此項以啟用或禁用 OAuth2 自動註冊的電子郵件確認。(覆蓋`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`設定) - `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 設定此項以啟用或禁用 OAuth2 自動註冊的電子郵件確認。(覆蓋`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`設定)
@@ -635,6 +626,7 @@ Gitea 建立以下非唯一隊列:
- `CF_TURNSTILE_SECRET` **""**: 訪問 https://dash.cloudflare.com/?to=/:account/turnstile 以獲取 cloudflare turnstile 的密鑰。 - `CF_TURNSTILE_SECRET` **""**: 訪問 https://dash.cloudflare.com/?to=/:account/turnstile 以獲取 cloudflare turnstile 的密鑰。
- `CF_TURNSTILE_SITEKEY` **""**: 訪問 https://dash.cloudflare.com/?to=/:account/turnstile 以獲取 cloudflare turnstile 的站點密鑰。 - `CF_TURNSTILE_SITEKEY` **""**: 訪問 https://dash.cloudflare.com/?to=/:account/turnstile 以獲取 cloudflare turnstile 的站點密鑰。
- `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: 預設情況下,將使用者設定為保持其電子電子郵件地址私有。 - `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: 預設情況下,將使用者設定為保持其電子電子郵件地址私有。
- `FORCE_USER_ACTIVITY_VISIBILITY`: **_empty_**: 強制所有使用者的活動為 "public" 或 "private",並覆寫其「隱藏活動」設定。
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: 預設情況下,允許新使用者建立組織。 - `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: 預設情況下,允許新使用者建立組織。
- `DEFAULT_USER_IS_RESTRICTED`: **false**: 預設情況下,為新使用者分配受限權限。 - `DEFAULT_USER_IS_RESTRICTED`: **false**: 預設情況下,為新使用者分配受限權限。
- `DEFAULT_ENABLE_DEPENDENCIES`: **true**: 啟用此項以預設啟用依賴項。 - `DEFAULT_ENABLE_DEPENDENCIES`: **true**: 啟用此項以預設啟用依賴項。
@@ -682,7 +674,6 @@ Gitea 建立以下非唯一隊列:
- `ED25519`:**256** - `ED25519`:**256**
- `ECDSA`:**256** - `ECDSA`:**256**
- `RSA`:**3071**: 我們在這裡設定為 2047,因為一個其他方面有效的 3072 RSA 密鑰可能被報告為 3071 長度。 - `RSA`:**3071**: 我們在這裡設定為 2047,因為一個其他方面有效的 3072 RSA 密鑰可能被報告為 3071 長度。
- `DSA`:**-1**: 預設情況下禁用 DSA。設定為**1024**以重新啟用,但請注意可能需要重新設定您的 SSHD 提供者
## Webhook (`webhook`) ## Webhook (`webhook`)
+4 -17
View File
@@ -145,20 +145,13 @@ Gitea 不提供內置的 Pages 伺服器。您需要一個專用的域名來提
有多種方法可以組合使用來防止垃圾郵件發送者: 有多種方法可以組合使用來防止垃圾郵件發送者:
1. 通過設定電子郵件域名的白名單或黑名單。 1. 通過設定電子郵件域名的白名單或黑名單。
2. 通過設定一些域名或者 OpenID 白名單(見下文)。 2. 在您的`app.ini`中將`ENABLE_CAPTCHA`設定為`true`,並正確設定`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
3. 在您的`app.ini`中將`ENABLE_CAPTCHA`設定為`true`,並正確設定`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。 3. 將`DISABLE_REGISTRATION`設定為`true`,並通過 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理介面建立新使用者。
4. 將`DISABLE_REGISTRATION`設定為`true`,並通過 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理介面建立新使用者。
### 僅允許/阻止特定的電子郵件域名 ### 僅允許/阻止特定的電子郵件域名
您可以在`app.ini`中的`[service]`下的設定`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。 您可以在`app.ini`中的`[service]`下的設定`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
### 僅允許/阻止特定的 OpenID 提供商
您可以在`app.ini`的`[openid]`下設定`WHITELISTED_URI`或`BLACKLISTED_URIS`。
**注意**: 白名單優先,如果白名單非空,則忽略黑名單。
### 僅允許發佈問題的使用者 ### 僅允許發佈問題的使用者
目前實現這一點的方法是建立/修改一個具有最大儲存庫建立限制為 0 的使用者。 目前實現這一點的方法是建立/修改一個具有最大儲存庫建立限制為 0 的使用者。
@@ -425,11 +418,5 @@ gitea doctor recreate-table
## 如何從磁盤採用儲存庫 ## 如何從磁盤採用儲存庫
- 將您的(裸)儲存庫添加到正確的位置,即您的設定所在的地方(`repository.ROOT`),確保它們位於正確的佈局`<REPO_ROOT>/[user]/[repo].git`。 若要從磁碟匯入儲存庫,請使用 [Gitea importer](https://gitea.com/gitea/importer),參數:`--source-type local`。
- **注意:**目錄名必須為小寫。 如果儲存庫已位於 Gitea 的儲存庫根目錄下,請先將其移到該目錄之外,再匯入,以免與目標路徑衝突。
- 您還可以在`<ROOT_URL>/admin/config`中檢查儲存庫根路徑。
- 確保存在要採用儲存庫的使用者/組織。
- 作為管理員,轉到`<ROOT_URL>/admin/repos/unadopted`並搜索。
- 使用者也可以透過設定[`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](../administration/config-cheat-sheet.md) 獲得類似的權限。
- 如果上述步驟都正確執行,您應該能夠選擇要採用的儲存庫。
- 如果沒有找到儲存庫,請啟用[調試日誌記錄](../administration/config-cheat-sheet.md)以檢查是否有特定錯誤。
+4 -4
View File
@@ -89,11 +89,11 @@ const variables: Record<string, VersionVariables> = {
goVersion: '1.27', goVersion: '1.27',
minGoVersion: '1.27', minGoVersion: '1.27',
minNodeVersion: '22', minNodeVersion: '22',
version: '28.3.0', version: '28.4.0',
sourceVersion: 'v28.3.0', sourceVersion: 'v28.4.0',
sourceBranch: 'release/v28', sourceBranch: 'release/v28',
dockerVersion: '28.3.0', dockerVersion: '28.4.0',
displayVersion: '28.3.0', displayVersion: '28.4.0',
}, },
'1.27': { '1.27': {
goVersion: '1.26', goVersion: '1.26',
+3 -3
View File
@@ -58,7 +58,7 @@ runner:
#client_cert_file: /etc/gitea-runner/client.crt #client_cert_file: /etc/gitea-runner/client.crt
#client_key_file: /etc/gitea-runner/client.key #client_key_file: /etc/gitea-runner/client.key
# PEM CA certificates of a Gitea instance with a private CA, trusted besides the system's. # PEM CA certificates of a Gitea instance with a private CA, trusted besides the system's.
# Runner-side git and builtin:checkout use it instead of the system's bundle for the instance. # Runner-side git uses it instead of the system's bundle for the instance.
# Jobs get it at /var/run/act/ca.crt, or in their act directory on the host, with NODE_EXTRA_CA_CERTS # Jobs get it at /var/run/act/ca.crt, or in their act directory on the host, with NODE_EXTRA_CA_CERTS
# pointing there unless the job, or on Docker its image, sets it. Other tools in jobs, such as the # pointing there unless the job, or on Docker its image, sets it. Other tools in jobs, such as the
# git that actions/checkout runs, need the CA in the image's bundle, for example via container.volumes. # git that actions/checkout runs, need the CA in the image's bundle, for example via container.volumes.
@@ -145,8 +145,8 @@ runner:
# What to mount at RUNNER_TOOL_CACHE (/opt/hostedtoolcache), where setup actions install tools: # What to mount at RUNNER_TOOL_CACHE (/opt/hostedtoolcache), where setup actions install tools:
# none: nothing. A docker job sees what its image ships there, a host job an empty dir, and # none: nothing. A docker job sees what its image ships there, a host job an empty dir, and
# either way what it installs is gone when the job ends. # either way what it installs is gone when the job ends.
# shared: one tool cache every job reuses. Two jobs writing the same tool version at once # shared: one tool cache per capacity slot, reused by later jobs. It hides the tools later job
# corrupt it, so use it only with capacity 1. # images ship, so use images without them.
#tool_cache_mode: none #tool_cache_mode: none
# Optional executable on the host, run once after each task's built-in cleanup # Optional executable on the host, run once after each task's built-in cleanup
# (post-steps, container teardown, bind-workdir removal). Additive only. # (post-steps, container teardown, bind-workdir removal). Additive only.
+4 -1
View File
@@ -4596,6 +4596,9 @@
"x-go-name": "Path" "x-go-name": "Path"
} }
}, },
"required": [
"path"
],
"type": "object", "type": "object",
"x-go-package": "gitea.dev/modules/structs" "x-go-package": "gitea.dev/modules/structs"
}, },
@@ -11119,7 +11122,7 @@
"url": "http://opensource.org/licenses/MIT" "url": "http://opensource.org/licenses/MIT"
}, },
"title": "Gitea API", "title": "Gitea API",
"version": "28.3.0" "version": "28.4.0"
}, },
"openapi": "3.0.3", "openapi": "3.0.3",
"paths": { "paths": {
+4 -1
View File
@@ -17,7 +17,7 @@
"name": "MIT", "name": "MIT",
"url": "http://opensource.org/licenses/MIT" "url": "http://opensource.org/licenses/MIT"
}, },
"version": "28.3.0" "version": "28.4.0"
}, },
"basePath": "https://gitea.com/api/v1", "basePath": "https://gitea.com/api/v1",
"paths": { "paths": {
@@ -27644,6 +27644,9 @@
"CreatePullReviewComment": { "CreatePullReviewComment": {
"description": "CreatePullReviewComment represent a review comment for creation api", "description": "CreatePullReviewComment represent a review comment for creation api",
"type": "object", "type": "object",
"required": [
"path"
],
"properties": { "properties": {
"body": { "body": {
"type": "string", "type": "string",
+1 -1
View File
@@ -127,7 +127,7 @@ if [ "$LATEST_ONLY" -eq 1 ]; then
exit 0 exit 0
fi fi
for ver in '28.3.0' '1.27.3' '1.26.4' '1.25.5' '1.24.7' '1.23.8' '1.22.6'; do for ver in '28.4.0' '1.27.3' '1.26.4' '1.25.5' '1.24.7' '1.23.8' '1.22.6'; do
# 1.x releases are suffixed with the minor (1.27.3 -> 27), the versions # 1.x releases are suffixed with the minor (1.27.3 -> 27), the versions
# without the 1. prefix with the major (28.0.0 -> 28) # without the 1. prefix with the major (28.0.0 -> 28)
case "$ver" in case "$ver" in