mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
[docs] Add zh-tw Translations (#14507)
This commit is contained in:
13
docs/content/doc/advanced.zh-tw.md
Normal file
13
docs/content/doc/advanced.zh-tw.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
date: "2016-12-01T16:00:00+02:00"
|
||||
title: "進階"
|
||||
slug: "advanced"
|
||||
weight: 30
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
name: "進階"
|
||||
weight: 40
|
||||
identifier: "advanced"
|
||||
---
|
13
docs/content/doc/developers.zh-tw.md
Normal file
13
docs/content/doc/developers.zh-tw.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
date: "2016-12-01T16:00:00+02:00"
|
||||
title: "開發人員"
|
||||
slug: "developers"
|
||||
weight: 40
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
name: "開發人員"
|
||||
weight: 50
|
||||
identifier: "developers"
|
||||
---
|
22
docs/content/doc/developers/integrations.zh-tw.md
Normal file
22
docs/content/doc/developers/integrations.zh-tw.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
date: "2019-04-15T17:29:00+08:00"
|
||||
title: "整合"
|
||||
slug: "integrations"
|
||||
weight: 40
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "developers"
|
||||
name: "整合"
|
||||
weight: 65
|
||||
identifier: "integrations"
|
||||
---
|
||||
|
||||
# 整合
|
||||
|
||||
Gitea 有著很棒的第三方整合社群, 以及其它有著一流支援的專案。
|
||||
|
||||
我們持續的整理一份清單以追蹤他們!請到 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 查看。
|
||||
|
||||
如果您正在找尋有關 [CI/CD](https://gitea.com/gitea/awesome-gitea#devops)、[SDK](https://gitea.com/gitea/awesome-gitea#sdk) 或是其它佈景主題,您可以在存儲庫 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 找到他們。
|
39
docs/content/doc/developers/migrations.zh-tw.md
Normal file
39
docs/content/doc/developers/migrations.zh-tw.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
date: "2019-04-15T17:29:00+08:00"
|
||||
title: "遷移介面"
|
||||
slug: "migrations-interfaces"
|
||||
weight: 30
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "developers"
|
||||
name: "遷移介面"
|
||||
weight: 55
|
||||
identifier: "migrations-interfaces"
|
||||
---
|
||||
|
||||
# 遷移功能
|
||||
|
||||
完整的遷移從 Gitea 1.9.0 開始提供。它定義了兩個介面用來從其它 Git 託管平臺遷移儲存庫資料到 Gitea,未來或許會提供遷移到其它 git 託管平臺。
|
||||
目前已實作了從 Github, Gitlab 和其它 Gitea 遷移資料。
|
||||
|
||||
Gitea 定義了一些基本物件於套件 [modules/migrations/base](https://github.com/go-gitea/gitea/tree/master/modules/migrations/base)。
|
||||
分別是 `Repository`, `Milestone`, `Release`, `ReleaseAsset`, `Label`, `Issue`, `Comment`, `PullRequest`, `Reaction`, `Review`, `ReviewComment`。
|
||||
|
||||
## Downloader 介面
|
||||
|
||||
從新的 Git 託管平臺遷移,有兩個新的步驟。
|
||||
|
||||
- 您必須實作一個 `Downloader`,它用來取得儲存庫資訊。
|
||||
- 您必須實作一個 `DownloaderFactory`,它用來偵測 URL 是否符合並建立上述的 `Downloader`。
|
||||
- 您需要在 `init()` 透過 `RegisterDownloaderFactory` 來註冊 `DownloaderFactory`。
|
||||
|
||||
您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/downloader.go) 中找到這些介面。
|
||||
|
||||
## Uploader 介面
|
||||
|
||||
目前只有 `GiteaLocalUploader` 被實作出來,所以我們只能通過 `Uploader` 儲存已下載的資料到本地的 Gitea 實例。
|
||||
目前尚未支援其它 Uploader。
|
||||
|
||||
您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/uploader.go) 中找到這些介面。
|
96
docs/content/doc/developers/oauth2-provider.zh-tw.md
Normal file
96
docs/content/doc/developers/oauth2-provider.zh-tw.md
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
date: "2019-04-19:44:00+01:00"
|
||||
title: "OAuth2 提供者"
|
||||
slug: "oauth2-provider"
|
||||
weight: 41
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "developers"
|
||||
name: "OAuth2 提供者"
|
||||
weight: 41
|
||||
identifier: "oauth2-provider"
|
||||
---
|
||||
|
||||
# OAuth2 提供者
|
||||
|
||||
**目錄**
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意下存取 Gitea 的資源。此功能自 1.8.0 版開始提供。
|
||||
|
||||
## Endpoint
|
||||
|
||||
| Endpoint | URL |
|
||||
| ---------------------- | --------------------------- |
|
||||
| Authorization Endpoint | `/login/oauth/authorize` |
|
||||
| Access Token Endpoint | `/login/oauth/access_token` |
|
||||
|
||||
## 支援的 OAuth2 Grant
|
||||
|
||||
目前 Gitea 只支援 [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) 標準並額外支援下列擴充標準:
|
||||
|
||||
- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
|
||||
- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
|
||||
|
||||
若想要讓第三方程式使用 Authorization Code Grant,需先在「設定」(`/user/settings/applications`)中註冊一個新的應用程式。
|
||||
|
||||
## Scope
|
||||
|
||||
目前 Gitea 尚未支援 scope (參見 [#4300](https://github.com/go-gitea/gitea/issues/4300)),所有的第三方程式都可獲得該使用者及他所屬的組織中所有資源的存取權。
|
||||
|
||||
## 範例
|
||||
|
||||
**備註:** 此範例未使用 PKCE。
|
||||
|
||||
1. 重新導向使用者到 authorization endpoint 以獲得他同意授權存取資源:
|
||||
<!-- 1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources: -->
|
||||
|
||||
```curl
|
||||
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
|
||||
```
|
||||
|
||||
在設定中註冊應用程式以獲得 `CLIENT_ID`。`STATE` 是一個隨機的字串,它將在使用者授權後發送回您的應用程式。`state` 參數是選用的,但應該要用它來防止 CSRF 攻擊。
|
||||
|
||||

|
||||
|
||||
使用者將會被詢問是否授權給您的應用程式。如果它們同意了,使用者將被重新導向到 `REDIRECT_URL`,例如:
|
||||
|
||||
```curl
|
||||
https://[REDIRECT_URI]?code=RETURNED_CODE&state=STATE
|
||||
```
|
||||
|
||||
1. 使用重新導向提供的 `code`,您可以要求一個新的應用程式和 Refresh Token。Access Token Endpoint 接受 POST 請求使用 `application/json` 或 `application/x-www-form-urlencoded` 類型的請求內容,例如:
|
||||
|
||||
```curl
|
||||
POST https://[YOUR-GITEA-URL]/login/oauth/access_token
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"client_id": "YOUR_CLIENT_ID",
|
||||
"client_secret": "YOUR_CLIENT_SECRET",
|
||||
"code": "RETURNED_CODE",
|
||||
"grant_type": "authorization_code",
|
||||
"redirect_uri": "REDIRECT_URI"
|
||||
}
|
||||
```
|
||||
|
||||
回應:
|
||||
|
||||
```json
|
||||
{
|
||||
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjowLCJleHAiOjE1NTUxNzk5MTIsImlhdCI6MTU1NTE3NjMxMn0.0-iFsAwBtxuckA0sNZ6QpBQmywVPz129u75vOM7wPJecw5wqGyBkmstfJHAjEOqrAf_V5Z-1QYeCh_Cz4RiKug",
|
||||
"token_type": "bearer",
|
||||
"expires_in": 3600,
|
||||
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjoxLCJjbnQiOjEsImV4cCI6MTU1NzgwNDMxMiwiaWF0IjoxNTU1MTc2MzEyfQ.S_HZQBy4q9r5SEzNGNIoFClT43HPNDbUdHH-GYNYYdkRfft6XptJBkUQscZsGxOW975Yk6RbgtGvq1nkEcklOw"
|
||||
}
|
||||
```
|
||||
|
||||
`CLIENT_SECRET` 是產生給此應用程式的唯一密鑰。請記住該密鑰只會在您於 Gitea 建立/註冊應用程式時出現一次。若您遺失密鑰,您必須在該應用程式的設定中重新產生密鑰。
|
||||
|
||||
`access_token` 請求中的 `REDIRECT_URI` 必須符合 `authorize` 請求中的 `REDIRECT_URI`。
|
||||
|
||||
1. 發送 [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) 時使用 `access_token` 以存取使用者的資源。
|
131
docs/content/doc/features/comparison.zh-tw.md
Normal file
131
docs/content/doc/features/comparison.zh-tw.md
Normal file
@@ -0,0 +1,131 @@
|
||||
---
|
||||
date: "2018-05-07T13:00:00+02:00"
|
||||
title: "比較 Gitea 和其它自託管 Git 服務"
|
||||
slug: "comparison"
|
||||
weight: 5
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "features"
|
||||
name: "比較"
|
||||
weight: 5
|
||||
identifier: "comparison"
|
||||
---
|
||||
|
||||
# 比較 Gitea 和其它自託管 Git 服務
|
||||
|
||||
**目錄**
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
為了幫助您判斷 Gitea 是否適合您的需求,這裡列出了它和其它自託管 Git 服務的比較。
|
||||
|
||||
請注意我們不會經常檢查其它產品的功能異動,所以這份清單可能過期,如果您在下方表格中找到需要更新的資料,請在 [GitHub 的 Issue](https://github.com/go-gitea/gitea/issues) 回報。
|
||||
|
||||
表格中使用的符號:
|
||||
|
||||
- ✓ - 支援
|
||||
|
||||
- ⁄ - 有限度的支援
|
||||
|
||||
- ✘ - 不支援
|
||||
|
||||
## 一般功能
|
||||
|
||||
| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||
| ------------------------ | -------------------------------------------------- | ---- | --------- | --------- | --------- | --------- | ------------ |
|
||||
| 免費及開放原始碼 | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ |
|
||||
| 低資源使用 (RAM/CPU) | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
||||
| 支援多種資料庫 | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ |
|
||||
| 支援多種作業系統 | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ |
|
||||
| 簡單的升級程序 | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
||||
| 支援 Markdown | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 支援 Orgmode | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? |
|
||||
| 支援 CSV | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? |
|
||||
| 支援第三方渲染工具 | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? |
|
||||
| Git 驅動的靜態頁面 | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| Git 驅動的整合 wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 部署 Token | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 有寫入權限的儲存庫 Token | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ |
|
||||
| 內建 Container Registry | [✘](https://github.com/go-gitea/gitea/issues/2316) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 對外部 Git 鏡像 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||
| FIDO U2F (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 內建 CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 子群組: 群組中的群組 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
||||
|
||||
## 程式碼管理
|
||||
|
||||
| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||
| ----------------------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ |
|
||||
| 儲存庫主題描述 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 儲存庫程式碼搜尋 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 全域程式碼搜尋 | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ |
|
||||
| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ⁄ | ✓ |
|
||||
| 群組里程碑 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 精細的使用者權限(程式碼, 問題, Wiki 等) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 驗證提交者 | ⁄ | ✘ | ? | ✓ | ✓ | ✓ | ✘ |
|
||||
| GPG 簽署提交 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 拒絕未經簽署的提交 | [✓](https://github.com/go-gitea/gitea/pull/9708) | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ |
|
||||
| 儲存庫動態頁 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 分支管理 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 建立新分支 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 網頁程式碼編輯器 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 提交線圖 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 儲存庫範本 | [✓](https://github.com/go-gitea/gitea/pull/8768) | ✘ | ✓ | ✘ | ✓ | ✓ | ✘ |
|
||||
|
||||
## 問題追蹤器
|
||||
|
||||
| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||
| -------------------- | -------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------------------------------------------------- | --------- | --------- | ------------ |
|
||||
| 問題追蹤器 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 問題範本 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 標籤 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 時間追蹤 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 指派問題給多個成員 | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ |
|
||||
| 相關問題 | ✘ | ✘ | ⁄ | [✓](https://docs.gitlab.com/ce/user/project/issues/related_issues.html) | ✓ | ✘ | ✘ |
|
||||
| 機密問題 | [✘](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 對留言的反應 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 鎖定對話 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 批次處理問題 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 問題看板(看板方法) | [✓](https://github.com/go-gitea/gitea/pull/8346) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 從問題建立新分支 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 問題搜尋 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 全域問題搜尋 | [✘](https://github.com/go-gitea/gitea/issues/2434) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 問題相依 | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
||||
| 從電子郵件建立問題 | [✘](https://github.com/go-gitea/gitea/issues/6226) | [✘](https://github.com/gogs/gogs/issues/2602) | ✘ | ✘ | ✓ | ✓ | ✘ |
|
||||
| 服務台 | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | [✓](https://gitlab.com/groups/gitlab-org/-/epics/3103) | ✓ | ✘ | ✘ |
|
||||
|
||||
## 拉取/合併請求
|
||||
|
||||
| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||
| -------------------------- | -------------------------------------------------- | ---- | --------- | --------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------ | ------------ |
|
||||
| 拉取/合併請求 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| Squash 合併 | ✓ | ✘ | ✓ | [✓](https://docs.gitlab.com/ce/user/project/merge_requests/squash_and_merge.html) | ✓ | ✓ | ✓ |
|
||||
| Rebase 合併 | ✓ | ✓ | ✓ | ✘ | ⁄ | ✘ | ✓ |
|
||||
| 拉取/合併請求的行內留言 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 拉取/合併請求的核可 | ✓ | ✘ | ⁄ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 解決合併衝突 | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 限制某些使用者的推送及合併 | ✓ | ✘ | ✓ | ⁄ | ✓ | ✓ | ✓ |
|
||||
| 還原指定的提交或合併請求 | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 拉取/合併請求範本 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| Cherry-picking 變更 | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 下載 Patch | ✓ | ✘ | ✓ | ✓ | ✓ | [/](https://jira.atlassian.com/plugins/servlet/mobile#issue/BCLOUD-8323) | ✘ |
|
||||
|
||||
## 第三方整合
|
||||
|
||||
| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||
| ------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ |
|
||||
| 支援 Webhook | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 自訂 Git Hook | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 整合 AD / LDAP | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 支援多重 LDAP / AD 伺服器 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||
| 同步 LDAP 使用者 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| 支援 OpenId Connect | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ |
|
||||
| 整合 OAuth 2.0 (外部驗證) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ |
|
||||
| 成為 OAuth 2.0 提供者 | [✓](https://github.com/go-gitea/gitea/pull/5378) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 兩步驟驗證 (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 整合 Mattermost/Slack | ✓ | ✓ | ⁄ | ✓ | ✓ | ⁄ | ✓ |
|
||||
| 整合 Discord | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||
| 整合 Microsoft Teams | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||
| 顯示外部 CI/CD 狀態 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
@@ -13,6 +13,18 @@ menu:
|
||||
identifier: "localization"
|
||||
---
|
||||
|
||||
# Localization
|
||||
# 在地化
|
||||
|
||||
## TBD
|
||||
我們在 [Crowdin 專案](https://crowdin.com/project/gitea)上進行在地化工作。
|
||||
|
||||
**英語系**的翻譯,可在修改[英文語言檔](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)後提出合併請求。
|
||||
|
||||
**非英語系**的翻譯,請前往上述的 Crowdin 專案。
|
||||
|
||||
## 已支援的語言
|
||||
|
||||
上述 Crowdin 專案中列出的語言在翻譯超過 25% 後將被支援。
|
||||
|
||||
翻譯被認可後將在下次 Crowdin 同步後進入到主儲存庫,通常是在任何合併請求被合併之後。
|
||||
這表示更改的翻譯要到下次 Gitea 發佈後才會出現。
|
||||
如果您使用的是最新建置,它將會在同步完成、您更新後出現。
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
date: "2016-12-01T16:00:00+02:00"
|
||||
title: "Webhooks"
|
||||
title: "Webhook"
|
||||
slug: "webhooks"
|
||||
weight: 10
|
||||
toc: false
|
||||
@@ -8,11 +8,179 @@ draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "features"
|
||||
name: "Webhooks"
|
||||
name: "Webhook"
|
||||
weight: 30
|
||||
identifier: "webhooks"
|
||||
---
|
||||
|
||||
# Webhooks
|
||||
# Webhook
|
||||
|
||||
## TBD
|
||||
Gitea 的儲存庫事件支援 web hook。這可以有儲存庫管理員在設定頁 `/:username/:reponame/settings/hooks` 中調整。Webhook 也可以按照組織調整或按照全系統調整。
|
||||
所有的事件推送都是 POST 請求。此方法目前被下列服務支援:
|
||||
|
||||
- Gitea (也可以是 GET 請求)
|
||||
- Gogs
|
||||
- Slack
|
||||
- Discord
|
||||
- Dingtalk
|
||||
- Telegram
|
||||
- Microsoft Teams
|
||||
- Feishu
|
||||
|
||||
### 事件資訊
|
||||
|
||||
**警告**: Payload 中的 `secret` 欄位已經在 Gitea 1.13.0 棄用,並且將在 1.14.0 移除: https://github.com/go-gitea/gitea/issues/11755
|
||||
|
||||
下面是一個將由 Gitea 發送到 Payload URL 的事件資訊的範例:
|
||||
|
||||
```
|
||||
X-GitHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
|
||||
X-GitHub-Event: push
|
||||
X-Gogs-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
|
||||
X-Gogs-Event: push
|
||||
X-Gitea-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
|
||||
X-Gitea-Event: push
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"secret": "3gEsCfjlV2ugRwgpU#w1*WaW*wa4NXgGmpCfkbG3",
|
||||
"ref": "refs/heads/develop",
|
||||
"before": "28e1879d029cb852e4844d9c718537df08844e03",
|
||||
"after": "bffeb74224043ba2feb48d137756c8a9331c449a",
|
||||
"compare_url": "http://localhost:3000/gitea/webhooks/compare/28e1879d029cb852e4844d9c718537df08844e03...bffeb74224043ba2feb48d137756c8a9331c449a",
|
||||
"commits": [
|
||||
{
|
||||
"id": "bffeb74224043ba2feb48d137756c8a9331c449a",
|
||||
"message": "Webhooks Yay!",
|
||||
"url": "http://localhost:3000/gitea/webhooks/commit/bffeb74224043ba2feb48d137756c8a9331c449a",
|
||||
"author": {
|
||||
"name": "Gitea",
|
||||
"email": "someone@gitea.io",
|
||||
"username": "gitea"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Gitea",
|
||||
"email": "someone@gitea.io",
|
||||
"username": "gitea"
|
||||
},
|
||||
"timestamp": "2017-03-13T13:52:11-04:00"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"id": 140,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"login": "gitea",
|
||||
"full_name": "Gitea",
|
||||
"email": "someone@gitea.io",
|
||||
"avatar_url": "https://localhost:3000/avatars/1",
|
||||
"username": "gitea"
|
||||
},
|
||||
"name": "webhooks",
|
||||
"full_name": "gitea/webhooks",
|
||||
"description": "",
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"html_url": "http://localhost:3000/gitea/webhooks",
|
||||
"ssh_url": "ssh://gitea@localhost:2222/gitea/webhooks.git",
|
||||
"clone_url": "http://localhost:3000/gitea/webhooks.git",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 1,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 7,
|
||||
"default_branch": "master",
|
||||
"created_at": "2017-02-26T04:29:06-05:00",
|
||||
"updated_at": "2017-03-13T13:51:58-04:00"
|
||||
},
|
||||
"pusher": {
|
||||
"id": 1,
|
||||
"login": "gitea",
|
||||
"full_name": "Gitea",
|
||||
"email": "someone@gitea.io",
|
||||
"avatar_url": "https://localhost:3000/avatars/1",
|
||||
"username": "gitea"
|
||||
},
|
||||
"sender": {
|
||||
"id": 1,
|
||||
"login": "gitea",
|
||||
"full_name": "Gitea",
|
||||
"email": "someone@gitea.io",
|
||||
"avatar_url": "https://localhost:3000/avatars/1",
|
||||
"username": "gitea"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 範例
|
||||
|
||||
此範例示範在發生推送事件時,如何使用 webhook 觸發 php 程式。
|
||||
使用下列參數在您的儲存庫設定 Webhook 中建立一個 Gitea webhook:
|
||||
|
||||
- 目標 URL: http://mydomain.com/webhook.php
|
||||
- HTTP 請求方法:POST
|
||||
- POST Content Type:application/json
|
||||
- Secret:123
|
||||
- 觸發條件:推送事件
|
||||
- 啟用:勾選
|
||||
|
||||
現在請到您的伺服器上建立 webhook.php 檔案
|
||||
|
||||
```
|
||||
<?php
|
||||
|
||||
$secret_key = '123';
|
||||
|
||||
// check for POST request
|
||||
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
||||
error_log('FAILED - not POST - '. $_SERVER['REQUEST_METHOD']);
|
||||
exit();
|
||||
}
|
||||
|
||||
// get content type
|
||||
$content_type = isset($_SERVER['CONTENT_TYPE']) ? strtolower(trim($_SERVER['CONTENT_TYPE'])) : '';
|
||||
|
||||
if ($content_type != 'application/json') {
|
||||
error_log('FAILED - not application/json - '. $content_type);
|
||||
exit();
|
||||
}
|
||||
|
||||
// get payload
|
||||
$payload = trim(file_get_contents("php://input"));
|
||||
|
||||
if (empty($payload)) {
|
||||
error_log('FAILED - no payload');
|
||||
exit();
|
||||
}
|
||||
|
||||
// get header signature
|
||||
$header_signature = isset($_SERVER['HTTP_X_GITEA_SIGNATURE']) ? $_SERVER['HTTP_X_GITEA_SIGNATURE'] : '';
|
||||
|
||||
if (empty($header_signature)) {
|
||||
error_log('FAILED - header signature missing');
|
||||
exit();
|
||||
}
|
||||
|
||||
// calculate payload signature
|
||||
$payload_signature = hash_hmac('sha256', $payload, $secret_key, false);
|
||||
|
||||
// check payload signature against header signature
|
||||
if ($header_signature !== $payload_signature) {
|
||||
error_log('FAILED - payload signature');
|
||||
exit();
|
||||
}
|
||||
|
||||
// convert json to array
|
||||
$decoded = json_decode($payload, true);
|
||||
|
||||
// check for json decode errors
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
error_log('FAILED - json decode - '. json_last_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
// success, do something
|
||||
```
|
||||
|
||||
Webhook 設定中有一個傳送測試資料按鈕,它可讓你測試您的設定並將結果顯示於最近傳送記錄。
|
||||
|
@@ -1,13 +1,13 @@
|
||||
---
|
||||
date: "2017-01-20T15:00:00+08:00"
|
||||
title: "救命"
|
||||
title: "幫助"
|
||||
slug: "help"
|
||||
weight: 5
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
name: "救命"
|
||||
name: "幫助"
|
||||
weight: 5
|
||||
identifier: "help"
|
||||
---
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
date: "2019-11-12T16:00:00+02:00"
|
||||
title: "搜索"
|
||||
title: "搜尋"
|
||||
slug: "search"
|
||||
weight: 4
|
||||
toc: false
|
||||
@@ -8,7 +8,7 @@ draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "help"
|
||||
name: "搜索"
|
||||
name: "搜尋"
|
||||
weight: 4
|
||||
identifier: "search"
|
||||
sitemap:
|
||||
|
31
docs/content/doc/help/seek-help.zh-tw.md
Normal file
31
docs/content/doc/help/seek-help.zh-tw.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
date: "2018-05-21T15:00:00+00:00"
|
||||
title: "取得協助"
|
||||
slug: "seek-help"
|
||||
weight: 10
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "help"
|
||||
name: "取得協助"
|
||||
weight: 20
|
||||
identifier: "seek-help"
|
||||
---
|
||||
|
||||
# 取得協助
|
||||
|
||||
- [Discord 聊天室](https://discord.gg/Gitea)
|
||||
- [Discourse 討論區](https://discourse.gitea.io/)
|
||||
|
||||
**備註:** 尋求支援時,若能先備妥下列資訊將可讓提供協助的人能快速地分析您的問題:
|
||||
|
||||
1. 您的 `app.ini` (必要時清除掉任何機密資訊)
|
||||
2. `gitea.log` (以及任何有關的日誌檔案)
|
||||
* 例:如果錯誤和資料庫相關,提供 `xorm.log` 可能會有幫助
|
||||
3. 您看到的任何錯誤訊息
|
||||
5. 儘可能地在 [try.gitea.io](https://try.gitea.io) 觸發您的問題並記下步驟,以便其他人能重現那個問題。
|
||||
* 這將讓我們更有機會快速地找出問題的根源並解決它。
|
||||
|
||||
## 錯誤回報
|
||||
如果您發現錯誤,請到 [Github 的 Issue](https://github.com/go-gitea/gitea/issues) 回報。
|
27
docs/content/doc/installation/on-kubernetes.zh-tw.md
Normal file
27
docs/content/doc/installation/on-kubernetes.zh-tw.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
date: "2020-03-19T19:27:00+02:00"
|
||||
title: "在 Kubernetes 安裝"
|
||||
slug: "install-on-kubernetes"
|
||||
weight: 10
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "installation"
|
||||
name: "Kubernetes"
|
||||
weight: 50
|
||||
identifier: "install-on-kubernetes"
|
||||
---
|
||||
|
||||
# 使用 Helm 安裝 (在 Kubernetes)
|
||||
|
||||
Gitea 提供 Helm Chart 用來安裝於 kubernetes。
|
||||
|
||||
非自訂安裝可使用下列指令:
|
||||
|
||||
```
|
||||
helm repo add gitea-charts https://dl.gitea.io/charts/
|
||||
helm install gitea gitea-charts/gitea
|
||||
```
|
||||
|
||||
若您想自訂安裝(包括使用 kubernetes ingress),請前往完整的 [Gitea helm chart configuration details](https://gitea.com/gitea/helm-chart/)
|
@@ -0,0 +1,71 @@
|
||||
---
|
||||
date: "2017-07-21T12:00:00+02:00"
|
||||
title: "在 Linux 中以服務執行"
|
||||
slug: "linux-service"
|
||||
weight: 10
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "installation"
|
||||
name: "Linux 服務"
|
||||
weight: 20
|
||||
identifier: "linux-service"
|
||||
---
|
||||
|
||||
### 以 Linux 服務執行 Gitea
|
||||
|
||||
您可使用 systemd 或 supervisor 以服務的方式執行 Gitea。下列步驟已在 Ubuntu 16.04 中測試,但它們應該適用於所有的 Linux 發行版(只需要一些小小的調整)。
|
||||
|
||||
#### 使用 systemd
|
||||
|
||||
複製範例 [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service) 到 `/etc/systemd/system/gitea.service` 後用您喜愛的文字編輯器開啟檔案。
|
||||
|
||||
取消註解任何需要在此系統上啟動的服務像是 MySQL。
|
||||
|
||||
修改 user, home directory 和其它必要的啟動參數。若預設埠已被占用請修改埠號或移除「-p」旗標。
|
||||
|
||||
在系統啟動時啟用並執行 Gitea:
|
||||
|
||||
```
|
||||
sudo systemctl enable gitea
|
||||
sudo systemctl start gitea
|
||||
```
|
||||
|
||||
若您使用 systemd 220 或更新版本,您能以一行指令啟動並立即執行 Gitea:
|
||||
|
||||
```
|
||||
sudo systemctl enable gitea --now
|
||||
```
|
||||
|
||||
#### 使用 supervisor
|
||||
|
||||
在終端機使用下列指令安裝 supervisor:
|
||||
|
||||
```
|
||||
sudo apt install supervisor
|
||||
```
|
||||
|
||||
為 supervisor 建立 log 資料夾:
|
||||
|
||||
```
|
||||
# assuming Gitea is installed in /home/git/gitea/
|
||||
mkdir /home/git/gitea/log/supervisor
|
||||
```
|
||||
|
||||
附加範例 [supervisord config](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea) 的設定值到 `/etc/supervisor/supervisord.conf`。
|
||||
|
||||
用您喜愛的文字編輯器修改使用者(git)和家目錄(/home/git)設定以符合部署環境。若預設埠已被占用請修改埠號或移除「-p」旗標。
|
||||
|
||||
最後設定在系統啟動時啟用並執行 supervisor:
|
||||
|
||||
```
|
||||
sudo systemctl enable supervisor
|
||||
sudo systemctl start supervisor
|
||||
```
|
||||
|
||||
若您使用 systemd 220 或更新版本,您能以一行指令啟動並立即執行 supervisor:
|
||||
|
||||
```
|
||||
sudo systemctl enable supervisor --now
|
||||
```
|
@@ -13,22 +13,43 @@ menu:
|
||||
identifier: "windows-service"
|
||||
---
|
||||
|
||||
# 註冊為 Windows 服務
|
||||
# 事前準備
|
||||
|
||||
要註冊為 Windows 服務,首先要以管理者身份執行 `cmd`,跳出命令列視窗後執行底下指令:
|
||||
確認您的 C:\gitea\custom\conf\app.ini 中包含:
|
||||
|
||||
```
|
||||
sc create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\""
|
||||
RUN_USER = COMPUTERNAME$
|
||||
```
|
||||
|
||||
設定 Gitea 以本地使用者身份執行。
|
||||
|
||||
請將在命令提示字元(cmd)執行 `echo %COMPUTERNAME%` 的結果輸入 `COMPUTERNAME`。若回應為 `USER-PC`,請輸入 `RUN_USER = USER-PC$`
|
||||
|
||||
## 使用絕對路徑
|
||||
|
||||
如果您使用 sqlite3,修改 `PATH` 為完整路徑:
|
||||
|
||||
```
|
||||
[database]
|
||||
PATH = c:/gitea/data/gitea.db
|
||||
```
|
||||
|
||||
# 註冊為 Windows 服務
|
||||
|
||||
要註冊為 Windows 服務,請先以系統管理員身份開啟命令提示字元,接著執行下列指令:
|
||||
|
||||
```
|
||||
sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\""
|
||||
```
|
||||
|
||||
別忘記將 `C:\gitea` 取代為您的 Gitea 安裝路徑。
|
||||
|
||||
之後打開 "Windows Services",並且搜尋服務名稱 "gitea",按右鍵選擇 "Run"。在瀏覽器打開 `http://localhost:3000` 就可以成功看到畫面 (如果修改過連接埠,請自行修正,3000 是預設值)。
|
||||
開啟 Windows 的「服務」,並且搜尋服務名稱「gitea」,按右鍵選擇「啟動」。在瀏覽器打開 `http://localhost:3000` 就可以成功看到畫面 (如果修改過連接埠,請自行修正,3000 是預設值)。
|
||||
|
||||
## 刪除服務
|
||||
|
||||
要刪除 Gitea 服務,請用管理者身份執行 `cmd` 並且執行底下指令:
|
||||
要刪除 Gitea 服務,請用系統管理員身份開啟命令提示字元,接著執行下列指令:
|
||||
|
||||
```
|
||||
sc delete gitea
|
||||
sc.exe delete gitea
|
||||
```
|
||||
|
13
docs/content/doc/translation.zh-tw.md
Normal file
13
docs/content/doc/translation.zh-tw.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
date: "2021-01-22T00:00:00+02:00"
|
||||
title: "翻譯"
|
||||
slug: "translation"
|
||||
weight: 35
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
name: "翻譯"
|
||||
weight: 45
|
||||
identifier: "translation"
|
||||
---
|
@@ -8,19 +8,100 @@ draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "upgrade"
|
||||
name: "從 Gogs 升級"
|
||||
name: "從 Gogs"
|
||||
weight: 10
|
||||
identifier: "upgrade-from-gogs"
|
||||
---
|
||||
|
||||
# 從 Gogs 升級
|
||||
|
||||
假如您正在運行 Gogs 0.9.146 以下版本,你可以很平順的升級到 Gitea,請參考底下升級步驟:
|
||||
**目錄**
|
||||
|
||||
* 停止 Gogs 服務。
|
||||
* 複製 Gogs 設定檔 `custom/conf/app.ini` 到 Gitea 相對應位置。
|
||||
* 複製 Gogs `conf/` 目錄到 Gitea `options/` 目錄。
|
||||
* 假如您還有更多自訂的檔案在 `custom/` 目錄,像是多國語系檔案或模板,你應該手動將設定轉移到 Gitea 上,因為這些檔案在 Gitea 上有些不同。
|
||||
* 複製 `data/` 目錄到 Gitea 相對應目錄,此目錄包含 issue 附件檔及頭像。
|
||||
* 啟動 Gitea 服務
|
||||
* 進入 Gitea 管理介面,執行 `重新產生 '.ssh/authorized_keys' 檔案` (警告: 非 Gitea 金鑰將被刪除) 和 `重新產生全部倉庫 update hook` (當自訂設定檔已經被修改,則需要此步驟)。
|
||||
{{< toc >}}
|
||||
|
||||
若您正在執行 Gogs 0.9.146 以下版本,您可以很簡單地遷移到 Gitea。
|
||||
|
||||
請參考下列步驟。在 Linux 系統上請以 Gogs 的使用者身份執行:
|
||||
|
||||
- 使用 `gogs backup` 建立 Gogs 的備份。這會建立檔案 `gogs-backup-[timestamp].zip` 包含所有重要的 Gogs 資料。
|
||||
如果稍後您要恢復到 `gogs` 時會用到它。
|
||||
- 從[下載頁](https://dl.gitea.io/gitea/)下載對應您平臺的檔案。請下載 `1.0.x` 版,從 `gogs` 遷移到其它版本是不可行的。
|
||||
- 將二進位檔放到適當的安裝位置。
|
||||
- 複製 `gogs/custom/conf/app.ini` 到 `gitea/custom/conf/app.ini`。
|
||||
- 從 `gogs/custom/` 複製自訂 `templates, public` 到 `gitea/custom/`。
|
||||
- `gogs/custom/conf` 中的其它自訂資料夾如: `gitignore, label, license, locale, readme`,
|
||||
請複製到 `gitea/custom/options`。
|
||||
- 複製 `gogs/data/` 到 `gitea/data/`。它包含了問題附件和大頭貼。
|
||||
- 以指令 `gitea web` 啟動 Gitea 驗證上列設定是否正確。
|
||||
- 從網頁 UI 進入 Gitea 管理員面板, 執行 `Rewrite '.ssh/authorized_keys' file`。
|
||||
- 執行每個主要版本的二進位檔 ( `1.1.4` → `1.2.3` → `1.3.4` → `1.4.2` → 等等 ) 以遷移資料庫。
|
||||
- 如果變更了自訂檔、設定檔路徑,請執行 `Rewrite all update hook of repositories`。
|
||||
|
||||
## 修改指定的 gogs 資訊
|
||||
|
||||
- 重新命名 `gogs-repositories/` 為 `gitea-repositories/`
|
||||
- 重新命名 `gogs-data/` 為 `gitea-data/`
|
||||
- 在 `gitea/custom/conf/app.ini` 中修改:
|
||||
|
||||
修改前:
|
||||
|
||||
```ini
|
||||
[database]
|
||||
PATH = /home/:USER/gogs/data/:DATABASE.db
|
||||
[attachment]
|
||||
PATH = /home/:USER/gogs-data/attachments
|
||||
[picture]
|
||||
AVATAR_UPLOAD_PATH = /home/:USER/gogs-data/avatars
|
||||
[log]
|
||||
ROOT_PATH = /home/:USER/gogs/log
|
||||
```
|
||||
|
||||
修改後:
|
||||
|
||||
```ini
|
||||
[database]
|
||||
PATH = /home/:USER/gitea/data/:DATABASE.db
|
||||
[attachment]
|
||||
PATH = /home/:USER/gitea-data/attachments
|
||||
[picture]
|
||||
AVATAR_UPLOAD_PATH = /home/:USER/gitea-data/avatars
|
||||
[log]
|
||||
ROOT_PATH = /home/:USER/gitea/log
|
||||
```
|
||||
|
||||
- 執行 `gitea web` 啟動 Gitea 檢查是否正確執行
|
||||
|
||||
## 升級到最新版的 `gitea`
|
||||
|
||||
成功從 `gogs` 升級到 `gitea 1.0.x` 後再用 2 個步驟即可升級到最新版的 `gitea`。
|
||||
|
||||
請先升級到 [`gitea 1.6.4`](https://dl.gitea.io/gitea/1.6.4/),先從[下載頁](https://dl.gitea.io/gitea/1.6.4/)下載
|
||||
您平臺的二進位檔取代既有的。至少執行一次 Gitea 並確認一切符合預期。
|
||||
|
||||
接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.io/gitea/{{< version >}}/)。
|
||||
|
||||
## 從更新版本的 Gogs 升級
|
||||
|
||||
您也可以從更新版本的 Gogs 升級,但需要更多步驟。
|
||||
請參考 [#4286](https://github.com/go-gitea/gitea/issues/4286)。
|
||||
|
||||
## 疑難排解
|
||||
|
||||
- 如果錯誤和 `gitea/custom/templates` 中 的自訂樣板有關,請試著逐一移除它們。
|
||||
它們可能和 Gitea 或更新不相容。
|
||||
|
||||
## 在 Unix 啟動時執行 Gitea
|
||||
|
||||
從 [gitea/contrib](https://github.com/go-gitea/gitea/tree/master/contrib) 更新必要的檔案以取得正確的環境變數。
|
||||
|
||||
使用 systemd 的發行版:
|
||||
|
||||
- 複製新的腳本到 `/etc/systemd/system/gitea.service`
|
||||
- 啟動系統時執行服務: `sudo systemctl enable gitea`
|
||||
- 停用舊的 gogs 腳本: `sudo systemctl disable gogs`
|
||||
|
||||
使用 SysVinit 的發行版:
|
||||
|
||||
- 複製新的腳本到 `/etc/init.d/gitea`
|
||||
- 啟動系統時執行服務: `sudo rc-update add gitea`
|
||||
- 停用舊的 gogs 腳本: `sudo rc-update del gogs`
|
||||
|
13
docs/content/doc/usage.zh-tw.md
Normal file
13
docs/content/doc/usage.zh-tw.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
date: "2016-12-27T16:00:00+02:00"
|
||||
title: "使用"
|
||||
slug: "usage"
|
||||
weight: 35
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
name: "使用"
|
||||
weight: 35
|
||||
identifier: "usage"
|
||||
---
|
32
docs/content/doc/usage/pull-request.zh-tw.md
Normal file
32
docs/content/doc/usage/pull-request.zh-tw.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
date: "2018-06-01T19:00:00+02:00"
|
||||
title: "使用: 合併請求"
|
||||
slug: "pull-request"
|
||||
weight: 13
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
name: "合併請求"
|
||||
weight: 13
|
||||
identifier: "pull-request"
|
||||
---
|
||||
|
||||
# 合併請求
|
||||
|
||||
## 「還在進行中(WIP)」的合併請求
|
||||
|
||||
將合併請求標記為還在進行中(Work In Progress, WIP)可避免意外地被合併。
|
||||
要將合併請求標記為還在進行中請在標題中使用 `WIP:` 或 `[WIP]` 前綴(不分大小寫)。這些值可在您的 `app.ini` 中設定:
|
||||
|
||||
```ini
|
||||
[repository.pull-request]
|
||||
WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP]
|
||||
```
|
||||
|
||||
網頁提示會使用第一個值作為範例。
|
||||
|
||||
## 合併請求範本
|
||||
|
||||
您可以在[問題與合併請求範本](../issue-pull-request-templates)找到更多關於合併請求範本的資訊。
|
31
docs/content/doc/usage/push-options.zh-tw.md
Normal file
31
docs/content/doc/usage/push-options.zh-tw.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
date: "2020-07-06T16:00:00+02:00"
|
||||
title: "使用: Push Options"
|
||||
slug: "push-options"
|
||||
weight: 15
|
||||
toc: false
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
name: "Push Options"
|
||||
weight: 15
|
||||
identifier: "push-options"
|
||||
---
|
||||
|
||||
# Push Options
|
||||
|
||||
Gitea 從 `1.13` 版開始支援某些 [push options](https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt)
|
||||
。
|
||||
|
||||
## 支援的 Options
|
||||
|
||||
- `repo.private` (true|false) - 修改儲存庫的可見性。
|
||||
與 push-to-create 一起使用時特別有用。
|
||||
- `repo.template` (true|false) - 修改儲存庫是否為範本儲存庫。
|
||||
|
||||
以下範例修改儲存庫的可見性為公開:
|
||||
|
||||
```shell
|
||||
git push -o repo.private=false -u origin master
|
||||
```
|
Reference in New Issue
Block a user