Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaoffical/main'
Browse files Browse the repository at this point in the history
* giteaoffical/main:
  Fix wrong redirect on org labels (go-gitea#18128)
  Fix performance regression when user has many organization (go-gitea#18125)
  docs: add various ways to install from package (go-gitea#18120)
  Removed unused method. (go-gitea#18129)
  [skip ci] Updated translations via Crowdin
  Removed unused endpoint. (go-gitea#18127)
  • Loading branch information
zjjhot committed Dec 30, 2021
2 parents 35d46ca + 67d7ad6 commit f8dd227
Show file tree
Hide file tree
Showing 28 changed files with 105 additions and 124 deletions.
85 changes: 78 additions & 7 deletions docs/content/doc/installation/from-package.zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,108 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "选择包安装"
title: "使用包管理器安装"
slug: "install-from-package"
weight: 10
toc: false
draft: false
menu:
sidebar:
parent: "installation"
name: "选择包安装"
name: "使用包管理器安装"
weight: 20
identifier: "install-from-package"
---

# 使用包安装
# 使用包管理器安装

## Linux
**目录**

目前还没有对应的Linux安装包发布,如果我们发布了,我们将更新本页面。当前你可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。
{{< toc >}}

## Alpine Linux

Gitea 已经包含在 Alpine Linux 的[社区存储库](https://pkgs.alpinelinux.org/packages?name=gitea&branch=edge)中,版本与 Gitea 官方保持同步。

```sh
apk add gitea
```

## Arch Linux

Gitea 已经在滚动发布发行版的官方[社区存储库](https://www.archlinux.org/packages/community/x86_64/gitea/)中,版本与 Gitea 官方保持同步。

```sh
pacman -S gitea
```

## Arch Linux ARM

官方支持 [aarch64](https://archlinuxarm.org/packages/aarch64/gitea)[armv7h](https://archlinuxarm.org/packages/armv7h/gitea)[armv6h](https://archlinuxarm.org/packages/armv6h/gitea) 架构。

```sh
pacman -S gitea
```

## Canonical Snap

目前 Gitea 已在 Snap Store 中发布,名称为 [gitea](https://snapcraft.io/gitea)

```sh
snap install gitea
```

## SUSE/openSUSE

OpenSUSE 构建服务为 [openSUSE 和 SLE](https://software.opensuse.org/download/package?package=gitea&project=devel%3Atools%3Ascm)
提供包,你可以在开发软件配置管理存储库中找到它们。

## Windows

目前还没有对应的Windows安装包发布,如果我们发布了,我们将更新本页面。我们计划使用 `MSI` 安装器或者 [Chocolatey](https://chocolatey.org/)来制作安装包。当前你可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。
目前你可以通过 [Chocolatey](https://chocolatey.org/) 来安装 [Gitea](https://chocolatey.org/packages/gitea)

```sh
choco install gitea
```

你也可以 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}}) 。

## macOS

macOS 平台下当前我们仅支持通过 `brew` 来安装。如果您没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:

```
brew tap go-gitea/gitea
brew install gitea
```

## FreeBSD

可以使用 Gitea 的 FreeBSD port `www/gitea`。 请安装预构建的二进制包:

```
pkg install gitea
```

对于最新版本,或使用自定义选项构建 port,请
[从 port 安装](https://www.freebsd.org/doc/handbook/ports-using.html)

```
su -
cd /usr/ports/www/gitea
make install clean
```

该 port 使用标准的 FreeBSD 文件系统布局:配置文件在 `/usr/local/etc/gitea` 目录中,
模板、选项、插件和主题在 `/usr/local/share/gitea` 目录中,启动脚本在 `/usr/local/etc/rc.d/gitea` 目录中。

要使 Gitea 作为服务运行,请运行 `sysrc gitea_enable=YES` 并使用 `service gitea start` 命令启动它。

## 第三方

如果这里没有找到你喜欢的包管理器,可以使用 Gitea 第三方软件包。这里有一个完整的列表: [awesome-gitea](https://gitea.com/gitea/awesome-gitea/src/branch/master/README.md#user-content-packages)

如果你知道其他 Gitea 第三方软件包,请发送 PR 来添加它。

## 需要帮助?

如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
30 changes: 18 additions & 12 deletions models/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,33 +294,39 @@ func CanUserForkRepo(user *user_model.User, repo *repo_model.Repository) (bool,
return false, nil
}

// FindUserOrgForks returns the forked repositories for one user from a repository
func FindUserOrgForks(repoID, userID int64) ([]*repo_model.Repository, error) {
var cond builder.Cond = builder.And(
builder.Eq{"fork_id": repoID},
builder.In("owner_id",
builder.Select("org_id").
From("org_user").
Where(builder.Eq{"uid": userID}),
),
)

var repos []*repo_model.Repository
return repos, db.GetEngine(db.DefaultContext).Table("repository").Where(cond).Find(&repos)
}

// GetForksByUserAndOrgs return forked repos of the user and owned orgs
func GetForksByUserAndOrgs(user *user_model.User, repo *repo_model.Repository) ([]*repo_model.Repository, error) {
var repoList []*repo_model.Repository
if user == nil {
return repoList, nil
}
var forkedRepo *repo_model.Repository
forkedRepo, err := repo_model.GetUserFork(repo.ID, user.ID)
if err != nil {
return repoList, err
}
if forkedRepo != nil {
repoList = append(repoList, forkedRepo)
}
canCreateRepos, err := GetOrgsCanCreateRepoByUserID(user.ID)
orgForks, err := FindUserOrgForks(repo.ID, user.ID)
if err != nil {
return repoList, err
}
for _, org := range canCreateRepos {
forkedRepo, err := repo_model.GetUserFork(repo.ID, org.ID)
if err != nil {
return repoList, err
}
if forkedRepo != nil {
repoList = append(repoList, forkedRepo)
}
return nil, err
}
repoList = append(repoList, orgForks...)
return repoList, nil
}

Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_cs-CZ.ini
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ error404=Stránka, kterou se snažíte zobrazit, buď <strong>neexistuje</strong
never=Nikdy

[error]
occurred=Nastala chyba
report_message=Pokud jste si jisti, že se jedná o chybu Gitea, prosím vyhledejte problém na <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> a v případě potřeby otevřete nový problém.
missing_csrf=Špatný požadavek: Neexistuje CSRF token
invalid_csrf=Špatný požadavek: Neplatný CSRF token

[startpage]
app_desc=Snadno přístupný vlastní Git
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_de-DE.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=Die Seite, die du gerade versuchst aufzurufen, <strong>existiert entwed
never=Niemals

[error]
occurred=Ein Fehler ist aufgetreten
report_message=Wenn du dir sicher bist, dass dies ein Gitea-Fehler ist, suche bitte auf <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> nach diesem Fehler und erstelle gegebenenfalls einen neuen Bugreport.
missing_csrf=Fehlerhafte Anfrage: Kein CSRF Token verfügbar
invalid_csrf=Fehlerhafte Anfrage: Ungültiger CSRF Token

[startpage]
app_desc=Ein einfacher, selbst gehosteter Git-Service
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_el-GR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=Η σελίδα που προσπαθείτε να φτάσετε εί
never=Ποτέ

[error]
occurred=Παρουσιάστηκε ένα σφάλμα
report_message=Αν είστε σίγουροι ότι πρόκειται για σφάλμα Gitea, παρακαλούμε αναζητήστε το ζήτημα στο <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> και ανοίξτε νέο ζήτημα εάν είναι απαραίτητο.
missing_csrf=Bad Request: δεν υπάρχει διακριτικό CSRF
invalid_csrf=Bad Request: Άκυρο διακριτικό CSRF

[startpage]
app_desc=Μια ανώδυνη, αυτο-φιλοξενούμενη υπηρεσία Git
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_es-ES.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=La página a la que está intentando acceder o <strong>no existe</stron
never=Nunca

[error]
occurred=Se ha producido un error
report_message=Si estás seguro de que este es un error de Gitea, por favor busca un problema en <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> y abre un nuevo problema si es necesario.
missing_csrf=Solicitud incorrecta: sin token CSRF
invalid_csrf=Solicitud incorrecta: el token CSRF no es válido

[startpage]
app_desc=Un servicio de Git autoalojado y sin complicaciones
Expand Down
2 changes: 0 additions & 2 deletions options/locale/locale_fa-IR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ error404=صفحه موردنظر شما یا <strong>وجود ندارد</strong


[error]
occurred=خطایی رخ داده است
report_message=اگر شما مطمئن هستیند این مشکل مربوط به یک باگ در Gitea است، لطفا در <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> مشکل را جستجو کنید و در صورت نیاز، یک موضوع جدید باز کنید.

[startpage]
app_desc=یک سرویس گیت بی‌درد سر و راحت
Expand Down
1 change: 0 additions & 1 deletion options/locale/locale_fi-FI.ini
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ error404=Sivu, jota yrität nähdä, joko <strong>ei löydy</strong> tai <strong


[error]
occurred=Tapahtui virhe

[startpage]
app_desc=Kivuton, itsehostattu Git-palvelu
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_fr-FR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ error404=La page que vous essayez d'atteindre <strong>n'existe pas</strong> ou <
never=Jamais

[error]
occurred=Une erreur est survenue
report_message=Si vous êtes sûr qu'il s'agit d'un bug de Gitea, cherchez s’il existe un ticket sur <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> et ouvrez-en un nouveau si nécessaire.
missing_csrf=Requête incorrecte: aucun jeton CSRF présent
invalid_csrf=Requête incorrecte: jeton CSRF invalide

[startpage]
app_desc=Un service Git auto-hébergé sans prise de tête
Expand Down
2 changes: 0 additions & 2 deletions options/locale/locale_hu-HU.ini
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ error404=Az elérni kívánt oldal vagy <strong>nem létezik</strong>, vagy <str


[error]
occurred=Probléma lépett fel
report_message=Ha biztos benne, hogy ez egy Gitea hiba, keressen a problémára a <a href="https://github.com/go-gitea/gitea/issues">GitHub-on</a> és hozzon létre új hibajelentést, ha szükséges.

[startpage]
app_desc=Fájdalommentes, saját gépre telepíthető Git szolgáltatás
Expand Down
2 changes: 0 additions & 2 deletions options/locale/locale_it-IT.ini
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ error404=La pagina che stai cercando di raggiungere <strong>non esiste</strong>
[error]
occurred=Si è verificato un errore
report_message=Se sei sicuro che sia un bug di Gitea, cerca il problema su <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> e apri una nuova segnalazione se necessario.
[startpage]
app_desc=Un servizio auto-ospitato per Git pronto all'uso
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_ja-JP.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=アクセスしようとしたページは<strong>存在しない</stro
never=無し

[error]
occurred=エラーが発生しました
report_message=Giteaのバグが疑われる場合は、<a href="https://github.com/go-gitea/gitea/issues">GitHub</a>でIssueを検索して、見つからなければ新しいIssueを作成してください。
missing_csrf=不正なリクエスト: CSRFトークンが不明です
invalid_csrf=不正なリクエスト: CSRFトークンが無効です

[startpage]
app_desc=自分で立てる、超簡単 Git サービス
Expand Down
1 change: 0 additions & 1 deletion options/locale/locale_ko-KR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ loading=불러오는 중...


[error]
occurred=오류가 발생했습니다

[startpage]
app_desc=편리한 설치형 Git 서비스
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_lv-LV.ini
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ error404=Lapa, ko vēlaties atvērt, <strong>neeksistē</strong> vai arī <stron
never=Nekad

[error]
occurred=Radusies kļūda
report_message=Ja esat drošs, ka šī ir Gitea kļūda, pirms ziņošanas <a href="https://github.com/go-gitea/gitea/issues">Gitea problēmās</a> pārliecinieties, ka lietojat jaunāko Gitea versiju un par šādu kļūdu jau nav ziņots.
missing_csrf=Kļūdains pieprasījums: netika saņemts drošības talons
invalid_csrf=Kļūdains pieprasījums: iesūtīts kļūdains drošības talons

[startpage]
app_desc=Viegli uzstādāms Git serviss
Expand Down
2 changes: 0 additions & 2 deletions options/locale/locale_nl-NL.ini
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ error404=De pagina die u probeert te bereiken <strong>bestaat niet</strong> of <
never=Nooit

[error]
occurred=Er is een fout opgetreden
report_message=Als je zeker weet dat dit een Gitea bug is, zoek dan naar een issue op <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> en open zo nodig een nieuw issue.
missing_csrf=Foutief verzoek: geen CSRF-token aanwezig

[startpage]
Expand Down
2 changes: 0 additions & 2 deletions options/locale/locale_pl-PL.ini
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ error404=Strona, do której próbujesz dotrzeć <strong>nie istnieje</strong> lu


[error]
occurred=Wystąpił błąd
report_message=Jeśli jesteś pewien, że jest to błąd w Gitea, poszukaj problemu na <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> i w razie potrzeby otwórz nowe zgłoszenie.

[startpage]
app_desc=Bezbolesna usługa Git na własnym serwerze
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_pt-BR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=A página que você está tentando acessar <strong>não existe</strong>
never=Nunca

[error]
occurred=Ocorreu um erro
report_message=Se você tem certeza de que se trata de um bug do Gitea, por favor, procure a issue no <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> e abra novas issues se necessário.
missing_csrf=Pedido inválido: não tem token CSRF presente
invalid_csrf=Pedido inválido: token CSRF inválido

[startpage]
app_desc=Um serviço de hospedagem Git amigável
Expand Down
4 changes: 3 additions & 1 deletion options/locale/locale_pt-PT.ini
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ never=Nunca

[error]
occurred=Ocorreu um erro
report_message=Se tiver certeza de que se trata de um erro do Gitea, por favor, procure a questão no <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> e abra uma nova questão, se necessário.
report_message=Se tiver certeza de que se trata de um erro do Gitea, procure, por favor, questões relacionadas no <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> ou abra uma nova questão, se necessário.
missing_csrf=Pedido inválido: não há código CSRF
invalid_csrf=Pedido inválido: código CSRF inválido
not_found=Não foi possível encontrar o destino.
network_error=Erro de rede

[startpage]
app_desc=Um serviço Git auto-hospedado e fácil de usar
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_ru-RU.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=Страница, которую вы пытаетесь открыть
never=Никогда

[error]
occurred=Произошла ошибка
report_message=Если вы уверены, что это ошибка Gitea, пожалуйста, проверьте наличие существующей проблемы на <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> и откройте новую при необходимости.
missing_csrf=Некорректный запрос: CSRF токен отсутствует
invalid_csrf=Неверный запрос: неверный CSRF токен

[startpage]
app_desc=Удобный сервис собственного хостинга репозиториев Git
Expand Down
2 changes: 0 additions & 2 deletions options/locale/locale_sv-SE.ini
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ error404=Sidan du försöker nå <strong>finns inte</strong> eller så <strong>h


[error]
occurred=Ett fel har inträffat
report_message=Om du är säker på att detta är en Gitea bugg, vänligen sök efter ärende på <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> och öppna nytt ärende om det behövs.

[startpage]
app_desc=En smidig, självhostad Git-tjänst
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_tr-TR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=Ulaşmaya çalıştığınız sayfa <strong>mevcut değil</strong> veya
never=Asla

[error]
occurred=Bir hata oluştu
report_message=Bunun bir Gitea hatası olduğundan eminseniz, lütfen <a href="https://github.com/go-gitea/gitea/issues"> GitHub </a> 'da sorunu arayın ve gerekirse yeni bir sorun açın.
missing_csrf=Hatalı İstek: CSRF anahtarı yok
invalid_csrf=Hatalı İstek: Geçersiz CSRF anahtarı

[startpage]
app_desc=Zahmetsiz, kendi sunucunuzda barındırabileceğiniz Git servisi
Expand Down
2 changes: 0 additions & 2 deletions options/locale/locale_uk-UA.ini
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ error404=Сторінка, до якої ви намагаєтеся зверн
never=Ніколи
[error]
occurred=Сталася помилка
report_message=Якщо ви впевнені, що це помилка Gitea, будь ласка, спробуйте відшукати відповідну проблему на <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> та за відсутності створіть нову.
[startpage]
app_desc=Зручний власний сервіс хостингу репозиторіїв Git
Expand Down
3 changes: 0 additions & 3 deletions options/locale/locale_zh-CN.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ error404=您正尝试访问的页面 <strong>不存在</strong> 或 <strong>您
never=从不

[error]
occurred=发生错误
report_message=如果您确定这是一个 Gitea bug,请在 <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> 上搜索问题,并在必要时打开新问题。
missing_csrf=错误的请求:没有 CSRF 令牌
invalid_csrf=错误的请求:无效的 CSRF 令牌

[startpage]
app_desc=一款极易搭建的自助 Git 服务
Expand Down
8 changes: 5 additions & 3 deletions options/locale/locale_zh-TW.ini
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ never=從來沒有

[error]
occurred=發生錯誤
report_message=如果你確定這是一個 Gitea 的 bug,請去 <a href="https://github.com/go-gitea/gitea/issues"> GitHub</a> 搜尋相關的問題,如果有需要你也可以開一個新的問題
missing_csrf=Bad Request: no CSRF token present
invalid_csrf=Bad Request: Invalid CSRF token
report_message=如果您確定這是一個 Gitea 的 bug,請到 <a href="https://github.com/go-gitea/gitea/issues" target="_blank">GitHub</a> 搜尋相關的問題,如果有需要您也可以建立新問題。
missing_csrf=錯誤的請求:未提供 CSRF token
invalid_csrf=錯誤的請求:無效的 CSRF token
not_found=找不到目標。
network_error=網路錯誤

[startpage]
app_desc=一套極易架設的 Git 服務
Expand Down
Loading

0 comments on commit f8dd227

Please sign in to comment.