mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-03 01:18:52 +00:00
Update zh tw languages and fix some broken links
This commit is contained in:
@@ -47,7 +47,7 @@ Both fields use the same `glob` syntax and match paths relative to the repositor
|
||||
The **Push** section controls direct pushes (including the web editor and API).
|
||||
|
||||
- **Disable push** makes the branch read-only. Any attempt to push directly fails, and changes must be merged through pull requests.
|
||||
- **Enable push** allows anyone with [write access](./permissions.md) to push (force pushes are still blocked unless explicitly allowed).
|
||||
- **Enable push** allows anyone with [write access](permissions) to push (force pushes are still blocked unless explicitly allowed).
|
||||
- **Allowlist restricted push** requires being on the allowlist. Choose users and, for organization-owned repositories, teams. Deploy keys that already have write access can also be allowlisted.
|
||||
|
||||
When a push is blocked, the server-side hook rejects the update with an explanation.
|
||||
|
||||
@@ -59,7 +59,7 @@ If you cannot see the settings page, please make sure that you have the right pe
|
||||
|
||||
The format of the registration token is a random string `D0gvfu2iHfUjNqCYVljVyRV14fISpJxxxxxxxxxx`.
|
||||
|
||||
A registration token can also be obtained from the Gitea [command-line interface](../../administration/command-line.md#actions-generate-runner-token):
|
||||
A registration token can also be obtained from the Gitea [command-line interface](/administration/command-line#actions-generate-runner-token):
|
||||
|
||||
```
|
||||
gitea --config /etc/gitea/app.ini actions generate-runner-token
|
||||
|
||||
@@ -9,7 +9,7 @@ sidebar_position: 30
|
||||
Every Actions job receives a built-in token (`GITEA_TOKEN`) which can be used to access Gitea (Git over HTTP(S), API requests, etc.).
|
||||
This page documents how Gitea decides what the token is allowed to do.
|
||||
|
||||
In workflows, it is available as `${{ secrets.GITEA_TOKEN }}`. These settings and `permissions:` only affect `GITEA_TOKEN` (not other secrets like personal access tokens). For API calls, see [API authentication](../../development/api-usage.md#authentication).
|
||||
In workflows, it is available as `${{ secrets.GITEA_TOKEN }}`. These settings and `permissions:` only affect `GITEA_TOKEN` (not other secrets like personal access tokens). For API calls, see [API authentication](development/api-usage.md).
|
||||
|
||||
## Where permissions come from
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ Sometimes a commit or pull request may fix or bring back a problem documented
|
||||
in a particular issue. Gitea supports closing and reopening the referenced
|
||||
issues by preceding the reference with a particular _keyword_. Common keywords
|
||||
include "closes", "fixes", "reopens", etc. This list can be
|
||||
[customized](../../administration/config-cheat-sheet.md) by the
|
||||
[customized](../../administration/config-cheat-sheet) by the
|
||||
site administrator.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -73,4 +73,4 @@ Example: branch name `fix-user-login-flow` with multiple commits produces the ti
|
||||
|
||||
## Pull Request Templates
|
||||
|
||||
You can find more information about pull request templates at the page [Issue and Pull Request templates](issue-pull-request-templates.md).
|
||||
You can find more information about pull request templates at the page [Issue and Pull Request templates](issue-pull-request-templates).
|
||||
|
||||
@@ -28,7 +28,7 @@ https://gitea.example.com/api/packages/{owner}/alpine/<branch>/<repository>
|
||||
| `branch` | The branch to use. |
|
||||
| `repository` | The repository to use. |
|
||||
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication):
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md):
|
||||
|
||||
```
|
||||
https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/alpine/<branch>/<repository>
|
||||
@@ -68,7 +68,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/alpine/v3.17/main
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
You cannot publish a file with the same name twice to a package. You must delete the existing package file first.
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Server = https://gitea.example.com/api/packages/{owner}/arch/$repo/$arch
|
||||
|
||||
Consult the owners package overview to see what `repository` and `architecture` is available.
|
||||
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication):
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md):
|
||||
|
||||
```
|
||||
[{repository}]
|
||||
@@ -77,7 +77,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/arch/core
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
You cannot publish a file with the same name twice to a package. You must delete the existing package file first.
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ token = "Bearer {token}"
|
||||
|
||||
| Parameter | Description |
|
||||
| --------- | ----------- |
|
||||
| `token` | Your [personal access token](development/api-usage.md#authentication) |
|
||||
| `token` | Your [personal access token](development/api-usage.md) |
|
||||
|
||||
## Git vs Sparse
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/composer?version=1.0.3
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
The server responds with the following HTTP Status codes.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ conan remote login {remote} {username} --password {password}
|
||||
| -----------| ----------- |
|
||||
| `remote` | The remote name. |
|
||||
| `username` | Your Gitea username. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password. |
|
||||
| `owner` | The owner of the package. |
|
||||
|
||||
For example:
|
||||
|
||||
@@ -54,7 +54,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/conda/package-1.0.conda
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ To push an image or if the image is in a private registry, you have to authentic
|
||||
docker login gitea.example.com
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
## Image naming convention
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/cran/bin?platform=windows&rversion=4.2
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ echo "deb [signed-by=/etc/apt/keyrings/gitea-{owner}.asc] https://gitea.example.
|
||||
| `distribution` | The distribution to use. |
|
||||
| `component` | The component to use. |
|
||||
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication):
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md):
|
||||
|
||||
```shell
|
||||
echo "deb [signed-by=/etc/apt/keyrings/gitea-{owner}.asc] https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list
|
||||
@@ -68,7 +68,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/debian/pool/bionic/main/upload
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
You cannot publish a package if a package of the same name, version, distribution, component and architecture already exists. You must delete the existing package first.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Publish generic files, like release binaries or other output, for your user or o
|
||||
|
||||
## Authenticate to the package registry
|
||||
|
||||
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md#authentication).
|
||||
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md).
|
||||
|
||||
## Publish a package
|
||||
|
||||
@@ -36,7 +36,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
The server responds with the following HTTP Status codes.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ PUT https://gitea.example.com/api/packages/{owner}/go/upload
|
||||
| --------- | ----------- |
|
||||
| `owner` | The owner of the package. |
|
||||
|
||||
To authenticate to the package registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md#authentication):
|
||||
To authenticate to the package registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md):
|
||||
|
||||
```shell
|
||||
curl --user your_username:your_password_or_token \
|
||||
@@ -30,7 +30,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/go/upload
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ helm cm-push ./{chart_file}.tgz {repo}
|
||||
| Parameter | Description |
|
||||
| ------------ | ----------- |
|
||||
| `username` | Your Gitea username. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password. |
|
||||
| `repo` | The name for the repository. |
|
||||
| `chart_file` | The Helm Chart archive. |
|
||||
| `owner` | The owner of the package. |
|
||||
|
||||
@@ -58,7 +58,7 @@ Afterwards add the following sections to your project `pom.xml` file:
|
||||
|
||||
| Parameter | Description |
|
||||
| -------------- | ----------- |
|
||||
| `access_token` | Your [personal access token](development/api-usage.md#authentication). |
|
||||
| `access_token` | Your [personal access token](development/api-usage.md). |
|
||||
| `owner` | The owner of the package. |
|
||||
|
||||
### Gradle variant
|
||||
|
||||
@@ -29,7 +29,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
|
||||
| ------------ | ----------- |
|
||||
| `scope` | The scope of the packages. |
|
||||
| `owner` | The owner of the package. |
|
||||
| `token` | Your [personal access token](development/api-usage.md#authentication). With `package` permissions. |
|
||||
| `token` | Your [personal access token](development/api-usage.md). With `package` permissions. |
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p
|
||||
| ------------- | ----------- |
|
||||
| `source_name` | The desired source name. |
|
||||
| `username` | Your Gitea username. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password. |
|
||||
| `owner` | The owner of the package. |
|
||||
|
||||
For example:
|
||||
@@ -35,7 +35,7 @@ For example:
|
||||
dotnet nuget add source --name gitea --username testuser --password password123 https://gitea.example.com/api/packages/testuser/nuget/index.json
|
||||
```
|
||||
|
||||
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token](development/api-usage.md#authentication).
|
||||
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token](development/api-usage.md).
|
||||
|
||||
## Publish a package
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ and shows a link to the repository on the package site (as well as a link to the
|
||||
| **read** access | public, if user is public too; otherwise for this user only | public, if org is public, otherwise for org members only |
|
||||
| **write** access | owner only | org members with admin or write access to the org |
|
||||
|
||||
Please note, that your respective package manager needs to have a [personal access token](development/api-usage.md#authentication) with the permissions `package` set to either Read or Read & Write to download and publish packages respectively.
|
||||
Please note, that your respective package manager needs to have a [personal access token](development/api-usage.md) with the permissions `package` set to either Read or Read & Write to download and publish packages respectively.
|
||||
|
||||
N.B.: These access restrictions are [subject to change](https://github.com/go-gitea/gitea/issues/19270), where more finegrained control will be added via a dedicated organization team permission.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ dart pub token add https://gitea.example.com/api/packages/{owner}/pub
|
||||
| ------------ | ----------- |
|
||||
| `owner` | The owner of the package. |
|
||||
|
||||
You need to provide your [personal access token](development/api-usage.md#authentication).
|
||||
You need to provide your [personal access token](development/api-usage.md).
|
||||
|
||||
## Publish a package
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ password = {password}
|
||||
| ------------ | ----------- |
|
||||
| `owner` | The owner of the package. |
|
||||
| `username` | Your Gitea username. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password. |
|
||||
|
||||
## Publish a package
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ dnf config-manager --add-repo https://gitea.example.com/api/packages/testuser/rp
|
||||
dnf config-manager --add-repo https://gitea.example.com/api/packages/testuser/rpm/centos/el7.repo
|
||||
```
|
||||
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication):
|
||||
If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md):
|
||||
|
||||
```shell
|
||||
dnf config-manager --add-repo https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/rpm/{group}.repo
|
||||
@@ -72,7 +72,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/rpm/centos/el7/upload
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
You cannot publish a file with the same name twice to a package. You must delete the existing package version first.
|
||||
|
||||
The server responds with the following HTTP Status codes.
|
||||
|
||||
@@ -24,7 +24,7 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token}
|
||||
| Parameter | Description |
|
||||
| ------------- | ----------- |
|
||||
| `owner` | The owner of the package. |
|
||||
| `token` | Your [personal access token](development/api-usage.md#authentication). |
|
||||
| `token` | Your [personal access token](development/api-usage.md). |
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ swift package-registry login https://gitea.example.com/api/packages/{owner}/swif
|
||||
| ------------ | ----------- |
|
||||
| `owner` | The owner of the package. |
|
||||
| `username` | Your Gitea username. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password. |
|
||||
|
||||
The login is optional and only needed if the package registry is private.
|
||||
|
||||
@@ -50,7 +50,7 @@ curl -X PUT --user {username}:{password} \
|
||||
| Placeholder | Description |
|
||||
| ----------- | ----------- |
|
||||
| `username` | Your Gitea username. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. |
|
||||
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password. |
|
||||
| `owner` | The owner of the package. |
|
||||
| `scope` | The package scope. |
|
||||
| `name` | The package name. |
|
||||
|
||||
@@ -35,9 +35,9 @@ terraform {
|
||||
| `owner` | The owner of the state (user or organization). |
|
||||
| `name` | The name of the state. |
|
||||
| `username` | Your Gitea username. |
|
||||
| `password` | Your Gitea password or [personal access token](development/api-usage.md#authentication). |
|
||||
| `password` | Your Gitea password or [personal access token](development/api-usage.md). |
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
## Initialize the backend
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ curl --user your_username:your_password_or_token \
|
||||
https://gitea.example.com/api/packages/testuser/vagrant/test_system/1.0.0/hyperv.box
|
||||
```
|
||||
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password.
|
||||
If you are using 2FA or OAuth use a [personal access token](development/api-usage.md) instead of the password.
|
||||
|
||||
You cannot publish a box if a box of the same name, version and provider already exists. You must delete the existing package first.
|
||||
|
||||
@@ -67,7 +67,7 @@ vagrant box add "https://gitea.example.com/api/packages/testuser/vagrant/test_sy
|
||||
```
|
||||
|
||||
This will install the latest version of the package. To add a specific version, use the `--box-version` parameter.
|
||||
If the registry is private you can pass your [personal access token](development/api-usage.md#authentication) in the `VAGRANT_CLOUD_TOKEN` environment variable.
|
||||
If the registry is private you can pass your [personal access token](development/api-usage.md) in the `VAGRANT_CLOUD_TOKEN` environment variable.
|
||||
|
||||
## Supported commands
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ Push to create is a feature that allows you to push to a repository that does no
|
||||
|
||||
### Enabling Push To Create
|
||||
|
||||
In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#repository-repository).
|
||||
In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](../../administration/config-cheat-sheet#repository-repository).
|
||||
|
||||
### Using Push To Create
|
||||
|
||||
|
||||
Reference in New Issue
Block a user