Skip to content

Commit 0ebacf5

Browse files
authored
Merge branch 'main' into lunny/fix_html_render
2 parents f18f472 + 72b1fd7 commit 0ebacf5

File tree

76 files changed

+2286
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2286
-529
lines changed

custom/conf/app.example.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ USER = root
313313
;DB_TYPE = sqlite3
314314
;PATH= ; defaults to data/gitea.db
315315
;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
316+
;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
316317
;;
317318
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
318319
;;
@@ -878,6 +879,9 @@ ROUTER = console
878879
;; Allow deletion of unadopted repositories
879880
;ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false
880881

882+
;; Don't allow download source archive files from UI
883+
;DISABLE_DOWNLOAD_SOURCE_ARCHIVES = false
884+
881885
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
882886
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
883887
;[repository.editor]

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
7878
- `DEFAULT_BRANCH`: **main**: Default branch name of all repositories.
7979
- `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: Allow non-admin users to adopt unadopted repositories
8080
- `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: Allow non-admin users to delete unadopted repositories
81+
- `DISABLE_DOWNLOAD_SOURCE_ARCHIVES`: **false**: Don't allow download source archive files from UI
8182

8283
### Repository - Editor (`repository.editor`)
8384

@@ -382,6 +383,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
382383
- `verify-ca`: Enable TLS with verification of the database server certificate against its root certificate.
383384
- `verify-full`: Enable TLS and verify the database server name matches the given certificate in either the `Common Name` or `Subject Alternative Name` fields.
384385
- `SQLITE_TIMEOUT`: **500**: Query timeout for SQLite3 only.
386+
- `SQLITE_JOURNAL_MODE`: **""**: Change journal mode for SQlite3. Can be used to enable [WAL mode](https://www.sqlite.org/wal.html) when high load causes write congestion. See [SQlite3 docs](https://www.sqlite.org/pragma.html#pragma_journal_mode) for possible values. Defaults to the default for the database file, often DELETE.
385387
- `ITERATE_BUFFER_SIZE`: **50**: Internal buffer size for iterating.
386388
- `CHARSET`: **utf8mb4**: For MySQL only, either "utf8" or "utf8mb4". NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this.
387389
- `PATH`: **data/gitea.db**: For SQLite3 only, the database file path.

docs/content/doc/installation/with-docker.zh-cn.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ volumes:
301301
sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key"
302302
```
303303

304-
在下一步中,需要在主机上创建一个名为 `/user/local/bin/gitea` 的文件(具有可执行权限)。该文件将发出从主机到容器的 SSH 转发。将以下内容添加到 `/user/local/bin/gitea`
304+
在下一步中,需要在主机上创建一个名为 `/usr/local/bin/gitea` 的文件(具有可执行权限)。该文件将发出从主机到容器的 SSH 转发。将以下内容添加到 `/usr/local/bin/gitea`
305305

306306
```bash
307307
ssh -p 2222 -o StrictHostKeyChecking=no [email protected] "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
@@ -324,14 +324,14 @@ ports:
324324
ssh-rsa <Gitea Host Key>
325325

326326
# other keys from users
327-
command="/user/local/bin/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty <user pubkey>
327+
command="/usr/local/bin/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty <user pubkey>
328328
```
329329

330330
这是详细的说明,当发出 SSH 请求时会发生什么:
331331

332332
1. 使用 `git` 用户向主机发出 SSH 请求,例如 `git clone git@domain:user/repo.git`
333-
2.`/home/git/.ssh/authorized_keys` 中,该命令执行 `/user/local/bin/gitea` 脚本。
334-
3. `/user/local/bin/gitea` 将 SSH 请求转发到端口 2222,该端口已映射到容器的 SSH 端口(22)。
333+
2.`/home/git/.ssh/authorized_keys` 中,该命令执行 `/usr/local/bin/gitea` 脚本。
334+
3. `/usr/local/bin/gitea` 将 SSH 请求转发到端口 2222,该端口已映射到容器的 SSH 端口(22)。
335335
4. 由于 `/home/git/.ssh/authorized_keys` 中存在 `git` 用户的公钥,因此身份验证主机 → 容器成功,并且 SSH 请求转发到在 docker 容器中运行的 Gitea。
336336

337337
如果在 Gitea Web 界面中添加了新的 SSH 密钥,它将以与现有密钥相同的方式附加到 `.ssh/authorized_keys` 中。

docs/content/doc/packages/composer.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ curl --user your_username:your_password_or_token \
6060
https://gitea.example.com/api/packages/testuser/composer?version=1.0.3
6161
```
6262

63+
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
64+
6365
The server responds with the following HTTP Status codes.
6466

6567
| HTTP Status Code | Meaning |

docs/content/doc/packages/conan.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ conan user --remote {remote} --password {password} {username}
3737
| -----------| ----------- |
3838
| `remote` | The remote name. |
3939
| `username` | Your Gitea username. |
40-
| `password` | Your Gitea password or a personal access token. |
40+
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
4141
| `owner` | The owner of the package. |
4242

4343
For example:

docs/content/doc/packages/container.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ To push an image or if the image is in a private registry, you have to authentic
3434
docker login gitea.example.com
3535
```
3636

37+
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
38+
3739
## Image naming convention
3840

3941
Images must follow this naming convention:

docs/content/doc/packages/generic.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ curl --user your_username:your_password_or_token \
4848
https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin
4949
```
5050

51+
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
52+
5153
The server reponds with the following HTTP Status codes.
5254

5355
| HTTP Status Code | Meaning |

docs/content/doc/packages/helm.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ helm cm-push ./{chart_file}.tgz {repo}
4242
| Parameter | Description |
4343
| ------------ | ----------- |
4444
| `username` | Your Gitea username. |
45-
| `password` | Your Gitea password or a personal access token. |
45+
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
4646
| `repo` | The name for the repository. |
4747
| `chart_file` | The Helm Chart archive. |
4848
| `owner` | The owner of the package. |

docs/content/doc/packages/nuget.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p
3838
| ------------- | ----------- |
3939
| `source_name` | The desired source name. |
4040
| `username` | Your Gitea username. |
41-
| `password` | Your Gitea password or a personal access token. |
41+
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
4242
| `owner` | The owner of the package. |
4343

4444
For example:

docs/content/doc/packages/pypi.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ password = {password}
4242
| ------------ | ----------- |
4343
| `owner` | The owner of the package. |
4444
| `username` | Your Gitea username. |
45-
| `password` | Your Gitea password or a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
45+
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
4646

4747
## Publish a package
4848

0 commit comments

Comments
 (0)