mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-16 06:43:45 +00:00
Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cb2040a84 | ||
|
|
c0e2b5ae00 | ||
|
|
c9c3e39b0f | ||
|
|
01c8000cfd | ||
|
|
cfd22c91bd | ||
|
|
bf8f4ce394 | ||
|
|
757fb1927a | ||
|
|
d5a68736bd | ||
|
|
cb63f3ef8a | ||
|
|
fa8c890d01 | ||
|
|
e707e2838a | ||
|
|
4d38601dc2 | ||
|
|
6779b1d6d8 | ||
|
|
878c885050 | ||
|
|
6135d1dabf | ||
|
|
0ddb9a2071 | ||
|
|
71869c6e24 | ||
|
|
46b5401a81 |
No files matched your search
@@ -18,7 +18,7 @@ jobs:
|
||||
PUBLIC_DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
with:
|
||||
node-version: 26
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
with:
|
||||
node-version: 26
|
||||
|
||||
@@ -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, OpenID, external logins, access tokens, OAuth2
|
||||
source, 2FA, WebAuthn, 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,12 +18,13 @@ Both the LDAP via BindDN and the simple auth LDAP share the following fields:
|
||||
|
||||
- Host **(required)**
|
||||
|
||||
- The address where the LDAP server can be reached.
|
||||
- Example: `mydomain.com`
|
||||
- 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`
|
||||
|
||||
- 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
|
||||
|
||||
- Enable TLS Encryption (optional)
|
||||
@@ -431,8 +432,3 @@ 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,13 +50,6 @@ 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`: The address where the LDAP server can be reached. Required.
|
||||
- `--port value`: The port to use when connecting to the LDAP server. 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 hosts given without a URL. 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`: The address where the LDAP server can be reached.
|
||||
- `--port value`: The port to use when connecting to the LDAP server.
|
||||
- `--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.
|
||||
- `--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`: The address where the LDAP server can be reached. Required.
|
||||
- `--port value`: The port to use when connecting to the LDAP server. 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 hosts given without a URL. 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`: The address where the LDAP server can be reached.
|
||||
- `--port value`: The port to use when connecting to the LDAP server.
|
||||
- `--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.
|
||||
- `--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,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_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).
|
||||
@@ -179,7 +177,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
|
||||
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request.
|
||||
- `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author.
|
||||
- `RETARGET_CHILDREN_ON_MERGE`: **true**: Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo.
|
||||
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: Set the default value for "Delete pull request branch after merge by default" for new repositories.
|
||||
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **true**: Set the default value for "Delete pull request branch after merge by default" for new repositories.
|
||||
- `DEFAULT_TITLE_SOURCE`: **auto**: Default source for the pull request title when opening a new PR. Valid options:
|
||||
- `first-commit`: Uses the oldest commit's summary as the title. If there are multiple commits, still uses the first commit's message.
|
||||
- `auto`: Uses the commit's summary when the PR contains a single commit; when there are multiple commits, converts the branch name into a human-readable title by normalizing separators and casing.
|
||||
@@ -569,7 +567,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, passwords, or openid
|
||||
- `manage_credentials`: a user cannot configure emails or passwords
|
||||
- `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.
|
||||
@@ -577,7 +575,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, passwords, or openid
|
||||
- `manage_credentials`: a user cannot configure emails or passwords
|
||||
- `change_username`: a user cannot change their username
|
||||
- `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.
|
||||
- `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)
|
||||
@@ -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_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.
|
||||
@@ -811,7 +801,6 @@ 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`)
|
||||
|
||||
@@ -1488,8 +1477,9 @@ These lists are enforced on direct connections only. When a proxy is configured
|
||||
- `LIMIT_SIZE_RPM`: **-1**: Maximum size of a RPM upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `LIMIT_SIZE_RUBYGEMS`: **-1**: Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `LIMIT_SIZE_SWIFT`: **-1**: Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `LIMIT_SIZE_TERRAFORM_MODULE`: **-1**: Maximum size of a Terraform module archive upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`). Archives are additionally capped at 32 MiB decompressed.
|
||||
- `LIMIT_SIZE_TERRAFORM_STATE`: **-1**: Maximum size of a Terraform state upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `LIMIT_SIZE_VAGRANT`: **-1**: Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
- `LIMIT_SIZE_TERRAFORM_STATE``: **-1**: Maximum size of a Terraform state upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
|
||||
|
||||
## Mirror (`mirror`)
|
||||
|
||||
|
||||
@@ -10,9 +10,10 @@ aliases:
|
||||
|
||||
## Builtin repository code search without indexer
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## Setting up the repository indexer
|
||||
|
||||
|
||||
+4
-19
@@ -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.
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
### 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.
|
||||
@@ -328,14 +319,8 @@ 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.
|
||||
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.
|
||||
|
||||
## Gitea can't start on NFS
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ aliases:
|
||||
|
||||
# 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.
|
||||
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. PostgreSQL, MySQL and MSSQL are covered here. 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.
|
||||
@@ -177,6 +177,28 @@ All steps below requires that the database engine of your choice is installed on
|
||||
|
||||
You should be prompted to enter password for the database user, and connected to the database.
|
||||
|
||||
## MSSQL
|
||||
|
||||
1. As an administrator, create the login, a database with case-sensitive collation, and its user. Replace the password `'gitea'` with a secure one:
|
||||
|
||||
```sql
|
||||
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
|
||||
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
|
||||
GO
|
||||
USE giteadb;
|
||||
CREATE USER gitea FOR LOGIN gitea;
|
||||
ALTER ROLE db_owner ADD MEMBER gitea;
|
||||
GO
|
||||
```
|
||||
|
||||
Upgrades change the database schema, so the user needs `db_owner`, or `db_ddladmin`, `db_datareader` and `db_datawriter`. With the latter, also run `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;` as administrator.
|
||||
|
||||
2. On your Gitea server, test the connection to the database:
|
||||
|
||||
```sh
|
||||
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -16,17 +16,7 @@ Gitea Actions is designed to be compatible with GitHub Actions, with the differe
|
||||
|
||||
### Action prefixes
|
||||
|
||||
`uses:` accepts these prefixes:
|
||||
|
||||
- `self:` references your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:` runs an action built into Gitea Runner, which needs no download and no Node in the job image, e.g. `uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout` accepts the `repository`, `ref`, `token`, `path` and `fetch-depth` inputs of `actions/checkout` with the same defaults, and fails on any other input.
|
||||
|
||||
### Workflow-relative actions
|
||||
|
||||
`$/` references the repository and commit of the workflow, or of the enclosing composite action, e.g. `uses: $/.gitea/actions/build`.
|
||||
Unlike `./`, it needs no checkout first.
|
||||
`uses:` accepts the `self:` prefix to reference your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1`.
|
||||
|
||||
### Actions written in Go
|
||||
|
||||
@@ -92,7 +82,7 @@ See [Actions job token permissions](token-permissions.md).
|
||||
|
||||
Actions without a host, like `uses: actions/checkout@v4`, are downloaded from `https://github.com`, or from your own instance when `[actions].DEFAULT_ACTIONS_URL` is `self`.
|
||||
See the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions).
|
||||
For other sources, see [Absolute action URLs](#absolute-action-urls), [Action prefixes](#action-prefixes) and [Workflow-relative actions](#workflow-relative-actions).
|
||||
For other sources, see [Absolute action URLs](#absolute-action-urls) and [Action prefixes](#action-prefixes).
|
||||
|
||||
### Context availability
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -36,6 +36,7 @@ The following package managers are currently supported:
|
||||
| [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` |
|
||||
| [Swift](usage/packages/swift.md) | Swift | `swift` |
|
||||
| [Terraform](usage/packages/terraform.md) | - | `terraform` |
|
||||
| [Terraform Module](usage/packages/terraform-module.md) | - | `terraform`, `terragrunt` |
|
||||
| [Vagrant](usage/packages/vagrant.md) | - | `vagrant` |
|
||||
|
||||
**The following paragraphs only apply if Packages are not globally disabled!**
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
---
|
||||
date: "2026-06-09T00:00:00+00:00"
|
||||
slug: "terraform-module"
|
||||
sidebar_position: 119
|
||||
---
|
||||
|
||||
# Terraform Module Registry
|
||||
|
||||
Publish [Terraform](https://www.terraform.io/) modules for your user or organization and use them
|
||||
from Terraform or Terragrunt. The registry implements the
|
||||
[HashiCorp module registry protocol](https://developer.hashicorp.com/terraform/internals/module-registry-protocol),
|
||||
so modules are referenced with the usual `HOST/NAMESPACE/NAME/PROVIDER` address.
|
||||
|
||||
## Requirements
|
||||
|
||||
- The [Terraform CLI](https://developer.hashicorp.com/terraform/install) or
|
||||
[Terragrunt](https://terragrunt.gruntwork.io/).
|
||||
- **Your Gitea instance must be served over HTTPS with a valid certificate.**
|
||||
Terraform and Terragrunt only perform module registry discovery over HTTPS and reject
|
||||
plain HTTP — including `http://localhost`. This is a requirement of the protocol, not of Gitea.
|
||||
|
||||
A module is addressed by three segments:
|
||||
|
||||
| Segment | Meaning |
|
||||
| ----------- | ------------------------------------------------------------- |
|
||||
| `namespace` | The owner of the module: a Gitea user or organization name. It must follow the same rules as `name`, so owners with a `.` in their name cannot publish modules. |
|
||||
| `name` | The module name. Letters, digits, `-` and `_`, starting and ending with a letter or digit, up to 64 characters. |
|
||||
| `provider` | The main provider the module targets, e.g. `aws`. Lowercase letters and digits, up to 64 characters. |
|
||||
|
||||
Versions follow [semantic versioning](https://semver.org/) and are stored in canonical form: a
|
||||
leading `v` is dropped and missing segments are padded, so `v1.2.3` and `1.2.3` address the same
|
||||
version, and `1.2` becomes `1.2.0`.
|
||||
|
||||
## Packaging a module
|
||||
|
||||
A module is published as a single `.tar.gz` archive, stored and served exactly as uploaded. The
|
||||
module's `.tf` files must therefore be at the **archive root**. A source tarball downloaded from a Git
|
||||
host wraps everything in a `repository-version/` directory and is rejected — repackage the module
|
||||
directory's contents instead:
|
||||
|
||||
```shell
|
||||
tar -czf vpc-1.0.0.tar.gz -C path/to/module .
|
||||
```
|
||||
|
||||
The root module's inputs, outputs, providers and `README` are shown on the package page. Each
|
||||
submodule found under `modules/<name>` is listed with its source address and links to its own page,
|
||||
which shows the install snippet for that submodule along with its inputs, outputs, providers and
|
||||
`README`. Only one level is indexed, so `modules/<name>/<nested>` is not listed. Anything else,
|
||||
including `examples/`, is kept in the archive but is not indexed. A module that is only a collection of
|
||||
submodules, with no root module, is also accepted. Files in JSON syntax (`.tf.json`) are accepted too,
|
||||
but only `.tf` files are indexed.
|
||||
|
||||
## Authentication
|
||||
|
||||
Create a [personal access token](development/api-usage.md#authentication) with the `read:package` scope to download
|
||||
private modules, and `write:package` to publish or delete them. Add it to your Terraform CLI
|
||||
configuration file (`~/.terraformrc` or `%APPDATA%/terraform.rc`):
|
||||
|
||||
```hcl
|
||||
credentials "gitea.example.com" {
|
||||
token = "<your token>"
|
||||
}
|
||||
```
|
||||
|
||||
Modules owned by a public user or organization can be downloaded without a token.
|
||||
|
||||
## Publishing a module
|
||||
|
||||
Upload an archive with a `PUT` request, sending the file as the raw request body. Use
|
||||
`curl --upload-file` rather than `--data-binary`: the latter sends a form content type that
|
||||
the registry will not accept as an archive.
|
||||
|
||||
```shell
|
||||
curl --user "your_username:your_token" \
|
||||
--upload-file vpc-1.0.0.tar.gz \
|
||||
https://gitea.example.com/api/packages/-/terraform/modules/{namespace}/{name}/{provider}/{version}
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| ----------- | -------------------------------------- |
|
||||
| `namespace` | The owner (user or organization). |
|
||||
| `name` | The module name. |
|
||||
| `provider` | The provider the module targets. |
|
||||
| `version` | The module version (semver). |
|
||||
|
||||
For example, to publish version `1.0.0` of the `vpc` module for the `aws` provider under the `acme`
|
||||
organization:
|
||||
|
||||
```shell
|
||||
curl --user "your_username:your_token" \
|
||||
--upload-file vpc-1.0.0.tar.gz \
|
||||
https://gitea.example.com/api/packages/-/terraform/modules/acme/vpc/aws/1.0.0
|
||||
```
|
||||
|
||||
A successful upload returns `201 Created`. Published versions are immutable: uploading a version that
|
||||
already exists returns `409 Conflict`. To replace a version, delete it first.
|
||||
|
||||
## Linking a module to a repository
|
||||
|
||||
A module always lives in a user or organization's package space — its namespace is that user or
|
||||
organization, never a repository, because the registry address (`HOST/NAMESPACE/NAME/PROVIDER`) has no
|
||||
repository segment. You cannot publish "into" a repository. Instead, a repository link is a display
|
||||
association that surfaces the module on a repository's **Packages** tab. The workflow is:
|
||||
|
||||
1. **Publish** the module to the user or organization namespace, exactly as shown in
|
||||
[Publishing a module](#publishing-a-module).
|
||||
2. **Link** the package to a repository owned by that same user or organization: open the package,
|
||||
go to its **Settings**, and select the repository (or use the
|
||||
`POST /api/v1/packages/{owner}/terraform-module/{name}%2F{provider}/-/link/{repo}` API).
|
||||
|
||||
The link applies to the whole module — all of its versions, including ones published later — and can
|
||||
be changed or removed at any time. It only affects where the module is listed in the UI; the address
|
||||
used to consume it is unchanged (still `HOST/NAMESPACE/NAME/PROVIDER`, with no repository in it).
|
||||
|
||||
## Consuming a module
|
||||
|
||||
Reference the module by its registry address. With Terraform:
|
||||
|
||||
```hcl
|
||||
module "vpc" {
|
||||
source = "gitea.example.com/acme/vpc/aws"
|
||||
version = "~> 1.0"
|
||||
}
|
||||
```
|
||||
|
||||
To use a submodule, append its path with the standard `//` separator:
|
||||
|
||||
```hcl
|
||||
module "network" {
|
||||
source = "gitea.example.com/acme/infra/google//modules/network"
|
||||
version = "~> 1.0"
|
||||
}
|
||||
```
|
||||
|
||||
With Terragrunt, use the `tfr://` scheme and pass the version as a query parameter:
|
||||
|
||||
```hcl
|
||||
terraform {
|
||||
source = "tfr://gitea.example.com/acme/vpc/aws?version=1.0.0"
|
||||
}
|
||||
```
|
||||
|
||||
`terraform init` (or `terragrunt init`) resolves the address through the service discovery document
|
||||
at `https://gitea.example.com/.well-known/terraform.json` and downloads the matching version.
|
||||
|
||||
## Deleting a version
|
||||
|
||||
```shell
|
||||
curl --user "your_username:your_token" \
|
||||
--request DELETE \
|
||||
https://gitea.example.com/api/packages/-/terraform/modules/acme/vpc/aws/1.0.0
|
||||
```
|
||||
|
||||
A successful delete returns `204 No Content`. This requires the `write:package` scope. There is no
|
||||
separate deprecation flow — deleting a version removes it from the registry.
|
||||
|
||||
## Limits
|
||||
|
||||
The stored archive is bounded by the instance-wide package limits (`LIMIT_SIZE_TERRAFORM_MODULE` and
|
||||
`LIMIT_TOTAL_OWNER_SIZE`) set by your Gitea administrator; see the
|
||||
[configuration cheat sheet](../../administration/config-cheat-sheet.md#packages-packages).
|
||||
|
||||
Independently of those settings, an archive may not exceed **32 MiB decompressed**. The registry
|
||||
reads the whole archive to index it, and stops with `413 Request Entity Too Large` past that ceiling,
|
||||
so raising `LIMIT_SIZE_TERRAFORM_MODULE` above 32 MiB does not allow larger modules. Real modules are
|
||||
kilobyte-scale, so this only affects archives carrying unrelated payloads.
|
||||
|
||||
A `README` larger than **1 MiB**, of the root module or of a submodule, is not shown on the package
|
||||
page. The module is still accepted and the file stays in the archive.
|
||||
|
||||
@@ -9,25 +9,36 @@ aliases:
|
||||
|
||||
# Code Owners
|
||||
|
||||
Gitea maintains code owner files. It looks for it in the following locations in this order:
|
||||
Gitea reads the first CODEOWNERS file found at these locations, in order:
|
||||
|
||||
- `./CODEOWNERS`
|
||||
- `./docs/CODEOWNERS`
|
||||
- `./.gitea/CODEOWNERS`
|
||||
|
||||
And stops at the first found file.
|
||||
Pull requests use the base branch's rules. File views show owners from the commit
|
||||
being viewed, including when browsing a branch, tag, or historical commit.
|
||||
|
||||
File format: `<regexp rule> <@user or @org/team> [@user or @org/team]...`
|
||||
## Patterns and owners
|
||||
|
||||
Regexp specified in golang Regex format.
|
||||
Regexp can start with `!` for negative rules - match all files except specified.
|
||||
Each rule contains a pattern followed by users or organization teams.
|
||||
|
||||
Patterns starting with `*` or containing `/*` are parsed as glob expressions.
|
||||
General patterns are parsed as regular expressions.
|
||||
A leading `!` inverts a match.
|
||||
|
||||
Special rule characters like space, backslash and `#` must be escaped with a backslash.
|
||||
When using regexp, since backslash needs to be escaped in rule level, literal dot should be written as `\\.`
|
||||
|
||||
Example file:
|
||||
|
||||
```bash
|
||||
.*\\.go @user1 @user2 # This is comment
|
||||
```text
|
||||
*.js @alice @bob # This is an inline comment
|
||||
doc/*.md @charles # Patterns starting with "*" or containing "/*" are parsed as glob
|
||||
src/**/db*.py @david # Use "**" to match any-level sub directories
|
||||
|
||||
.*\\.go @user1 @user2 # General patterns are parsed as regexp
|
||||
test\\..*\\.js @user3 # !!! Do remeber: NOT "test.*.js", only regexp can be used for such cases
|
||||
|
||||
# Comment too
|
||||
# You can assigning code owning for users or teams
|
||||
frontend/src/.*\\.js @org1/team1 @org1/team2 @user3
|
||||
|
||||
@@ -42,24 +53,69 @@ docs/(aws|google|azure)/[^/]*\\.(md|txt) @user8 @org1/team4
|
||||
Code owners listed in this file will automatically be requested to review pull requests
|
||||
that modify files matching at least one corresponding rule.
|
||||
|
||||
### Escaping
|
||||
## Sections
|
||||
|
||||
You can escape characters `#`, ` ` (space) and `\` with `\`, like:
|
||||
A section heading can supply default owners for the rules that follow it:
|
||||
|
||||
```text
|
||||
[Documentation] @org1/team-doc
|
||||
*.md
|
||||
README.md @alice
|
||||
|
||||
[Frontend] @bob
|
||||
*.js
|
||||
```
|
||||
|
||||
Owners on a rule replace the section's default owners. Section names are
|
||||
case-insensitive; repeated headings belong to the same section. For each file, the
|
||||
last matching rule in each named section applies. Matching rules outside named
|
||||
sections retain Gitea's existing behavior: they all apply.
|
||||
|
||||
## Review request annotations
|
||||
|
||||
Use `## review-request=true` or `## review-request=false` to control automatic
|
||||
review requests. A line annotation overrides a section annotation, which overrides
|
||||
the global value. When none is set, individual code owners receive automatic review
|
||||
requests only if they watch the repository and include pull requests in their watch
|
||||
preferences. Team-level requests are enabled by default. An explicit `true` requests
|
||||
a review regardless of the individual owner's watch preferences; `false` disables
|
||||
automatic requests for the rule.
|
||||
|
||||
```text
|
||||
## review-request=false # global default for following rules
|
||||
|
||||
*.js @alice ## review-request=true # only this rule
|
||||
|
||||
[Documentation] @org1/team-doc ## review-request=true
|
||||
*.md
|
||||
private/* @bob ## review-request=false
|
||||
```
|
||||
|
||||
A standalone annotation changes the global default for subsequent rules.
|
||||
Annotations on section headings apply until the next heading. Ordinary comments
|
||||
start with `#`, including comments after annotations.
|
||||
|
||||
Disabling review requests keeps code owners visible when viewing a file and
|
||||
does not waive approvals required by branch protection.
|
||||
|
||||
## Escaping
|
||||
|
||||
You need to escape characters `#`, ` ` (space) and `\` with backslash `\`, e.g.:
|
||||
|
||||
```text
|
||||
dir/with\#hashtag @user1
|
||||
path\ with\ space @user2
|
||||
path/with\\backslash @user3
|
||||
```
|
||||
|
||||
Some character (`.+*?()|[]{}^$\`) should be escaped with `\\` inside regexp, like:
|
||||
Some regexp characters (`.+*?()|[]{}^$\`) should be escaped with `\\`, e.g.:
|
||||
|
||||
```
|
||||
path/\\.with\\.dots
|
||||
path/with\\+plus
|
||||
```
|
||||
|
||||
### Branch Protection Rules
|
||||
## Branch Protection Rules
|
||||
|
||||
When setting up branch protection rules, you may choose to enforce code owner approval of
|
||||
modified files. This will block a PR from being merged until at least one code owner
|
||||
@@ -67,7 +123,7 @@ has given approval for every applicable rule listed in the `CODEOWNERS` file.
|
||||
|
||||
For example, say you have the following `CODEOWNERS` file:
|
||||
|
||||
```bash
|
||||
```text
|
||||
.*\\.go @Bob
|
||||
.*\\.md @Sally @Chris
|
||||
migrations/.* @Alice
|
||||
|
||||
@@ -18,12 +18,13 @@ aliases:
|
||||
|
||||
- 主机名 **(必选)**
|
||||
|
||||
- LDAP 服务的主机地址.
|
||||
- 例如:`mydomain.com`
|
||||
- 以逗号分隔的 LDAP 服务地址。每一项可以是使用端口号和安全协议设置的主机名,也可以是带可选端口的 `ldap://`、`ldaps://` 或 `ldap+starttls://` URL。`ldap://` 仅可用于未加密的安全协议,其他 URL 仅可用于加密的安全协议。
|
||||
- 前一个服务连接失败或超过 250 毫秒仍未连上时,会尝试下一个服务。绑定或搜索失败不会切换到下一个服务。
|
||||
- 例如:`ldap1.mydomain.com, ldaps://ldap2.mydomain.com:636`
|
||||
|
||||
- 端口号 **(必选)**
|
||||
|
||||
- LDAP 服务的端口号.
|
||||
- 未以 URL 形式给出的主机所使用的端口号.
|
||||
- 例如: LDAP `389`/ LDAPs `636`
|
||||
|
||||
- 安全协议 (可选)
|
||||
|
||||
@@ -42,13 +42,6 @@ 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 服务器的地址。必填。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。必填。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。必填。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。必填。
|
||||
- `--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 服务器的地址。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。
|
||||
- `--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 服务器的地址。必填。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。必填。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。必填。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。必填。
|
||||
- `--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 服务器的地址。
|
||||
- `--port value`:连接到 LDAP 服务器时使用的端口。
|
||||
- `--host value`:以逗号分隔的 LDAP 主机或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,按顺序尝试。
|
||||
- `--port value`:连接未以 URL 形式给出的主机时使用的端口。
|
||||
- `--user-search-base value`:用户帐户将在其中搜索的 LDAP 基础路径。
|
||||
- `--user-filter value`:声明如何查找试图进行身份验证的用户记录的 LDAP 过滤器。
|
||||
- `--admin-filter value`:指定是否应授予用户管理员特权的 LDAP 过滤器。
|
||||
|
||||
@@ -114,8 +114,6 @@ 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**: 允许将仓库派生到同一所有者(用户或组织)中。此功能为实验性功能,尚未完全测试,将来可能会更改。
|
||||
@@ -141,7 +139,7 @@ aliases:
|
||||
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: 在默认的 squash 合并消息中,包括构成拉取请求的所有提交的提交消息。
|
||||
- `ADD_CO_COMMITTER_TRAILERS`: **true**: 如果提交者与作者不匹配,在合并提交消息中添加`co-authored-by`和`co-committed-by`标记。
|
||||
- `RETARGET_CHILDREN_ON_MERGE`: **true**: 当父合并请求被合并时,将子合并请求重新定向到父合并请求的目标分支。仅适用于头分支和基分支指向同一仓库的已合并合并请求。
|
||||
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: 为新仓库设置"合并后默认删除合并请求分支"的默认值。
|
||||
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **true**: 为新仓库设置"合并后默认删除合并请求分支"的默认值。
|
||||
|
||||
### 仓库 - 工单 (`repository.issue`)
|
||||
|
||||
@@ -509,7 +507,7 @@ Gitea 创建以下非唯一队列:
|
||||
- `manage_ssh_keys`:用户不能配置 SSH 密钥。
|
||||
- `manage_gpg_keys`:用户不能配置 GPG 密钥。
|
||||
- `manage_mfa`:用户不能配置 MFA 设备。
|
||||
- `manage_credentials`:用户不能配置邮箱、密码或 OpenID。
|
||||
- `manage_credentials`:用户不能配置邮箱或密码。
|
||||
- `change_username`:用户不能更改其用户名。
|
||||
- `change_full_name`:用户不能更改其全名。
|
||||
|
||||
@@ -575,13 +573,6 @@ 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`设置)
|
||||
@@ -630,6 +621,7 @@ 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**: 启用此项以默认启用依赖项。
|
||||
@@ -677,7 +669,6 @@ Gitea 创建以下非唯一队列:
|
||||
- `ED25519`:**256**
|
||||
- `ECDSA`:**256**
|
||||
- `RSA`:**3071**: 我们在这里设置为 2047,因为一个其他方面有效的 3072 RSA 密钥可能被报告为 3071 长度。
|
||||
- `DSA`:**-1**: 默认情况下禁用 DSA。设置为**1024**以重新启用,但请注意可能需要重新配置您的 SSHD 提供者
|
||||
|
||||
## Webhook (`webhook`)
|
||||
|
||||
|
||||
@@ -143,20 +143,13 @@ Gitea 不提供内置的 Pages 服务器。您需要一个专用的域名来提
|
||||
有多种方法可以组合使用来防止垃圾邮件发送者:
|
||||
|
||||
1. 通过设置电子邮件域名的白名单或黑名单。
|
||||
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 的管理界面创建新用户。
|
||||
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 的管理界面创建新用户。
|
||||
|
||||
### 仅允许/阻止特定的电子邮件域名
|
||||
|
||||
您可以在`app.ini`中的`[service]`下的配置`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
||||
|
||||
### 仅允许/阻止特定的 OpenID 提供商
|
||||
|
||||
您可以在`app.ini`的`[openid]`下配置`WHITELISTED_URI`或`BLACKLISTED_URIS`。
|
||||
|
||||
**注意**: 白名单优先,如果白名单非空,则忽略黑名单。
|
||||
|
||||
### 仅允许发布问题的用户
|
||||
|
||||
目前实现这一点的方法是创建/修改一个具有最大仓库创建限制为 0 的用户。
|
||||
@@ -423,11 +416,5 @@ gitea doctor recreate-table
|
||||
|
||||
## 如何从磁盘采用存储库
|
||||
|
||||
- 将您的(裸)存储库添加到正确的位置,即您的配置所在的地方(`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#仓库)以检查是否有特定错误。
|
||||
要从磁盘导入仓库,请使用 [Gitea importer](https://gitea.com/gitea/importer),参数:`--source-type local`。
|
||||
如果仓库已位于 Gitea 的仓库根目录下,请先将其移到该目录之外,再导入,以免与目标路径冲突。
|
||||
@@ -8,7 +8,7 @@ aliases:
|
||||
|
||||
# 数据库准备
|
||||
|
||||
在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。由于 PostgreSQL 和 MySQL 在生产环境中被广泛使用,因此本文档将仅涵盖这两种数据库。如果您计划使用 SQLite,则可以忽略本章内容。
|
||||
在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。本文档涵盖 PostgreSQL、MySQL 和 MSSQL。如果您计划使用 SQLite,则可以忽略本章内容。
|
||||
|
||||
如果您使用不受支持的数据库版本,请通过 [联系我们](/help/support) 以获取有关我们的扩展支持的信息。我们可以为旧数据库提供测试和支持,并将这些修复集成到 Gitea 代码库中。
|
||||
|
||||
@@ -168,6 +168,28 @@ aliases:
|
||||
|
||||
您应该会被提示输入数据库用户的密码,并连接到数据库。
|
||||
|
||||
## MSSQL
|
||||
|
||||
1. 以管理员身份创建登录名、使用大小写敏感排序规则的数据库及其用户。请将密码 `'gitea'` 替换为安全的密码:
|
||||
|
||||
```sql
|
||||
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
|
||||
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
|
||||
GO
|
||||
USE giteadb;
|
||||
CREATE USER gitea FOR LOGIN gitea;
|
||||
ALTER ROLE db_owner ADD MEMBER gitea;
|
||||
GO
|
||||
```
|
||||
|
||||
升级会更改数据库结构,因此该用户需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用后者时,还需以管理员身份执行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
|
||||
|
||||
2. 在您的 Gitea 服务器上,测试与数据库的连接:
|
||||
|
||||
```sh
|
||||
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
|
||||
```
|
||||
|
||||
## 使用 TLS 进行数据库连接
|
||||
|
||||
如果 Gitea 和您的数据库实例之间的通信是通过私有网络进行的,或者如果 Gitea 和数据库运行在同一台服务器上,那么可以省略本节,因为 Gitea 和数据库实例之间的安全性不会受到严重威胁。但是,如果数据库实例位于公共网络上,请使用 TLS 对数据库连接进行加密,以防止第三方拦截流量数据。
|
||||
|
||||
@@ -18,18 +18,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
<a id="action-prefixes"></a>
|
||||
### Action前缀
|
||||
|
||||
`uses:`支持以下前缀:
|
||||
|
||||
- `self:`引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:`运行Gitea Runner内置的Action,无需下载,Job镜像中也无需Node,例如`uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout`支持`actions/checkout`的`repository`、`ref`、`token`、`path`和`fetch-depth`输入,默认值相同,其他输入会使步骤失败。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相对于工作流的Actions
|
||||
|
||||
`$/`引用工作流所在的仓库和提交,或外层复合Action所在的仓库和提交,例如`uses: $/.gitea/actions/build`。
|
||||
与`./`不同,它无需事先检出代码。
|
||||
`uses:`支持`self:`前缀,用于引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`。
|
||||
|
||||
### 使用Go编写Actions
|
||||
|
||||
@@ -95,7 +84,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
|
||||
未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。
|
||||
请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)、[Action前缀](#action-prefixes)和[相对于工作流的Actions](#workflow-relative-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)和[Action前缀](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ aliases:
|
||||
|
||||
# 数据库准备
|
||||
|
||||
在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。由于 PostgreSQL 和 MySQL 在生产环境中被广泛使用,因此本文档将仅涵盖这两种数据库。如果您计划使用 SQLite,则可以忽略本章内容。
|
||||
在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。本文档涵盖 PostgreSQL、MySQL 和 MSSQL。如果您计划使用 SQLite,则可以忽略本章内容。
|
||||
|
||||
如果您使用不受支持的数据库版本,请通过 [联系我们](/help/support) 以获取有关我们的扩展支持的信息。我们可以为旧数据库提供测试和支持,并将这些修复集成到 Gitea 代码库中。
|
||||
|
||||
@@ -168,6 +168,28 @@ aliases:
|
||||
|
||||
您应该会被提示输入数据库用户的密码,并连接到数据库。
|
||||
|
||||
## MSSQL
|
||||
|
||||
1. 以管理员身份创建登录名、使用大小写敏感排序规则的数据库及其用户。请将密码 `'gitea'` 替换为安全的密码:
|
||||
|
||||
```sql
|
||||
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
|
||||
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
|
||||
GO
|
||||
USE giteadb;
|
||||
CREATE USER gitea FOR LOGIN gitea;
|
||||
ALTER ROLE db_owner ADD MEMBER gitea;
|
||||
GO
|
||||
```
|
||||
|
||||
升级会更改数据库结构,因此该用户需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用后者时,还需以管理员身份执行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
|
||||
|
||||
2. 在您的 Gitea 服务器上,测试与数据库的连接:
|
||||
|
||||
```sh
|
||||
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
|
||||
```
|
||||
|
||||
## 使用 TLS 进行数据库连接
|
||||
|
||||
如果 Gitea 和您的数据库实例之间的通信是通过私有网络进行的,或者如果 Gitea 和数据库运行在同一台服务器上,那么可以省略本节,因为 Gitea 和数据库实例之间的安全性不会受到严重威胁。但是,如果数据库实例位于公共网络上,请使用 TLS 对数据库连接进行加密,以防止第三方拦截流量数据。
|
||||
|
||||
@@ -21,15 +21,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
`uses:`支持以下前缀:
|
||||
|
||||
- `self:`引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:`运行Gitea Runner内置的Action,无需下载,Job镜像中也无需Node,例如`uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout`支持`actions/checkout`的`repository`、`ref`、`token`、`path`和`fetch-depth`输入,默认值相同,其他输入会使步骤失败。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相对于工作流的Actions
|
||||
|
||||
`$/`引用工作流所在的仓库和提交,或外层复合Action所在的仓库和提交,例如`uses: $/.gitea/actions/build`。
|
||||
与`./`不同,它无需事先检出代码。
|
||||
- `builtin:`运行Gitea Runner内置的Action,无需下载,也不依赖Node.js,例如`uses: builtin:checkout`
|
||||
|
||||
### 使用Go编写Actions
|
||||
|
||||
@@ -95,7 +87,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
|
||||
未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。
|
||||
请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)、[Action前缀](#action-prefixes)和[相对于工作流的Actions](#workflow-relative-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)和[Action前缀](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
@@ -18,12 +18,13 @@ aliases:
|
||||
|
||||
- 主機名 **(必選)**
|
||||
|
||||
- LDAP 服務的主機地址.
|
||||
- 例如:`mydomain.com`
|
||||
- 以逗號分隔的 LDAP 服務地址。每一項可以是使用端口號和安全協議設定的主機名,也可以是帶可選端口的 `ldap://`、`ldaps://` 或 `ldap+starttls://` URL。`ldap://` 僅可用於未加密的安全協議,其他 URL 僅可用於加密的安全協議。
|
||||
- 前一個服務連線失敗或超過 250 毫秒仍未連上時,會嘗試下一個服務。綁定或搜尋失敗不會切換到下一個服務。
|
||||
- 例如:`ldap1.mydomain.com, ldaps://ldap2.mydomain.com:636`
|
||||
|
||||
- 端口號 **(必選)**
|
||||
|
||||
- LDAP 服務的端口號.
|
||||
- 未以 URL 形式給出的主機所使用的端口號.
|
||||
- 例如: LDAP `389`/ LDAPs `636`
|
||||
|
||||
- 安全協議 (可選)
|
||||
|
||||
@@ -42,13 +42,6 @@ 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 伺服器的地址。必填。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。必填。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。必填。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。必填。
|
||||
- `--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 伺服器的地址。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。
|
||||
- `--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 伺服器的地址。必填。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。必填。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。必填。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。必填。
|
||||
- `--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 伺服器的地址。
|
||||
- `--port value`:連接到 LDAP 伺服器時使用的端口。
|
||||
- `--host value`:以逗號分隔的 LDAP 主機或 `ldap://`、`ldaps://`、`ldap+starttls://` URL,依序嘗試。
|
||||
- `--port value`:連接未以 URL 形式給出的主機時使用的端口。
|
||||
- `--user-search-base value`:使用者帳戶將在其中搜索的 LDAP 基礎路徑。
|
||||
- `--user-filter value`:聲明如何查找試圖進行身份驗證的使用者記錄的 LDAP 過濾器。
|
||||
- `--admin-filter value`:指定是否應授予使用者管理員特權的 LDAP 過濾器。
|
||||
|
||||
@@ -115,8 +115,6 @@ 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**: 允許將儲存庫派生到同一所有者(使用者或組織)中。此功能為實驗性功能,尚未完全測試,將來可能會更改。
|
||||
@@ -142,7 +140,7 @@ aliases:
|
||||
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: 在預設的 squash 合併消息中,包括構成拉取請求的所有提交的提交消息。
|
||||
- `ADD_CO_COMMITTER_TRAILERS`: **true**: 如果提交者與作者不匹配,在合併提交消息中添加`co-authored-by`和`co-committed-by`標記。
|
||||
- `RETARGET_CHILDREN_ON_MERGE`: **true**: 當父合併請求被合併時,將子合併請求重新定向到父合併請求的目標分支。僅適用於頭分支和基分支指向同一儲存庫的已合併合併請求。
|
||||
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: 為新儲存庫設定"合併後預設刪除合併請求分支"的預設值。
|
||||
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **true**: 為新儲存庫設定"合併後預設刪除合併請求分支"的預設值。
|
||||
|
||||
### 儲存庫 - 工單 (`repository.issue`)
|
||||
|
||||
@@ -512,7 +510,7 @@ Gitea 建立以下非唯一隊列:
|
||||
- `manage_ssh_keys`:使用者不能設定 SSH 密鑰。
|
||||
- `manage_gpg_keys`:使用者不能設定 GPG 密鑰。
|
||||
- `manage_mfa`:使用者不能設定 MFA 設備。
|
||||
- `manage_credentials`:使用者不能設定郵箱、密碼或 OpenID。
|
||||
- `manage_credentials`:使用者不能設定郵箱或密碼。
|
||||
- `change_username`:使用者不能更改其使用者名稱。
|
||||
- `change_full_name`:使用者不能更改其全名。
|
||||
|
||||
@@ -580,13 +578,6 @@ 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`設定)
|
||||
@@ -635,6 +626,7 @@ 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**: 啟用此項以預設啟用依賴項。
|
||||
@@ -682,7 +674,6 @@ Gitea 建立以下非唯一隊列:
|
||||
- `ED25519`:**256**
|
||||
- `ECDSA`:**256**
|
||||
- `RSA`:**3071**: 我們在這裡設定為 2047,因為一個其他方面有效的 3072 RSA 密鑰可能被報告為 3071 長度。
|
||||
- `DSA`:**-1**: 預設情況下禁用 DSA。設定為**1024**以重新啟用,但請注意可能需要重新設定您的 SSHD 提供者
|
||||
|
||||
## Webhook (`webhook`)
|
||||
|
||||
|
||||
@@ -145,20 +145,13 @@ Gitea 不提供內置的 Pages 伺服器。您需要一個專用的域名來提
|
||||
有多種方法可以組合使用來防止垃圾郵件發送者:
|
||||
|
||||
1. 通過設定電子郵件域名的白名單或黑名單。
|
||||
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 的管理介面建立新使用者。
|
||||
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 的管理介面建立新使用者。
|
||||
|
||||
### 僅允許/阻止特定的電子郵件域名
|
||||
|
||||
您可以在`app.ini`中的`[service]`下的設定`EMAIL_DOMAIN_WHITELIST` 或 `EMAIL_DOMAIN_BLOCKLIST`。
|
||||
|
||||
### 僅允許/阻止特定的 OpenID 提供商
|
||||
|
||||
您可以在`app.ini`的`[openid]`下設定`WHITELISTED_URI`或`BLACKLISTED_URIS`。
|
||||
|
||||
**注意**: 白名單優先,如果白名單非空,則忽略黑名單。
|
||||
|
||||
### 僅允許發佈問題的使用者
|
||||
|
||||
目前實現這一點的方法是建立/修改一個具有最大儲存庫建立限制為 0 的使用者。
|
||||
@@ -425,11 +418,5 @@ gitea doctor recreate-table
|
||||
|
||||
## 如何從磁盤採用儲存庫
|
||||
|
||||
- 將您的(裸)儲存庫添加到正確的位置,即您的設定所在的地方(`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)以檢查是否有特定錯誤。
|
||||
若要從磁碟匯入儲存庫,請使用 [Gitea importer](https://gitea.com/gitea/importer),參數:`--source-type local`。
|
||||
如果儲存庫已位於 Gitea 的儲存庫根目錄下,請先將其移到該目錄之外,再匯入,以免與目標路徑衝突。
|
||||
@@ -8,7 +8,7 @@ aliases:
|
||||
|
||||
# 資料庫準備
|
||||
|
||||
在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。由於 PostgreSQL 和 MySQL 在生產環境中被廣泛使用,因此本文件將僅涵蓋這兩種資料庫。如果您計劃使用 SQLite,則可以忽略本章內容。
|
||||
在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。本文件涵蓋 PostgreSQL、MySQL 和 MSSQL。如果您計劃使用 SQLite,則可以忽略本章內容。
|
||||
|
||||
如果您使用不受支援的資料庫版本,請通過 [聯繫我們](/help/support) 以獲取有關我們的擴展支援的資訊。我們可以為舊資料庫提供測試和支援,並將這些修復整合到 Gitea 程式碼庫中。
|
||||
|
||||
@@ -168,6 +168,28 @@ aliases:
|
||||
|
||||
您應該會被提示輸入資料庫使用者的密碼,並連接到資料庫。
|
||||
|
||||
## MSSQL
|
||||
|
||||
1. 以管理員身份建立登入名稱、使用大小寫敏感排序規則的資料庫及其使用者。請將密碼 `'gitea'` 替換為安全的密碼:
|
||||
|
||||
```sql
|
||||
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
|
||||
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
|
||||
GO
|
||||
USE giteadb;
|
||||
CREATE USER gitea FOR LOGIN gitea;
|
||||
ALTER ROLE db_owner ADD MEMBER gitea;
|
||||
GO
|
||||
```
|
||||
|
||||
升級會更改資料庫結構,因此該使用者需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用後者時,還需以管理員身份執行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
|
||||
|
||||
2. 在您的 Gitea 伺服器上,測試與資料庫的連接:
|
||||
|
||||
```sh
|
||||
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
|
||||
```
|
||||
|
||||
## 使用 TLS 進行資料庫連接
|
||||
|
||||
如果 Gitea 和您的資料庫實例之間的通信是通過私有網路進行的,或者如果 Gitea 和資料庫運行在同一臺伺服器上,那麼可以省略本節,因為 Gitea 和資料庫實例之間的安全性不會受到嚴重威脅。但是,如果資料庫實例位於公共網路上,請使用 TLS 對資料庫連接進行加密,以防止第三方攔截流量資料。
|
||||
|
||||
@@ -18,18 +18,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
<a id="action-prefixes"></a>
|
||||
### Action 前綴
|
||||
|
||||
`uses:` 接受以下前綴:
|
||||
|
||||
- `self:` 參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,Job 映像檔中也不需要 Node,例如 `uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout` 支援 `actions/checkout` 的 `repository`、`ref`、`token`、`path` 和 `fetch-depth` 輸入,預設值相同,其他輸入會使步驟失敗。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相對於工作流的 Actions
|
||||
|
||||
`$/` 參照工作流(或外層複合 Action)所在的儲存庫與提交,例如 `uses: $/.gitea/actions/build`。
|
||||
與 `./` 不同,它不需要事先簽出程式碼。
|
||||
`uses:` 接受 `self:` 前綴,用於參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`。
|
||||
|
||||
### 使用Go編寫Actions
|
||||
|
||||
@@ -95,7 +84,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
|
||||
未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。
|
||||
請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)、[Action 前綴](#action-prefixes)和[相對於工作流的 Actions](#workflow-relative-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)和[Action 前綴](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ aliases:
|
||||
|
||||
# 資料庫準備
|
||||
|
||||
在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。由於 PostgreSQL 和 MySQL 在生產環境中被廣泛使用,因此本文件將僅涵蓋這兩種資料庫。如果您計劃使用 SQLite,則可以忽略本章內容。
|
||||
在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。本文件涵蓋 PostgreSQL、MySQL 和 MSSQL。如果您計劃使用 SQLite,則可以忽略本章內容。
|
||||
|
||||
如果您使用不受支援的資料庫版本,請通過 [聯繫我們](/help/support) 以獲取有關我們的擴展支援的資訊。我們可以為舊資料庫提供測試和支援,並將這些修復整合到 Gitea 程式碼庫中。
|
||||
|
||||
@@ -168,6 +168,28 @@ aliases:
|
||||
|
||||
您應該會被提示輸入資料庫使用者的密碼,並連接到資料庫。
|
||||
|
||||
## MSSQL
|
||||
|
||||
1. 以管理員身份建立登入名稱、使用大小寫敏感排序規則的資料庫及其使用者。請將密碼 `'gitea'` 替換為安全的密碼:
|
||||
|
||||
```sql
|
||||
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
|
||||
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
|
||||
GO
|
||||
USE giteadb;
|
||||
CREATE USER gitea FOR LOGIN gitea;
|
||||
ALTER ROLE db_owner ADD MEMBER gitea;
|
||||
GO
|
||||
```
|
||||
|
||||
升級會更改資料庫結構,因此該使用者需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用後者時,還需以管理員身份執行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
|
||||
|
||||
2. 在您的 Gitea 伺服器上,測試與資料庫的連接:
|
||||
|
||||
```sh
|
||||
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
|
||||
```
|
||||
|
||||
## 使用 TLS 進行資料庫連接
|
||||
|
||||
如果 Gitea 和您的資料庫實例之間的通信是通過私有網路進行的,或者如果 Gitea 和資料庫運行在同一臺伺服器上,那麼可以省略本節,因為 Gitea 和資料庫實例之間的安全性不會受到嚴重威脅。但是,如果資料庫實例位於公共網路上,請使用 TLS 對資料庫連接進行加密,以防止第三方攔截流量資料。
|
||||
|
||||
@@ -21,15 +21,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
`uses:` 接受以下前綴:
|
||||
|
||||
- `self:` 參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,Job 映像檔中也不需要 Node,例如 `uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout` 支援 `actions/checkout` 的 `repository`、`ref`、`token`、`path` 和 `fetch-depth` 輸入,預設值相同,其他輸入會使步驟失敗。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相對於工作流的 Actions
|
||||
|
||||
`$/` 參照工作流(或外層複合 Action)所在的儲存庫與提交,例如 `uses: $/.gitea/actions/build`。
|
||||
與 `./` 不同,它不需要事先簽出程式碼。
|
||||
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,也不依賴 Node.js,例如 `uses: builtin:checkout`
|
||||
|
||||
### 使用Go編寫Actions
|
||||
|
||||
@@ -95,7 +87,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
|
||||
未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。
|
||||
請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)、[Action 前綴](#action-prefixes)和[相對於工作流的 Actions](#workflow-relative-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)和[Action 前綴](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
+1
-1
@@ -13,5 +13,5 @@
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
},
|
||||
"packageManager": "[email protected]6.1"
|
||||
"packageManager": "[email protected]7.0"
|
||||
}
|
||||
@@ -89,11 +89,11 @@ const variables: Record<string, VersionVariables> = {
|
||||
goVersion: '1.27',
|
||||
minGoVersion: '1.27',
|
||||
minNodeVersion: '22',
|
||||
version: '28.3.0',
|
||||
sourceVersion: 'v28.3.0',
|
||||
version: '28.4.0',
|
||||
sourceVersion: 'v28.4.0',
|
||||
sourceBranch: 'release/v28',
|
||||
dockerVersion: '28.3.0',
|
||||
displayVersion: '28.3.0',
|
||||
dockerVersion: '28.4.0',
|
||||
displayVersion: '28.4.0',
|
||||
},
|
||||
'1.27': {
|
||||
goVersion: '1.26',
|
||||
|
||||
Generated
+446
-215
File diff suppressed because it is too large.
Load diff
@@ -23,7 +23,6 @@ Jobs need these tools wherever steps run, in the job image or on the host:
|
||||
|
||||
- `bash` or `sh` for `run` steps, or `pwsh` or `powershell` on Windows.
|
||||
- `node` for JavaScript actions and `hashFiles()`.
|
||||
- `git` 2.34.1 or later for [`builtin:checkout`](jobs.md#built-in-checkout), plus `git-lfs` for its `lfs` input and `ssh` for its `ssh-key` input.
|
||||
|
||||
## Where jobs run
|
||||
|
||||
|
||||
@@ -84,7 +84,16 @@ For jobs in containers, give the `gitea-runner` user access to the Docker daemon
|
||||
|
||||
## launchd (macOS)
|
||||
|
||||
Adjust the paths and user for your setup, then save this file as `/Library/LaunchDaemons/com.gitea.runner.plist`:
|
||||
On macOS, run the runner in the login session of the user that jobs should run as. Jobs then have that user's login keychain and the GUI.
|
||||
|
||||
Register the runner as that user, with a [host label](../labels.md) so that jobs run on the Mac itself:
|
||||
|
||||
```bash
|
||||
mkdir ~/gitea-runner && cd ~/gitea-runner
|
||||
gitea-runner register --instance https://gitea.example.com --token <token> --labels macos-latest:host
|
||||
```
|
||||
|
||||
Replace `/Users/gitea-runner` with the user's home directory, then save this file as `~/Library/LaunchAgents/com.gitea.runner.plist`:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -97,22 +106,16 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
|
||||
<array>
|
||||
<string>/usr/local/bin/gitea-runner</string>
|
||||
<string>daemon</string>
|
||||
<string>--config</string>
|
||||
<string>/etc/gitea-runner/config.yaml</string>
|
||||
</array>
|
||||
<key>UserName</key>
|
||||
<string>_gitea-runner</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/var/lib/gitea-runner</string>
|
||||
<string>/Users/gitea-runner/gitea-runner</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/gitea-runner</string>
|
||||
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
||||
</dict>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/var/lib/gitea-runner/runner.log</string>
|
||||
<string>/Users/gitea-runner/gitea-runner/runner.log</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
@@ -121,10 +124,30 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
|
||||
</plist>
|
||||
```
|
||||
|
||||
Start the runner. From now on, it also starts whenever the user logs in:
|
||||
|
||||
```bash
|
||||
sudo launchctl bootstrap system /Library/LaunchDaemons/com.gitea.runner.plist
|
||||
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.gitea.runner.plist
|
||||
```
|
||||
|
||||
Enable automatic login for the user in System Settings, so that the runner starts after a restart too. macOS does not offer automatic login while FileVault is on.
|
||||
|
||||
The runner does not get the environment of your shell. Set what jobs need, such as [proxy settings](../proxy.md), in `EnvironmentVariables`.
|
||||
|
||||
### Local network access
|
||||
|
||||
macOS blocks a runner that was started this way from other hosts on the Mac's own subnet, such as the Gitea instance or a shared cache server. The runner then logs `no route to host`. Commands run in Terminal or over SSH are not blocked, so registering works even when the running runner cannot connect. See [local network privacy](https://developer.apple.com/documentation/technotes/tn3179-understanding-local-network-privacy).
|
||||
|
||||
macOS asks on the Mac's screen whether to allow the access. To allow it without that prompt, exempt the subnet on macOS 15.5 or later and restart the Mac. On Wi-Fi, the key is `AllowedWiFiLocalNetworkAddresses`:
|
||||
|
||||
```bash
|
||||
sudo defaults write com.apple.network.local-network AllowedEthernetLocalNetworkAddresses -array "192.168.1.0/24"
|
||||
```
|
||||
|
||||
### Git credentials
|
||||
|
||||
Git on macOS saves credentials from remote URLs to the keychain, which can stop a job at a dialog that nobody answers. To turn that off, set `GIT_CONFIG_NOSYSTEM` to `1` in `EnvironmentVariables`.
|
||||
|
||||
## Windows
|
||||
|
||||
Run `gitea-runner daemon` with a service wrapper such as [WinSW](https://github.com/winsw/winsw). The runner has no service installer of its own.
|
||||
|
||||
@@ -68,10 +68,6 @@ Setup actions such as `actions/setup-go` install tools in `/opt/hostedtoolcache`
|
||||
|
||||
With `none`, include tools in the job image at `/opt/hostedtoolcache/<tool>/<version>/<arch>`. Place an empty `<arch>.complete` file next to the directory. The `-full` variant of the [runner images](https://gitea.com/gitea/runner-images) includes its tools this way.
|
||||
|
||||
## Built-in checkout
|
||||
|
||||
`uses: builtin:checkout` checks out the repository like `actions/checkout`. It does not download an action or require Node in the job image. It runs `git` in the job. See [Requirements](index.md#requirements) and the inputs listed in [builtin-actions.md](https://gitea.com/gitea/runner/src/branch/main/docs/builtin-actions.md).
|
||||
|
||||
## Secrets
|
||||
|
||||
The runner masks secrets and `::add-mask::` values in job logs, job summaries, and the names of containers it creates. The runner does not send job outputs that contain a secret. A `needs.<job>.outputs.<name>` expression that reads such an output is empty.
|
||||
@@ -57,6 +57,12 @@ runner:
|
||||
# PEM client certificate and key for a Gitea instance that requires mutual TLS.
|
||||
#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.
|
||||
# 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.
|
||||
#ca_file: /etc/gitea-runner/ca.crt
|
||||
# The timeout for fetching the job from the Gitea instance.
|
||||
# Values above the 60s RPC timeout are capped to it.
|
||||
#fetch_timeout: 5s
|
||||
@@ -126,6 +132,7 @@ runner:
|
||||
# If it's empty when execute `daemon`, will use labels in `.runner` file.
|
||||
#labels:
|
||||
# - "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
||||
# - "ubuntu-26.04:docker://docker.gitea.com/runner-images:ubuntu-26.04"
|
||||
# - "ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04"
|
||||
# - "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
|
||||
# Allocate a pseudo-TTY for each step's process. Applies to both host and docker backends.
|
||||
@@ -138,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 every job reuses. Two jobs writing the same tool version at once
|
||||
# corrupt it, so use it only with capacity 1.
|
||||
# shared: one tool cache per capacity slot, reused by later jobs. It hides the tools later job
|
||||
# images ship, so use images without them.
|
||||
#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.
|
||||
@@ -219,8 +226,8 @@ cache:
|
||||
# How the cache server discards entries, ignored when external_server or s3 is set since
|
||||
# those apply their own. Leave a setting out for its default; 0s or 0 turns the three
|
||||
# limits off. Sizes accept 10GB, 512mb, 1TiB or a plain byte count, binary either way.
|
||||
# Whatever these allow, the cache still sheds entries to keep free space on its volume
|
||||
# above health_check.min_free_disk_space_mb when health checks are enabled.
|
||||
# Whatever these allow, the cache still sheds entries to keep free space on its volume, room
|
||||
# for uploads included, above health_check.min_free_disk_space_mb when health checks are enabled.
|
||||
# Remove entries nothing has read or written within this window. Only last access counts.
|
||||
#retention: 168h
|
||||
# Cap one repository, removing its least recently accessed entries until it fits. An entry
|
||||
@@ -277,6 +284,15 @@ container:
|
||||
# valid_volumes:
|
||||
# - '**'
|
||||
#valid_volumes: []
|
||||
# Volumes and bind mounts the runner adds to every job, service and docker action container, as in
|
||||
# `docker run --volume`, with sources on the docker daemon's host. One the workflow mounts on the same
|
||||
# container path takes its place. Their sources need no valid_volumes entry, and workflow volumes may
|
||||
# use them only with the same access, though a job given the docker socket can mount anything.
|
||||
# Docker only, use pod_template on Kubernetes. For example, to trust a private CA in Debian and
|
||||
# Ubuntu based images:
|
||||
# volumes:
|
||||
# - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
|
||||
#volumes: []
|
||||
# Overrides the docker client host with the specified one.
|
||||
# If it's empty, runner will find an available docker host automatically.
|
||||
# If it's "-", runner will find an available docker host automatically, but won't mount it into the job and action containers.
|
||||
@@ -304,8 +320,8 @@ container:
|
||||
# healthy. A negative value (e.g. -1s) starts the steps without waiting.
|
||||
#service_ready_timeout: 5m
|
||||
# Remove the containers, networks and volumes a job creates through its Docker proxy when
|
||||
# the job ends. Set to false when jobs deploy services to the runner's Docker daemon.
|
||||
#sweep: true
|
||||
# the job ends. Leave off when jobs deploy services to the runner's Docker daemon.
|
||||
#sweep: false
|
||||
|
||||
host:
|
||||
# The parent directory of a job's working directory.
|
||||
@@ -340,8 +356,8 @@ health_check:
|
||||
# Minimum free space required on the filesystem holding runner workspaces.
|
||||
# Defaults to 1024 MiB when omitted or set to zero.
|
||||
#min_free_disk_space_mb: 1024
|
||||
# Optional additional executable. A non-zero exit, timeout, or startup failure
|
||||
# marks the runner unavailable.
|
||||
# Optional additional executable, or a .bat or .cmd file on Windows. A non-zero
|
||||
# exit, timeout, or startup failure marks the runner unavailable.
|
||||
#script: ''
|
||||
# How long a script result is cached and its maximum execution time.
|
||||
#interval: 30s
|
||||
|
||||
@@ -14,6 +14,10 @@ sudo systemctl start gitea-runner
|
||||
|
||||
Stopping the runner cancels running jobs unless `runner.shutdown_timeout` gives them time to finish. The runner logs a warning for unknown configuration keys and ignores them. Run `gitea-runner config generate` to list all configuration options.
|
||||
|
||||
## Breaking changes in 6.0
|
||||
|
||||
- **`builtin:checkout` is removed.** Steps that use it fail. Use `actions/checkout` or a lightweight action such as [`taiki-e/checkout-action`](https://github.com/taiki-e/checkout-action).
|
||||
|
||||
## Breaking changes in 5.0
|
||||
|
||||
- **Git 2.34.1 or later is required** on the runner and in job images that use `builtin:checkout`.
|
||||
|
||||
@@ -26,7 +26,7 @@ Config files are read leniently: keys the running version does not know are repo
|
||||
|
||||
### Also new
|
||||
|
||||
- `builtin:checkout`, which needs neither a download nor Node in the job image, see [docs/builtin-actions.md](https://gitea.com/gitea/runner/src/branch/main/docs/builtin-actions.md), and the `self:` prefix for actions hosted on the runner's own instance.
|
||||
- `builtin:checkout`, which needs neither a download nor Node in the job image, see [docs/builtin-actions.md](https://gitea.com/gitea/runner/src/tag/v4.1.0/docs/builtin-actions.md), and the `self:` prefix for actions hosted on the runner's own instance.
|
||||
- S3-compatible storage as a cache backend (`cache.s3` in the [example configuration](reference/config-example.md)), shared between runners without a cache server.
|
||||
- [OpenTelemetry tracing](monitoring.md#opentelemetry-tracing) of jobs and steps, and from `4.1` the Prometheus metrics exported through OpenTelemetry as well.
|
||||
- A Kubernetes backend that runs jobs as pods (`4.1`), see [docs/kubernetes.md](https://gitea.com/gitea/runner/src/branch/main/docs/kubernetes.md).
|
||||
|
||||
@@ -84,7 +84,16 @@ For jobs in containers, give the `gitea-runner` user access to the Docker daemon
|
||||
|
||||
## launchd (macOS)
|
||||
|
||||
Adjust the paths and user for your setup, then save this file as `/Library/LaunchDaemons/com.gitea.runner.plist`:
|
||||
On macOS, run the runner in the login session of the user that jobs should run as. Jobs then have that user's login keychain and the GUI.
|
||||
|
||||
Register the runner as that user, with a [host label](../labels.md) so that jobs run on the Mac itself:
|
||||
|
||||
```bash
|
||||
mkdir ~/gitea-runner && cd ~/gitea-runner
|
||||
gitea-runner register --instance https://gitea.example.com --token <token> --labels macos-latest:host
|
||||
```
|
||||
|
||||
Replace `/Users/gitea-runner` with the user's home directory, then save this file as `~/Library/LaunchAgents/com.gitea.runner.plist`:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -97,22 +106,16 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
|
||||
<array>
|
||||
<string>/usr/local/bin/gitea-runner</string>
|
||||
<string>daemon</string>
|
||||
<string>--config</string>
|
||||
<string>/etc/gitea-runner/config.yaml</string>
|
||||
</array>
|
||||
<key>UserName</key>
|
||||
<string>_gitea-runner</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/var/lib/gitea-runner</string>
|
||||
<string>/Users/gitea-runner/gitea-runner</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/gitea-runner</string>
|
||||
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
||||
</dict>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/var/lib/gitea-runner/runner.log</string>
|
||||
<string>/Users/gitea-runner/gitea-runner/runner.log</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
@@ -121,10 +124,30 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
|
||||
</plist>
|
||||
```
|
||||
|
||||
Start the runner. From now on, it also starts whenever the user logs in:
|
||||
|
||||
```bash
|
||||
sudo launchctl bootstrap system /Library/LaunchDaemons/com.gitea.runner.plist
|
||||
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.gitea.runner.plist
|
||||
```
|
||||
|
||||
Enable automatic login for the user in System Settings, so that the runner starts after a restart too. macOS does not offer automatic login while FileVault is on.
|
||||
|
||||
The runner does not get the environment of your shell. Set what jobs need, such as [proxy settings](../proxy.md), in `EnvironmentVariables`.
|
||||
|
||||
### Local network access
|
||||
|
||||
macOS blocks a runner that was started this way from other hosts on the Mac's own subnet, such as the Gitea instance or a shared cache server. The runner then logs `no route to host`. Commands run in Terminal or over SSH are not blocked, so registering works even when the running runner cannot connect. See [local network privacy](https://developer.apple.com/documentation/technotes/tn3179-understanding-local-network-privacy).
|
||||
|
||||
macOS asks on the Mac's screen whether to allow the access. To allow it without that prompt, exempt the subnet on macOS 15.5 or later and restart the Mac. On Wi-Fi, the key is `AllowedWiFiLocalNetworkAddresses`:
|
||||
|
||||
```bash
|
||||
sudo defaults write com.apple.network.local-network AllowedEthernetLocalNetworkAddresses -array "192.168.1.0/24"
|
||||
```
|
||||
|
||||
### Git credentials
|
||||
|
||||
Git on macOS saves credentials from remote URLs to the keychain, which can stop a job at a dialog that nobody answers. To turn that off, set `GIT_CONFIG_NOSYSTEM` to `1` in `EnvironmentVariables`.
|
||||
|
||||
## Windows
|
||||
|
||||
Run `gitea-runner daemon` with a service wrapper such as [WinSW](https://github.com/winsw/winsw). The runner has no service installer of its own.
|
||||
|
||||
@@ -70,7 +70,7 @@ With `none`, include tools in the job image at `/opt/hostedtoolcache/<tool>/<ver
|
||||
|
||||
## Built-in checkout
|
||||
|
||||
`uses: builtin:checkout` checks out the repository like `actions/checkout`. It does not download an action or require Node in the job image. It runs `git` in the job. See [Requirements](index.md#requirements) and the inputs listed in [builtin-actions.md](https://gitea.com/gitea/runner/src/branch/main/docs/builtin-actions.md).
|
||||
`uses: builtin:checkout` checks out the repository like `actions/checkout`. It does not download an action or require Node in the job image. It runs `git` in the job. See [Requirements](index.md#requirements) and the inputs listed in [builtin-actions.md](https://gitea.com/gitea/runner/src/tag/v5.4.1/docs/builtin-actions.md).
|
||||
|
||||
## Secrets
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ Usage:
|
||||
gitea-runner [command]
|
||||
|
||||
Available Commands:
|
||||
bug-report Print information useful when filing a bug report
|
||||
cache-server Start a cache server for the cache action
|
||||
config Generate, read and edit config files
|
||||
daemon Run as a runner daemon
|
||||
exec Run workflow locally.
|
||||
help Help about any command
|
||||
register Register a runner to the server
|
||||
bug-report Print information useful when filing a bug report
|
||||
cache-server Start a cache server for the cache action
|
||||
config Generate, read and edit config files
|
||||
daemon Run as a runner daemon
|
||||
exec Run workflow locally.
|
||||
help Help about any command
|
||||
register Register a runner to the server
|
||||
|
||||
Flags:
|
||||
-c, --config config Config file path. config subcommands fall back to config.yaml in the working directory or next to the executable
|
||||
|
||||
@@ -57,6 +57,12 @@ runner:
|
||||
# PEM client certificate and key for a Gitea instance that requires mutual TLS.
|
||||
#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 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.
|
||||
#ca_file: /etc/gitea-runner/ca.crt
|
||||
# The timeout for fetching the job from the Gitea instance.
|
||||
# Values above the 60s RPC timeout are capped to it.
|
||||
#fetch_timeout: 5s
|
||||
@@ -219,8 +225,8 @@ cache:
|
||||
# How the cache server discards entries, ignored when external_server or s3 is set since
|
||||
# those apply their own. Leave a setting out for its default; 0s or 0 turns the three
|
||||
# limits off. Sizes accept 10GB, 512mb, 1TiB or a plain byte count, binary either way.
|
||||
# Whatever these allow, the cache still sheds entries to keep free space on its volume
|
||||
# above health_check.min_free_disk_space_mb when health checks are enabled.
|
||||
# Whatever these allow, the cache still sheds entries to keep free space on its volume, room
|
||||
# for uploads included, above health_check.min_free_disk_space_mb when health checks are enabled.
|
||||
# Remove entries nothing has read or written within this window. Only last access counts.
|
||||
#retention: 168h
|
||||
# Cap one repository, removing its least recently accessed entries until it fits. An entry
|
||||
@@ -277,6 +283,15 @@ container:
|
||||
# valid_volumes:
|
||||
# - '**'
|
||||
#valid_volumes: []
|
||||
# Volumes and bind mounts the runner adds to every job, service and docker action container, as in
|
||||
# `docker run --volume`, with sources on the docker daemon's host. One the workflow mounts on the same
|
||||
# container path takes its place. Their sources need no valid_volumes entry, and workflow volumes may
|
||||
# use them only with the same access, though a job given the docker socket can mount anything.
|
||||
# Docker only, use pod_template on Kubernetes. For example, to trust a private CA in Debian and
|
||||
# Ubuntu based images:
|
||||
# volumes:
|
||||
# - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
|
||||
#volumes: []
|
||||
# Overrides the docker client host with the specified one.
|
||||
# If it's empty, runner will find an available docker host automatically.
|
||||
# If it's "-", runner will find an available docker host automatically, but won't mount it into the job and action containers.
|
||||
@@ -304,8 +319,8 @@ container:
|
||||
# healthy. A negative value (e.g. -1s) starts the steps without waiting.
|
||||
#service_ready_timeout: 5m
|
||||
# Remove the containers, networks and volumes a job creates through its Docker proxy when
|
||||
# the job ends. Set to false when jobs deploy services to the runner's Docker daemon.
|
||||
#sweep: true
|
||||
# the job ends. Leave off when jobs deploy services to the runner's Docker daemon.
|
||||
#sweep: false
|
||||
|
||||
host:
|
||||
# The parent directory of a job's working directory.
|
||||
@@ -319,6 +334,18 @@ kubernetes:
|
||||
#pod_template: {}
|
||||
# Pod templates merged over pod_template, in runs-on order, for jobs whose runs-on has the label they are keyed by.
|
||||
#pod_templates: {}
|
||||
# Have job pods fetch directories, such as actions, and copies of 64 KiB or more gzipped from the runner over the pod network,
|
||||
# instead of the runner streaming them through the API server. An init container copies gitea-runner from image into each job pod.
|
||||
# api: through the API server (default). auto: over the pod network, through the API server for a job pod that
|
||||
# cannot reach the runner. direct: over the pod network only, so a broken setup fails jobs instead of quietly
|
||||
# costing API server traffic again.
|
||||
#transfer:
|
||||
# mode: api
|
||||
# # Address and port the runner listens on and job pods reach it at, the outbound IP and a free port when empty.
|
||||
# host: ""
|
||||
# port: 0
|
||||
# # Image with gitea-runner on its PATH, the runner pod's image when it has a single container and runs in namespace.
|
||||
# image: ""
|
||||
|
||||
# Optional local task-admission checks. Disabled by default. When enabled, low
|
||||
# disk space or a failing script pauses new task fetching; existing jobs continue.
|
||||
@@ -328,8 +355,8 @@ health_check:
|
||||
# Minimum free space required on the filesystem holding runner workspaces.
|
||||
# Defaults to 1024 MiB when omitted or set to zero.
|
||||
#min_free_disk_space_mb: 1024
|
||||
# Optional additional executable. A non-zero exit, timeout, or startup failure
|
||||
# marks the runner unavailable.
|
||||
# Optional additional executable, or a .bat or .cmd file on Windows. A non-zero
|
||||
# exit, timeout, or startup failure marks the runner unavailable.
|
||||
#script: ''
|
||||
# How long a script result is cached and its maximum execution time.
|
||||
#interval: 30s
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
"check": "astro check"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "0.42.7",
|
||||
"@astrojs/starlight": "0.42.8",
|
||||
"@astrojs/starlight-docsearch": "0.8.0",
|
||||
"@gitea-docs/content-loader": "workspace:*",
|
||||
"@pagefind/default-ui": "1.5.2",
|
||||
"astro": "7.4.2",
|
||||
"@pagefind/default-ui": "1.6.0",
|
||||
"astro": "7.4.5",
|
||||
"sharp": "0.35.5",
|
||||
"starlight-openapi": "0.27.0"
|
||||
},
|
||||
|
||||
@@ -4596,6 +4596,9 @@
|
||||
"x-go-name": "Path"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"type": "object",
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
@@ -11119,7 +11122,7 @@
|
||||
"url": "http://opensource.org/licenses/MIT"
|
||||
},
|
||||
"title": "Gitea API",
|
||||
"version": "28.3.0"
|
||||
"version": "28.4.0"
|
||||
},
|
||||
"openapi": "3.0.3",
|
||||
"paths": {
|
||||
|
||||
+33
-129
@@ -1375,19 +1375,6 @@
|
||||
},
|
||||
"description": "StopWatchList"
|
||||
},
|
||||
"StringSlice": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "StringSlice"
|
||||
},
|
||||
"Tag": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
@@ -3802,6 +3789,7 @@
|
||||
"x-go-name": "EnableForcePush"
|
||||
},
|
||||
"enable_force_push_allowlist": {
|
||||
"description": "EnableForcePushAllowlist only takes effect when enable_force_push is true",
|
||||
"type": "boolean",
|
||||
"x-go-name": "EnableForcePushAllowlist"
|
||||
},
|
||||
@@ -4589,6 +4577,9 @@
|
||||
"x-go-name": "Path"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"type": "object",
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
@@ -4673,6 +4664,14 @@
|
||||
"type": "boolean",
|
||||
"x-go-name": "IsDraft"
|
||||
},
|
||||
"make_latest": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/MakeLatest"
|
||||
}
|
||||
],
|
||||
"description": "\"true\" sets the release as the latest, \"false\" keeps the current latest, \"legacy\" returns to the newest stable release by date. If omitted, a newly published release becomes the latest only if it is the newest by date"
|
||||
},
|
||||
"name": {
|
||||
"description": "The display title of the release",
|
||||
"type": "string",
|
||||
@@ -5931,6 +5930,14 @@
|
||||
"type": "boolean",
|
||||
"x-go-name": "IsDraft"
|
||||
},
|
||||
"make_latest": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/MakeLatest"
|
||||
}
|
||||
],
|
||||
"description": "\"true\" sets the release as the latest, \"false\" keeps the current latest, \"legacy\" returns to the newest stable release by date. If omitted, a newly published release becomes the latest only if it is the newest by date"
|
||||
},
|
||||
"name": {
|
||||
"description": "The new display title of the release",
|
||||
"type": "string",
|
||||
@@ -7759,6 +7766,14 @@
|
||||
"type": "object",
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
"MakeLatest": {
|
||||
"enum": [
|
||||
"true",
|
||||
"false",
|
||||
"legacy"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"MarkdownOption": {
|
||||
"description": "MarkdownOption markdown options",
|
||||
"properties": {
|
||||
@@ -11986,6 +12001,7 @@
|
||||
"schema": {
|
||||
"enum": [
|
||||
"alpine",
|
||||
"arch",
|
||||
"cargo",
|
||||
"chef",
|
||||
"composer",
|
||||
@@ -12006,6 +12022,7 @@
|
||||
"rubygems",
|
||||
"swift",
|
||||
"terraform",
|
||||
"terraform-module",
|
||||
"vagrant"
|
||||
],
|
||||
"type": "string"
|
||||
@@ -12034,121 +12051,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/unadopted": {
|
||||
"get": {
|
||||
"operationId": "adminUnadoptedList",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "page number of results to return (1-based)",
|
||||
"in": "query",
|
||||
"name": "page",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "page size of results",
|
||||
"in": "query",
|
||||
"name": "limit",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "glob pattern of repositories to search for, in the form owner or owner/repo",
|
||||
"in": "query",
|
||||
"name": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/components/responses/StringSlice"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
},
|
||||
"summary": "List unadopted repositories",
|
||||
"tags": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/unadopted/{owner}/{repo}": {
|
||||
"delete": {
|
||||
"operationId": "adminDeleteUnadoptedRepository",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "owner of the repo",
|
||||
"in": "path",
|
||||
"name": "owner",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "name of the repo",
|
||||
"in": "path",
|
||||
"name": "repo",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/components/responses/empty"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
},
|
||||
"summary": "Delete unadopted files",
|
||||
"tags": [
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "adminAdoptRepository",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "owner of the repo",
|
||||
"in": "path",
|
||||
"name": "owner",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "name of the repo",
|
||||
"in": "path",
|
||||
"name": "repo",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/components/responses/empty"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
},
|
||||
"summary": "Adopt unadopted files as a repository",
|
||||
"tags": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/users": {
|
||||
"get": {
|
||||
"operationId": "adminSearchUsers",
|
||||
@@ -16270,6 +16172,7 @@
|
||||
"schema": {
|
||||
"enum": [
|
||||
"alpine",
|
||||
"arch",
|
||||
"cargo",
|
||||
"chef",
|
||||
"composer",
|
||||
@@ -16290,6 +16193,7 @@
|
||||
"rubygems",
|
||||
"swift",
|
||||
"terraform",
|
||||
"terraform-module",
|
||||
"vagrant"
|
||||
],
|
||||
"type": "string"
|
||||
@@ -30726,7 +30630,7 @@
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
},
|
||||
"summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at",
|
||||
"summary": "Gets the release set as latest, else the most recent non-prerelease, non-draft release of a repository by created_at",
|
||||
"tags": [
|
||||
"repository"
|
||||
]
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"name": "MIT",
|
||||
"url": "http://opensource.org/licenses/MIT"
|
||||
},
|
||||
"version": "28.3.0"
|
||||
"version": "28.4.0"
|
||||
},
|
||||
"basePath": "https://gitea.com/api/v1",
|
||||
"paths": {
|
||||
@@ -27644,6 +27644,9 @@
|
||||
"CreatePullReviewComment": {
|
||||
"description": "CreatePullReviewComment represent a review comment for creation api",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"body": {
|
||||
"type": "string",
|
||||
|
||||
Loaded 50 of 54 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user