mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-16 06:43:45 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc38c5b639 | ||
|
|
b89f75dd9b | ||
|
|
b1b2fe725d |
No files matched your search
@@ -112,7 +112,7 @@ Events cover security-relevant changes, grouped by action family:
|
||||
|
||||
- **User**: create and delete, admin, restricted and active status, name,
|
||||
password and password reset requests, visibility, emails, authentication
|
||||
source, 2FA, WebAuthn, external logins, access tokens, OAuth2
|
||||
source, 2FA, WebAuthn, OpenID, external logins, access tokens, OAuth2
|
||||
applications and grants, SSH/GPG/principal keys, secrets, webhooks,
|
||||
impersonation, failed two-factor authentication
|
||||
- **Organization**: create and delete, name, visibility, members, teams,
|
||||
|
||||
@@ -18,13 +18,12 @@ Both the LDAP via BindDN and the simple auth LDAP share the following fields:
|
||||
|
||||
- Host **(required)**
|
||||
|
||||
- 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.
|
||||
- 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`
|
||||
- The address where the LDAP server can be reached.
|
||||
- Example: `mydomain.com`
|
||||
|
||||
- Port **(required)**
|
||||
|
||||
- The port to use when connecting to hosts given without a URL.
|
||||
- The port to use when connecting to the server.
|
||||
- Example: `389` for LDAP or `636` for LDAP SSL
|
||||
|
||||
- Enable TLS Encryption (optional)
|
||||
@@ -432,3 +431,8 @@ USERNAME = nickname
|
||||
; what to do when the username or email is already taken
|
||||
ACCOUNT_LINKING = login
|
||||
```
|
||||
|
||||
:::note
|
||||
This is unrelated to `ENABLE_OPENID_SIGNIN` and the `[openid]` section, which
|
||||
configure the older OpenID 2.0 sign-in.
|
||||
:::
|
||||
@@ -50,6 +50,13 @@ Listing all embedded files with `openid` in their path:
|
||||
```sh
|
||||
$ gitea embedded list '**openid**'
|
||||
public/assets/img/auth/openid_connect.svg
|
||||
public/assets/img/openid-16x16.png
|
||||
templates/user/auth/finalize_openid.tmpl
|
||||
templates/user/auth/signin_openid.tmpl
|
||||
templates/user/auth/signup_openid_connect.tmpl
|
||||
templates/user/auth/signup_openid_navbar.tmpl
|
||||
templates/user/auth/signup_openid_register.tmpl
|
||||
templates/user/settings/security_openid.tmpl
|
||||
```
|
||||
|
||||
## Extracting resources
|
||||
|
||||
@@ -205,8 +205,8 @@ Admin operations:
|
||||
- `--not-active`: Deactivate the authentication source.
|
||||
- `--security-protocol value`: Security protocol name. Required.
|
||||
- `--skip-tls-verify`: Disable TLS verification.
|
||||
- `--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 hosts given without a URL. Required.
|
||||
- `--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.
|
||||
@@ -231,8 +231,8 @@ Admin operations:
|
||||
- `--not-active`: Deactivate the authentication source.
|
||||
- `--security-protocol value`: Security protocol name.
|
||||
- `--skip-tls-verify`: Disable TLS verification.
|
||||
- `--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 hosts given without a URL.
|
||||
- `--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.
|
||||
@@ -257,8 +257,8 @@ Admin operations:
|
||||
- `--not-active`: Deactivate the authentication source.
|
||||
- `--security-protocol value`: Security protocol name. Required.
|
||||
- `--skip-tls-verify`: Disable TLS verification.
|
||||
- `--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 hosts given without a URL. Required.
|
||||
- `--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.
|
||||
@@ -279,8 +279,8 @@ Admin operations:
|
||||
- `--not-active`: Deactivate the authentication source.
|
||||
- `--security-protocol value`: Security protocol name.
|
||||
- `--skip-tls-verify`: Disable TLS verification.
|
||||
- `--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 hosts given without a URL.
|
||||
- `--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.
|
||||
|
||||
@@ -151,6 +151,8 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
|
||||
- `DISABLE_MIGRATIONS`: **false**: Disable migrating feature.
|
||||
- `DISABLE_STARS`: **false**: Disable stars feature.
|
||||
- `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
|
||||
- `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).
|
||||
@@ -567,7 +569,7 @@ And the following unique queues:
|
||||
- `manage_ssh_keys`: User cannot configure ssh keys.
|
||||
- `manage_gpg_keys`: User cannot configure gpg keys.
|
||||
- `manage_mfa`: a User cannot configure mfa devices.
|
||||
- `manage_credentials`: a user cannot configure emails or passwords
|
||||
- `manage_credentials`: a user cannot configure emails, passwords, or openid
|
||||
- `change_username`: a user cannot change their username
|
||||
- `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.
|
||||
@@ -575,7 +577,7 @@ And the following unique queues:
|
||||
- `manage_ssh_keys`: User cannot configure ssh keys.
|
||||
- `manage_gpg_keys`: User cannot configure gpg keys.
|
||||
- `manage_mfa`: a User cannot configure mfa devices.
|
||||
- `manage_credentials`: a user cannot configure emails or passwords
|
||||
- `manage_credentials`: a user cannot configure emails, passwords, or openid
|
||||
- `change_username`: a user cannot change their username
|
||||
- `change_full_name`: a user cannot change their full name
|
||||
|
||||
@@ -677,6 +679,15 @@ And the following unique queues:
|
||||
- `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.
|
||||
|
||||
## 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`)
|
||||
|
||||
- `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)
|
||||
@@ -754,7 +765,6 @@ 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_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.
|
||||
- `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_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default
|
||||
- `DEFAULT_ENABLE_DEPENDENCIES`: **true**: Enable this to have dependencies enabled by default.
|
||||
@@ -801,6 +811,7 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
|
||||
- `ED25519`: **256**
|
||||
- `ECDSA`: **256**
|
||||
- `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`)
|
||||
|
||||
@@ -1457,6 +1468,7 @@ These lists are enforced on direct connections only. When a proxy is configured
|
||||
- `CHUNKED_UPLOAD_PATH`: **tmp/package-upload**: Path for chunked uploads. Defaults to `APP_DATA_PATH` + `tmp/package-upload`
|
||||
- `LIMIT_TOTAL_OWNER_COUNT`: **-1**: Maximum count of package versions a single owner can have (`-1` means no limits)
|
||||
- `LIMIT_TOTAL_OWNER_SIZE`: **-1**: Maximum size of packages a single owner can use (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `MAX_DECOMPRESSION_RATIO`: **200**: Maximum inflation ratio while reading an upload's metadata from an archive
|
||||
- `LIMIT_SIZE_ALPINE`: **-1**: Maximum size of an Alpine upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `LIMIT_SIZE_CARGO`: **-1**: Maximum size of a Cargo upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `LIMIT_SIZE_CHEF`: **-1**: Maximum size of a Chef upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
|
||||
@@ -10,10 +10,9 @@ aliases:
|
||||
|
||||
## Builtin repository code search without indexer
|
||||
|
||||
Users can search the code of a single repository without setting up a repository indexer.
|
||||
This search uses `git grep`, which is fast for small repositories and requires Git built with PCRE support, as most distributions provide.
|
||||
Searching across repositories requires the repository indexer.
|
||||
See [Code Search](../usage/code-search.md) for the query syntax.
|
||||
Users could do repository-level code search 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.
|
||||
Better code search support could be achieved by setting up the repository indexer.
|
||||
|
||||
## Setting up the repository indexer
|
||||
|
||||
|
||||
+19
-4
@@ -134,13 +134,22 @@ 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.
|
||||
|
||||
1. By whitelisting or blocklisting certain email domains
|
||||
2. 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
|
||||
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.
|
||||
@@ -319,8 +328,14 @@ It is highly recommended to back-up your database before running these commands.
|
||||
|
||||
## How to adopt repositories from disk
|
||||
|
||||
To import repositories from disk, use the [Gitea importer](https://gitea.com/gitea/importer) with `--source-type local`.
|
||||
If the repositories are already under Gitea's repository root, move them outside it before importing to avoid conflicts with destination paths.
|
||||
- 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
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
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,13 +18,12 @@ aliases:
|
||||
|
||||
- 主机名 **(必选)**
|
||||
|
||||
- 以逗号分隔的 LDAP 服务地址。每一项可以是使用端口号和安全协议设置的主机名,也可以是带可选端口的 `ldap://`、`ldaps://` 或 `ldap+starttls://` URL。`ldap://` 仅可用于未加密的安全协议,其他 URL 仅可用于加密的安全协议。
|
||||
- 前一个服务连接失败或超过 250 毫秒仍未连上时,会尝试下一个服务。绑定或搜索失败不会切换到下一个服务。
|
||||
- 例如:`ldap1.mydomain.com, ldaps://ldap2.mydomain.com:636`
|
||||
- LDAP 服务的主机地址.
|
||||
- 例如:`mydomain.com`
|
||||
|
||||
- 端口号 **(必选)**
|
||||
|
||||
- 未以 URL 形式给出的主机所使用的端口号.
|
||||
- LDAP 服务的端口号.
|
||||
- 例如: LDAP `389`/ LDAPs `636`
|
||||
|
||||
- 安全协议 (可选)
|
||||
|
||||
@@ -42,6 +42,13 @@ gitea embedded list [--include-vendored] [patterns...]
|
||||
```sh
|
||||
$ gitea embedded list '**openid**'
|
||||
public/assets/img/auth/openid_connect.svg
|
||||
public/assets/img/openid-16x16.png
|
||||
templates/user/auth/finalize_openid.tmpl
|
||||
templates/user/auth/signin_openid.tmpl
|
||||
templates/user/auth/signup_openid_connect.tmpl
|
||||
templates/user/auth/signup_openid_navbar.tmpl
|
||||
templates/user/auth/signup_openid_register.tmpl
|
||||
templates/user/settings/security_openid.tmpl
|
||||
```
|
||||
|
||||
## 提取资源
|
||||
|
||||
@@ -189,8 +189,8 @@ aliases:
|
||||
- `--not-active`:停用认证源。
|
||||
- `--security-protocol value`:安全协议名称。必填。
|
||||
- `--skip-tls-verify`:禁用 TLS 验证。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。必填。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。必填。
|
||||
- `--host value`:LDAP 服务器的地址。必填。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。必填。
|
||||
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。必填。
|
||||
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。
|
||||
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
|
||||
@@ -215,8 +215,8 @@ aliases:
|
||||
- `--not-active`:停用认证源。
|
||||
- `--security-protocol value`:安全协议名称。
|
||||
- `--skip-tls-verify`:禁用 TLS 验证。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。
|
||||
- `--host value`:LDAP 服务器的地址。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。
|
||||
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。
|
||||
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。
|
||||
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
|
||||
@@ -241,8 +241,8 @@ aliases:
|
||||
- `--not-active`:停用认证源。
|
||||
- `--security-protocol value`:安全协议名称。必填。
|
||||
- `--skip-tls-verify`:禁用 TLS 验证。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。必填。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。必填。
|
||||
- `--host value`:LDAP 服务器的地址。必填。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。必填。
|
||||
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。
|
||||
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。必填。
|
||||
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
|
||||
@@ -263,8 +263,8 @@ aliases:
|
||||
- `--not-active`:停用认证源。
|
||||
- `--security-protocol value`:安全协议名称。
|
||||
- `--skip-tls-verify`:禁用 TLS 验证。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。
|
||||
- `--host value`:LDAP 服务器的地址。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。
|
||||
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。
|
||||
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。
|
||||
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
|
||||
|
||||
@@ -114,6 +114,8 @@ aliases:
|
||||
- `DISABLE_MIGRATIONS`: **false**: 禁用迁移功能。
|
||||
- `DISABLE_STARS`: **false**: 禁用点赞功能。
|
||||
- `DEFAULT_BRANCH`: **main**: 所有仓库的默认分支名称。
|
||||
- `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: 允许非管理员用户认领未被认领的仓库。
|
||||
- `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: 允许非管理员用户删除未被认领的仓库。
|
||||
- `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: 不允许从用户界面下载源代码存档文件。
|
||||
- `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: 允许无限制得派生仓库。
|
||||
- `ALLOW_FORK_INTO_SAME_OWNER`: **false**: 允许将仓库派生到同一所有者(用户或组织)中。此功能为实验性功能,尚未完全测试,将来可能会更改。
|
||||
@@ -507,7 +509,7 @@ Gitea 创建以下非唯一队列:
|
||||
- `manage_ssh_keys`:用户不能配置 SSH 密钥。
|
||||
- `manage_gpg_keys`:用户不能配置 GPG 密钥。
|
||||
- `manage_mfa`:用户不能配置 MFA 设备。
|
||||
- `manage_credentials`:用户不能配置邮箱或密码。
|
||||
- `manage_credentials`:用户不能配置邮箱、密码或 OpenID。
|
||||
- `change_username`:用户不能更改其用户名。
|
||||
- `change_full_name`:用户不能更改其全名。
|
||||
|
||||
@@ -573,6 +575,13 @@ Gitea 创建以下非唯一队列:
|
||||
- `HMAC_KEY`: **_empty_**: 为 URL 编码提供 HMAC 密钥,如果启用 camo,则**必填**。
|
||||
- `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`)
|
||||
|
||||
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 设置此项以启用或禁用 OAuth2 自动注册的电子邮件确认。(覆盖`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`设置)
|
||||
@@ -621,7 +630,6 @@ Gitea 创建以下非唯一队列:
|
||||
- `CF_TURNSTILE_SECRET` **""**: 访问 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**: 默认情况下,将用户设置为保持其电子邮件地址私有。
|
||||
- `FORCE_USER_ACTIVITY_VISIBILITY`: **_empty_**: 强制所有用户的活动为 "public" 或 "private",并覆盖其“隐藏活动”设置。
|
||||
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: 默认情况下,允许新用户创建组织。
|
||||
- `DEFAULT_USER_IS_RESTRICTED`: **false**: 默认情况下,为新用户分配受限权限。
|
||||
- `DEFAULT_ENABLE_DEPENDENCIES`: **true**: 启用此项以默认启用依赖项。
|
||||
@@ -669,6 +677,7 @@ Gitea 创建以下非唯一队列:
|
||||
- `ED25519`:**256**
|
||||
- `ECDSA`:**256**
|
||||
- `RSA`:**3071**: 我们在这里设置为 2047,因为一个其他方面有效的 3072 RSA 密钥可能被报告为 3071 长度。
|
||||
- `DSA`:**-1**: 默认情况下禁用 DSA。设置为**1024**以重新启用,但请注意可能需要重新配置您的 SSHD 提供者
|
||||
|
||||
## Webhook (`webhook`)
|
||||
|
||||
@@ -1291,6 +1300,7 @@ ALLOW_DATA_URI_IMAGES = true
|
||||
- `CHUNKED_UPLOAD_PATH`:**tmp/package-upload**: 分块上传的路径。默认为 `APP_DATA_PATH` + `tmp/package-upload`。
|
||||
- `LIMIT_TOTAL_OWNER_COUNT`:**-1**: 单个所有者可以拥有的包版本的最大数量(`-1` 表示无限制)。
|
||||
- `LIMIT_TOTAL_OWNER_SIZE`:**-1**: 单个所有者可以使用的包的最大大小(`-1` 表示无限制,格式为 `1000`、`1 MB`、`1 GiB`)。
|
||||
- `MAX_DECOMPRESSION_RATIO`: **200**: Maximum inflation ratio while reading an upload's metadata from an archive
|
||||
- `LIMIT_SIZE_ALPINE`:**-1**: Alpine 上传的最大大小(`-1` 表示无限制,格式为 `1000`、`1 MB`、`1 GiB`)。
|
||||
- `LIMIT_SIZE_CARGO`:**-1**: Cargo 上传的最大大小(`-1` 表示无限制,格式为 `1000`、`1 MB`、`1 GiB`)。
|
||||
- `LIMIT_SIZE_CHEF`:**-1**: Chef 上传的最大大小(`-1` 表示无限制,格式为 `1000`、`1 MB`、`1 GiB`)。
|
||||
|
||||
@@ -143,13 +143,20 @@ Gitea 不提供内置的 Pages 服务器。您需要一个专用的域名来提
|
||||
有多种方法可以组合使用来防止垃圾邮件发送者:
|
||||
|
||||
1. 通过设置电子邮件域名的白名单或黑名单。
|
||||
2. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
||||
3. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。
|
||||
2. 通过设置一些域名或者 OpenID 白名单(见下文)。
|
||||
3. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
||||
4. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。
|
||||
|
||||
### 仅允许/阻止特定的电子邮件域名
|
||||
|
||||
您可以在`app.ini`中的`[service]`下的配置`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
||||
|
||||
### 仅允许/阻止特定的 OpenID 提供商
|
||||
|
||||
您可以在`app.ini`的`[openid]`下配置`WHITELISTED_URI`或`BLACKLISTED_URIS`。
|
||||
|
||||
**注意**: 白名单优先,如果白名单非空,则忽略黑名单。
|
||||
|
||||
### 仅允许发布问题的用户
|
||||
|
||||
目前实现这一点的方法是创建/修改一个具有最大仓库创建限制为 0 的用户。
|
||||
@@ -416,5 +423,11 @@ gitea doctor recreate-table
|
||||
|
||||
## 如何从磁盘采用存储库
|
||||
|
||||
要从磁盘导入仓库,请使用 [Gitea importer](https://gitea.com/gitea/importer),参数:`--source-type local`。
|
||||
如果仓库已位于 Gitea 的仓库根目录下,请先将其移到该目录之外,再导入,以免与目标路径冲突。
|
||||
- 将您的(裸)存储库添加到正确的位置,即您的配置所在的地方(`repository.ROOT`),确保它们位于正确的布局`<REPO_ROOT>/[user]/[repo].git`。
|
||||
- **注意:**目录名必须为小写。
|
||||
- 您还可以在`<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,13 +18,12 @@ aliases:
|
||||
|
||||
- 主機名 **(必選)**
|
||||
|
||||
- 以逗號分隔的 LDAP 服務地址。每一項可以是使用端口號和安全協議設定的主機名,也可以是帶可選端口的 `ldap://`、`ldaps://` 或 `ldap+starttls://` URL。`ldap://` 僅可用於未加密的安全協議,其他 URL 僅可用於加密的安全協議。
|
||||
- 前一個服務連線失敗或超過 250 毫秒仍未連上時,會嘗試下一個服務。綁定或搜尋失敗不會切換到下一個服務。
|
||||
- 例如:`ldap1.mydomain.com, ldaps://ldap2.mydomain.com:636`
|
||||
- LDAP 服務的主機地址.
|
||||
- 例如:`mydomain.com`
|
||||
|
||||
- 端口號 **(必選)**
|
||||
|
||||
- 未以 URL 形式給出的主機所使用的端口號.
|
||||
- LDAP 服務的端口號.
|
||||
- 例如: LDAP `389`/ LDAPs `636`
|
||||
|
||||
- 安全協議 (可選)
|
||||
|
||||
@@ -42,6 +42,13 @@ gitea embedded list [--include-vendored] [patterns...]
|
||||
```sh
|
||||
$ gitea embedded list '**openid**'
|
||||
public/assets/img/auth/openid_connect.svg
|
||||
public/assets/img/openid-16x16.png
|
||||
templates/user/auth/finalize_openid.tmpl
|
||||
templates/user/auth/signin_openid.tmpl
|
||||
templates/user/auth/signup_openid_connect.tmpl
|
||||
templates/user/auth/signup_openid_navbar.tmpl
|
||||
templates/user/auth/signup_openid_register.tmpl
|
||||
templates/user/settings/security_openid.tmpl
|
||||
```
|
||||
|
||||
## 提取資源
|
||||
|
||||
@@ -189,8 +189,8 @@ aliases:
|
||||
- `--not-active`:停用認證源。
|
||||
- `--security-protocol value`:安全協議名稱。必填。
|
||||
- `--skip-tls-verify`:禁用 TLS 驗證。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。必填。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。必填。
|
||||
- `--host value`:LDAP 伺服器的地址。必填。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。必填。
|
||||
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。必填。
|
||||
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。必填。
|
||||
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
|
||||
@@ -215,8 +215,8 @@ aliases:
|
||||
- `--not-active`:停用認證源。
|
||||
- `--security-protocol value`:安全協議名稱。
|
||||
- `--skip-tls-verify`:禁用 TLS 驗證。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。
|
||||
- `--host value`:LDAP 伺服器的地址。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。
|
||||
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。
|
||||
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。
|
||||
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
|
||||
@@ -241,8 +241,8 @@ aliases:
|
||||
- `--not-active`:停用認證源。
|
||||
- `--security-protocol value`:安全協議名稱。必填。
|
||||
- `--skip-tls-verify`:禁用 TLS 驗證。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。必填。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。必填。
|
||||
- `--host value`:LDAP 伺服器的地址。必填。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。必填。
|
||||
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。
|
||||
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。必填。
|
||||
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
|
||||
@@ -263,8 +263,8 @@ aliases:
|
||||
- `--not-active`:停用認證源。
|
||||
- `--security-protocol value`:安全協議名稱。
|
||||
- `--skip-tls-verify`:禁用 TLS 驗證。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。
|
||||
- `--host value`:LDAP 伺服器的地址。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。
|
||||
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。
|
||||
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。
|
||||
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
|
||||
|
||||
@@ -115,6 +115,8 @@ aliases:
|
||||
- `DISABLE_MIGRATIONS`: **false**: 禁用遷移功能。
|
||||
- `DISABLE_STARS`: **false**: 禁用點贊功能。
|
||||
- `DEFAULT_BRANCH`: **main**: 所有儲存庫的預設分支名稱。
|
||||
- `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: 允許非管理員使用者認領未被認領的儲存庫。
|
||||
- `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: 允許非管理員使用者刪除未被認領的儲存庫。
|
||||
- `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: 不允許從使用者介面下載源程式碼存檔文件。
|
||||
- `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT`: **true**: 允許無限制得派生儲存庫。
|
||||
- `ALLOW_FORK_INTO_SAME_OWNER`: **false**: 允許將儲存庫派生到同一所有者(使用者或組織)中。此功能為實驗性功能,尚未完全測試,將來可能會更改。
|
||||
@@ -510,7 +512,7 @@ Gitea 建立以下非唯一隊列:
|
||||
- `manage_ssh_keys`:使用者不能設定 SSH 密鑰。
|
||||
- `manage_gpg_keys`:使用者不能設定 GPG 密鑰。
|
||||
- `manage_mfa`:使用者不能設定 MFA 設備。
|
||||
- `manage_credentials`:使用者不能設定郵箱或密碼。
|
||||
- `manage_credentials`:使用者不能設定郵箱、密碼或 OpenID。
|
||||
- `change_username`:使用者不能更改其使用者名稱。
|
||||
- `change_full_name`:使用者不能更改其全名。
|
||||
|
||||
@@ -578,6 +580,13 @@ Gitea 建立以下非唯一隊列:
|
||||
- `HMAC_KEY`: **_empty_**: 為 URL 編碼提供 HMAC 密鑰,如果啟用 camo,則**必填**。
|
||||
- `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`)
|
||||
|
||||
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: 設定此項以啟用或禁用 OAuth2 自動註冊的電子郵件確認。(覆蓋`[service]`部分的`REGISTER\_EMAIL\_CONFIRM`設定)
|
||||
@@ -626,7 +635,6 @@ Gitea 建立以下非唯一隊列:
|
||||
- `CF_TURNSTILE_SECRET` **""**: 訪問 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**: 預設情況下,將使用者設定為保持其電子電子郵件地址私有。
|
||||
- `FORCE_USER_ACTIVITY_VISIBILITY`: **_empty_**: 強制所有使用者的活動為 "public" 或 "private",並覆寫其「隱藏活動」設定。
|
||||
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: 預設情況下,允許新使用者建立組織。
|
||||
- `DEFAULT_USER_IS_RESTRICTED`: **false**: 預設情況下,為新使用者分配受限權限。
|
||||
- `DEFAULT_ENABLE_DEPENDENCIES`: **true**: 啟用此項以預設啟用依賴項。
|
||||
@@ -674,6 +682,7 @@ Gitea 建立以下非唯一隊列:
|
||||
- `ED25519`:**256**
|
||||
- `ECDSA`:**256**
|
||||
- `RSA`:**3071**: 我們在這裡設定為 2047,因為一個其他方面有效的 3072 RSA 密鑰可能被報告為 3071 長度。
|
||||
- `DSA`:**-1**: 預設情況下禁用 DSA。設定為**1024**以重新啟用,但請注意可能需要重新設定您的 SSHD 提供者
|
||||
|
||||
## Webhook (`webhook`)
|
||||
|
||||
@@ -1297,6 +1306,7 @@ ALLOW_DATA_URI_IMAGES = true
|
||||
- `CHUNKED_UPLOAD_PATH`:**tmp/package-upload**: 分塊上傳的路徑。預設為 `APP_DATA_PATH` + `tmp/package-upload`。
|
||||
- `LIMIT_TOTAL_OWNER_COUNT`:**-1**: 單個所有者可以擁有的包版本的最大數量(`-1` 表示無限制)。
|
||||
- `LIMIT_TOTAL_OWNER_SIZE`:**-1**: 單個所有者可以使用的包的最大大小(`-1` 表示無限制,格式為 `1000`、`1 MB`、`1 GiB`)。
|
||||
- `MAX_DECOMPRESSION_RATIO`: **200**: Maximum inflation ratio while reading an upload's metadata from an archive
|
||||
- `LIMIT_SIZE_ALPINE`:**-1**: Alpine 上傳的最大大小(`-1` 表示無限制,格式為 `1000`、`1 MB`、`1 GiB`)。
|
||||
- `LIMIT_SIZE_CARGO`:**-1**: Cargo 上傳的最大大小(`-1` 表示無限制,格式為 `1000`、`1 MB`、`1 GiB`)。
|
||||
- `LIMIT_SIZE_CHEF`:**-1**: Chef 上傳的最大大小(`-1` 表示無限制,格式為 `1000`、`1 MB`、`1 GiB`)。
|
||||
|
||||
@@ -145,13 +145,20 @@ Gitea 不提供內置的 Pages 伺服器。您需要一個專用的域名來提
|
||||
有多種方法可以組合使用來防止垃圾郵件發送者:
|
||||
|
||||
1. 通過設定電子郵件域名的白名單或黑名單。
|
||||
2. 在您的`app.ini`中將`ENABLE_CAPTCHA`設定為`true`,並正確設定`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
||||
3. 將`DISABLE_REGISTRATION`設定為`true`,並通過 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理介面建立新使用者。
|
||||
2. 通過設定一些域名或者 OpenID 白名單(見下文)。
|
||||
3. 在您的`app.ini`中將`ENABLE_CAPTCHA`設定為`true`,並正確設定`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。
|
||||
4. 將`DISABLE_REGISTRATION`設定為`true`,並通過 [CLI](../administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理介面建立新使用者。
|
||||
|
||||
### 僅允許/阻止特定的電子郵件域名
|
||||
|
||||
您可以在`app.ini`中的`[service]`下的設定`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
||||
|
||||
### 僅允許/阻止特定的 OpenID 提供商
|
||||
|
||||
您可以在`app.ini`的`[openid]`下設定`WHITELISTED_URI`或`BLACKLISTED_URIS`。
|
||||
|
||||
**注意**: 白名單優先,如果白名單非空,則忽略黑名單。
|
||||
|
||||
### 僅允許發佈問題的使用者
|
||||
|
||||
目前實現這一點的方法是建立/修改一個具有最大儲存庫建立限制為 0 的使用者。
|
||||
@@ -418,5 +425,11 @@ gitea doctor recreate-table
|
||||
|
||||
## 如何從磁盤採用儲存庫
|
||||
|
||||
若要從磁碟匯入儲存庫,請使用 [Gitea importer](https://gitea.com/gitea/importer),參數:`--source-type local`。
|
||||
如果儲存庫已位於 Gitea 的儲存庫根目錄下,請先將其移到該目錄之外,再匯入,以免與目標路徑衝突。
|
||||
- 將您的(裸)儲存庫添加到正確的位置,即您的設定所在的地方(`repository.ROOT`),確保它們位於正確的佈局`<REPO_ROOT>/[user]/[repo].git`。
|
||||
- **注意:**目錄名必須為小寫。
|
||||
- 您還可以在`<ROOT_URL>/admin/config`中檢查儲存庫根路徑。
|
||||
- 確保存在要採用儲存庫的使用者/組織。
|
||||
- 作為管理員,轉到`<ROOT_URL>/admin/repos/unadopted`並搜索。
|
||||
- 使用者也可以透過設定[`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](../administration/config-cheat-sheet.md) 獲得類似的權限。
|
||||
- 如果上述步驟都正確執行,您應該能夠選擇要採用的儲存庫。
|
||||
- 如果沒有找到儲存庫,請啟用[調試日誌記錄](../administration/config-cheat-sheet.md)以檢查是否有特定錯誤。
|
||||
@@ -89,11 +89,11 @@ const variables: Record<string, VersionVariables> = {
|
||||
goVersion: '1.27',
|
||||
minGoVersion: '1.27',
|
||||
minNodeVersion: '22',
|
||||
version: '28.4.0',
|
||||
sourceVersion: 'v28.4.0',
|
||||
version: '28.3.0',
|
||||
sourceVersion: 'v28.3.0',
|
||||
sourceBranch: 'release/v28',
|
||||
dockerVersion: '28.4.0',
|
||||
displayVersion: '28.4.0',
|
||||
dockerVersion: '28.3.0',
|
||||
displayVersion: '28.3.0',
|
||||
},
|
||||
'1.27': {
|
||||
goVersion: '1.26',
|
||||
|
||||
@@ -58,7 +58,7 @@ runner:
|
||||
#client_cert_file: /etc/gitea-runner/client.crt
|
||||
#client_key_file: /etc/gitea-runner/client.key
|
||||
# PEM CA certificates of a Gitea instance with a private CA, trusted besides the system's.
|
||||
# Runner-side git uses it instead of the system's bundle for the instance.
|
||||
# Runner-side git and builtin:checkout use 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
|
||||
# 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.
|
||||
@@ -145,8 +145,8 @@ runner:
|
||||
# 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
|
||||
# either way what it installs is gone when the job ends.
|
||||
# shared: one tool cache per capacity slot, reused by later jobs. It hides the tools later job
|
||||
# images ship, so use images without them.
|
||||
# shared: one tool cache every job reuses. Two jobs writing the same tool version at once
|
||||
# corrupt it, so use it only with capacity 1.
|
||||
#tool_cache_mode: none
|
||||
# Optional executable on the host, run once after each task's built-in cleanup
|
||||
# (post-steps, container teardown, bind-workdir removal). Additive only.
|
||||
|
||||
@@ -4596,9 +4596,6 @@
|
||||
"x-go-name": "Path"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"type": "object",
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
@@ -11122,7 +11119,7 @@
|
||||
"url": "http://opensource.org/licenses/MIT"
|
||||
},
|
||||
"title": "Gitea API",
|
||||
"version": "28.4.0"
|
||||
"version": "28.3.0"
|
||||
},
|
||||
"openapi": "3.0.3",
|
||||
"paths": {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"name": "MIT",
|
||||
"url": "http://opensource.org/licenses/MIT"
|
||||
},
|
||||
"version": "28.4.0"
|
||||
"version": "28.3.0"
|
||||
},
|
||||
"basePath": "https://gitea.com/api/v1",
|
||||
"paths": {
|
||||
@@ -27644,9 +27644,6 @@
|
||||
"CreatePullReviewComment": {
|
||||
"description": "CreatePullReviewComment represent a review comment for creation api",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"body": {
|
||||
"type": "string",
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ if [ "$LATEST_ONLY" -eq 1 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
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
|
||||
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
|
||||
# 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)
|
||||
case "$ver" in
|
||||
|
||||
Reference in new issue
Block a user