Author SHA1 Message Date
silverwind 3b71a35b51 docs(projects): document workflow permissions and sync with the implementation
The "Issues/PRs opened" event was folded into "Added to project", pull
requests can only be closed by workflows, closed projects don't run
workflows, and actions run in a fixed order. The new Permissions
section defines who can manage workflows and that they then act
without further permission checks. Also fix the editor steps, a typo
and the zh-tw page's nonexistent "New Workflow" button.

Assisted-by: Claude Code:claude-opus-5-5
2026-10-22 13:19:59 +02:00
silverwind 7e9e42775c Merge branch 'main' into lunny/add_project_workflow 2026-02-19 07:56:40 +00:00
Lunny Xiao 85ac8fc4ba Add project workflow documentation 2025-11-25 11:33:30 -08:00
2365 changed files with 41807 additions and 384852 deletions

No files matched your search

+24 -29
View File
@@ -1,5 +1,5 @@
name: Build and Publish Docs site
run-name: astro build docs site
run-name: docusaurus build docs site
on:
push:
@@ -8,41 +8,36 @@ on:
jobs:
build-docs:
runs-on: ubuntu-26.04
env:
NODE_OPTIONS: --max-old-space-size=8192
# search only appears once the credentials are set, the build falls back
# to pagefind otherwise
PUBLIC_DOCSEARCH_APP_ID: ${{ secrets.DOCSEARCH_APP_ID }}
PUBLIC_DOCSEARCH_API_KEY: ${{ secrets.DOCSEARCH_API_KEY }}
PUBLIC_DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 26
node-version: 24
cache: pnpm
- name: install necessary tools
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- name: prepare awesome list
run: |
make prepare-awesome-latest prepare-awesome\#27 prepare-awesome\#26 prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22 prepare-awesome-v28
make prepare-awesome-latest prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22
- name: Install dependencies
run: pnpm install --frozen-lockfile
#- uses: tats-u/docuactions-cache@v1
- name: build site
run: make build
- name: Copy files to Cloudflare Pages
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
# cloudflare/_headers and cloudflare/_redirects are only meaningful for
# the Cloudflare Pages deployment, so they are copied into the build
# right before the deploy.
cp cloudflare/_headers sites/docs/dist/_headers
cp cloudflare/_redirects sites/docs/dist/_redirects
test -f sites/docs/dist/_headers -a -f sites/docs/dist/_redirects || exit 1
pnpm dlx wrangler@4 pages deploy sites/docs/dist \
--project-name docs-gitea-com \
--branch main
make build
- name: aws credential configure
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws-region: ${{ secrets.AWS_REGION}}
- name: Copy files to the production website with the AWS CLI
run: |
aws s3 sync build/ s3://docs-gitea-com
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION}} --paths '/*'
-68
View File
@@ -1,68 +0,0 @@
name: cleanup preview
on:
pull_request:
types:
- closed
# make sure two closing events for the same pull request do not delete the same
# deployment twice
concurrency:
group: cleanup-preview-${{ github.event.pull_request.number }}
jobs:
cleanup-preview:
runs-on: ubuntu-latest
steps:
- name: delete the Cloudflare Pages preview deployments
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail
# pull requests from forks do not get the secrets, nothing was
# deployed for them either
if [ -z "${CLOUDFLARE_API_TOKEN:-}" ] || [ -z "${CLOUDFLARE_ACCOUNT_ID:-}" ]; then
echo "no Cloudflare credentials available, skipping the preview cleanup"
exit 0
fi
project=docs-gitea-com
branch="pr-$PR_NUMBER"
api="https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects/$project/deployments"
page=1
ids=""
while true; do
curl --silent --show-error --fail --output deployments.json \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
"$api?per_page=100&page=$page"
found="$(jq -r --arg branch "$branch" \
'.result[] | select(.deployment_trigger.metadata.branch == $branch) | .id' deployments.json)"
if [ -n "$found" ]; then
ids="$ids$found"$'\n'
fi
# the API returns an empty result once the last page is passed
[ "$(jq -r '.result | length' deployments.json)" -eq 100 ] || break
page=$((page + 1))
done
if [ -z "$(printf '%s' "$ids" | tr -d '[:space:]')" ]; then
echo "no preview deployment found for $branch"
exit 0
fi
# force=true also removes the deployment the branch alias points at
printf '%s' "$ids" | while read -r id; do
[ -n "$id" ] || continue
echo "deleting the deployment $id of $branch"
curl --silent --show-error --fail --output /dev/null \
-X DELETE "$api/$id?force=true" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
done
echo "the preview of $branch is gone"
+8 -86
View File
@@ -3,101 +3,23 @@ name: checks
on:
- pull_request
# a new push to the same pull request replaces the running preview build
concurrency:
group: checks-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build-docs:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max-old-space-size=8192
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 26
node-version: 24
cache: pnpm
- name: prepare awesome list
run: |
make prepare-awesome-latest prepare-awesome\#27 prepare-awesome\#26 prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22 prepare-awesome-v28
- name: install dependencies
make prepare-awesome-latest prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22
- name: Install dependencies
run: pnpm install --frozen-lockfile
#- uses: tats-u/docuactions-cache@v1
- name: build site
run: make build
- name: type check
run: make check
- name: deploy the preview to Cloudflare Pages
id: preview
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail
# pull requests from forks do not get the secrets, the build above is
# then the only check and the preview is silently skipped
if [ -z "${CLOUDFLARE_API_TOKEN:-}" ] || [ -z "${CLOUDFLARE_ACCOUNT_ID:-}" ]; then
echo "::notice::no Cloudflare credentials available (pull request from a fork?), skipping the preview deployment"
exit 0
fi
# same as the production deployment: _headers and _redirects only
# belong to the Cloudflare Pages output, so they are copied in right
# before uploading
cp cloudflare/_headers sites/docs/dist/_headers
cp cloudflare/_redirects sites/docs/dist/_redirects
pnpm dlx wrangler@4 pages deploy sites/docs/dist \
--project-name docs-gitea-com \
--branch "pr-$PR_NUMBER" | tee wrangler.log
url="$(grep -Eo 'https://[A-Za-z0-9.-]+\.pages\.dev' wrangler.log | tail -n 1)"
if [ -z "$url" ]; then
echo "could not read the preview URL from the wrangler output"
exit 1
fi
echo "url=$url" >> "$GITHUB_OUTPUT"
- name: update the pull request with the preview URL
if: steps.preview.outputs.url != ''
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
PREVIEW_URL: ${{ steps.preview.outputs.url }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail
if [ -z "${DEPLOY_TOKEN:-}" ]; then
echo "secrets.DEPLOY_TOKEN is missing, the preview is at $PREVIEW_URL"
exit 0
fi
api="${GITHUB_API_URL:-$GITHUB_SERVER_URL/api/v1}/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER"
curl --silent --show-error --fail --output pull.json \
-H "Authorization: token $DEPLOY_TOKEN" "$api"
marker='<!-- cloudflare-preview -->'
# drop the line written by an earlier run, so the URL is updated in
# place instead of piling up at the end of the description
body="$(jq -r '.body // ""' pull.json | grep -vF "$marker" || true)"
body="$(printf '%s\n' "$body" | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}')"
if [ -n "$body" ]; then
body="$(printf '%s\n\n%s Preview: %s\n' "$body" "$marker" "$PREVIEW_URL")"
else
body="$(printf '%s Preview: %s\n' "$marker" "$PREVIEW_URL")"
fi
printf '%s' "$body" | jq -Rs '{body: .}' > patch.json
curl --silent --show-error --fail --output /dev/null \
-X PATCH "$api" \
-H "Authorization: token $DEPLOY_TOKEN" \
-H 'Content-Type: application/json' \
--data @patch.json
echo "the pull request now points at $PREVIEW_URL"
make build
@@ -1,109 +0,0 @@
name: update runner reference
on:
schedule:
- cron: '30 3 * * 1' # every Monday at 03:30
workflow_dispatch:
env:
# main is protected, so the update is proposed as a pull request from this branch
BOT_BRANCH: bot/update-runner-reference
BASE_BRANCH: main
# the develop runner docs follow the main branch of gitea/runner, every
# documented release series follows its newest stable tag. The value is used
# unquoted, so the glob is expanded by the shell of each step.
TARGET_DIRS: runner-docs/reference runner-docs_versioned_docs/version-*/reference
jobs:
update-runner-reference:
if: github.repository == 'gitea/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: main
# pushing uses DEPLOY_TOKEN, keep the ephemeral job token out of .git/config
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version: 'stable'
cache: false
- name: regenerate the runner reference pages
run: |
set -euo pipefail
./update_runner_docs.sh main runner-docs/reference
./update_runner_docs.sh --released
- name: verify the generated files
run: |
set -euo pipefail
# the pages are built from `--help` and `generate-config`, so a truncated
# build would silently produce an almost empty page
for dir in $TARGET_DIRS; do
echo "checking $dir"
grep -q 'gitea-runner \[command\]' "$dir/cli.md"
grep -q 'gitea-runner exec \[flags\]' "$dir/cli.md"
grep -q '^runner:' "$dir/config-example.md"
done
- name: push bot branch
id: bot_branch
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
set -euo pipefail
if git diff --quiet -- $TARGET_DIRS; then
echo "the runner reference is already up to date"
echo "changed=false" >> "$GITHUB_OUTPUT"
exit 0
fi
if [ -z "$DEPLOY_TOKEN" ]; then
echo "secrets.DEPLOY_TOKEN is missing, cannot push the update"
exit 1
fi
remote="https://x-access-token:$DEPLOY_TOKEN@${GITHUB_SERVER_URL#*://}/$GITHUB_REPOSITORY.git"
# skip if an open bot branch already carries exactly these files
if git fetch --quiet --depth=1 "$remote" "refs/heads/$BOT_BRANCH" 2>/dev/null; then
if git diff --quiet FETCH_HEAD -- $TARGET_DIRS; then
echo "$BOT_BRANCH already proposes this runner reference"
echo "changed=false" >> "$GITHUB_OUTPUT"
exit 0
fi
fi
git config user.name "Gitea Bot"
git config user.email "[email protected]"
git switch --create "$BOT_BRANCH"
git add $TARGET_DIRS
git commit -m "Update the runner reference pages"
# force push: the branch is always rebuilt on top of the current main
git push --force "$remote" "HEAD:refs/heads/$BOT_BRANCH"
echo "changed=true" >> "$GITHUB_OUTPUT"
- name: create pull request
if: steps.bot_branch.outputs.changed == 'true'
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
set -euo pipefail
cat > pull.json <<EOF
{
"base": "$BASE_BRANCH",
"head": "$BOT_BRANCH",
"title": "Update the runner reference pages",
"body": "Automated update of the generated runner reference pages from gitea/runner (main for the develop docs, the newest stable tag for every documented series), opened by the \"update runner reference\" scheduled workflow."
}
EOF
code="$(curl --silent --show-error --output pull-response.json --write-out '%{http_code}' \
-X POST "${GITHUB_API_URL:-$GITHUB_SERVER_URL/api/v1}/repos/$GITHUB_REPOSITORY/pulls" \
-H "Authorization: token $DEPLOY_TOKEN" \
-H 'Content-Type: application/json' \
--data @pull.json)"
case "$code" in
201) echo "pull request created" ;;
409) echo "an open pull request for $BOT_BRANCH already exists, it now points at the new commit" ;;
*) echo "unexpected response $code:"; cat pull-response.json; exit 1 ;;
esac
+16 -98
View File
@@ -1,110 +1,28 @@
name: update api spec files
name: update swagger files
on:
schedule:
- cron: '0 3 * * 1' # every Monday at 03:00
- cron: '0 */12 * * *' # every 12 hours on the hour
workflow_dispatch:
env:
# main is protected, so the update is proposed as a pull request from this branch
BOT_BRANCH: bot/update-swagger-latest
BASE_BRANCH: main
# the documents of the gitea main branch, refreshed by this job
LATEST_FILES: static/swagger-latest.json static/openapi3-latest.json
jobs:
update-swagger:
if: github.repository == 'gitea/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: main
# pushing uses DEPLOY_TOKEN, keep the ephemeral job token out of .git/config
persist-credentials: false
- name: regenerate the latest api documents
run: make update-api-docs-latest
- name: verify the generated file
run: |
set -euo pipefail
for file in $LATEST_FILES; do
# placeholders must have been replaced, otherwise upstream changed them again
if grep -q -e 'GITEA-API-APP' -e '{{' "$file"; then
echo "$file still contains template placeholders"
exit 1
fi
if command -v python3 >/dev/null 2>&1; then
python3 -c "import json,sys; json.load(open(sys.argv[1]))" "$file"
fi
done
- name: push bot branch
id: bot_branch
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
- uses: actions/checkout@v6
- run: |
set -euo pipefail
if git diff --quiet -- $LATEST_FILES; then
echo "the api documents are already up to date"
echo "changed=false" >> "$GITHUB_OUTPUT"
exit 0
make update-api-docs
git config --global user.name "Gitea Bot"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_TOKEN }}@gitea.com/gitea/docs.git
if git status --porcelain | grep -q .; then
git add --all
git commit -m "[skip ci] Updated swagger files"
git push
else
echo "No API doc changes detected; skipping commit"
fi
if [ -z "$DEPLOY_TOKEN" ]; then
echo "secrets.DEPLOY_TOKEN is missing, cannot push the update"
exit 1
fi
remote="https://x-access-token:$DEPLOY_TOKEN@${GITHUB_SERVER_URL#*://}/$GITHUB_REPOSITORY.git"
# skip if an open bot branch already carries exactly this file
if git fetch --quiet --depth=1 "$remote" "refs/heads/$BOT_BRANCH" 2>/dev/null; then
same=true
for file in $LATEST_FILES; do
old_blob="$(git rev-parse --quiet --verify "FETCH_HEAD:$file" || true)"
if [ "$old_blob" != "$(git hash-object "$file")" ]; then
same=false
break
fi
done
if [ "$same" = true ]; then
echo "$BOT_BRANCH already proposes these api documents"
echo "changed=false" >> "$GITHUB_OUTPUT"
exit 0
fi
fi
git config user.name "Gitea Bot"
git config user.email "[email protected]"
git switch --create "$BOT_BRANCH"
git add $LATEST_FILES
git commit -m "Update the latest api documents"
# force push: the branch is always rebuilt on top of the current main
git push --force "$remote" "HEAD:refs/heads/$BOT_BRANCH"
echo "changed=true" >> "$GITHUB_OUTPUT"
- name: create pull request
if: steps.bot_branch.outputs.changed == 'true'
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
set -euo pipefail
cat > pull.json <<EOF
{
"base": "$BASE_BRANCH",
"head": "$BOT_BRANCH",
"title": "Update the latest api documents",
"body": "Automated update of static/swagger-latest.json and static/openapi3-latest.json from the gitea main branch, opened by the \"update api spec files\" scheduled workflow."
}
EOF
code="$(curl --silent --show-error --output pull-response.json --write-out '%{http_code}' \
-X POST "${GITHUB_API_URL:-$GITHUB_SERVER_URL/api/v1}/repos/$GITHUB_REPOSITORY/pulls" \
-H "Authorization: token $DEPLOY_TOKEN" \
-H 'Content-Type: application/json' \
--data @pull.json)"
case "$code" in
201) echo "pull request created" ;;
409) echo "an open pull request for $BOT_BRANCH already exists, it now points at the new commit" ;;
*) echo "unexpected response $code:"; cat pull-response.json; exit 1 ;;
esac
+7 -6
View File
@@ -1,11 +1,12 @@
# Dependencies
node_modules
/node_modules
# Build output
sites/*/dist
sites/*/.astro
sites/*/.cache
build/
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
+5
View File
@@ -0,0 +1,5 @@
audit=false
fund=false
update-notifier=false
package-lock=true
lockfile-version=3
+17 -59
View File
@@ -1,3 +1,5 @@
export NODE_OPTIONS := "--max-old-space-size=8192"
GITEA_AWESOME_REMOTE := https://gitea.com/gitea/awesome-gitea.git
GITEA_AWESOME_BRANCH := main
@@ -12,89 +14,45 @@ create_dir:
clone_awesome: create_dir
git clone --branch=$(GITEA_AWESOME_BRANCH) $(GITEA_AWESOME_REMOTE) .tmp/upstream-awesome || true
# the contributing guide moved to the gitea repository, the readme of
# awesome-gitea still links to it with a relative path
AWESOME_CONTRIBUTING_URL := https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md
FIX_AWESOME_LINKS := sed 's|](contributing.md)|]($(AWESOME_CONTRIBUTING_URL))|'
.PHONY: prepare-awesome-latest
prepare-awesome-latest: clone_awesome
$(FIX_AWESOME_LINKS) .tmp/upstream-awesome/README.md > docs/awesome.md
cp .tmp/upstream-awesome/README.md docs/awesome.md
.PHONY: prepare-awesome\#%
prepare-awesome\#%:
$(FIX_AWESOME_LINKS) .tmp/upstream-awesome/README.md > versioned_docs/version-1.$*/awesome.md
# versions numbered without the 1. prefix, like 28
.PHONY: prepare-awesome-v%
prepare-awesome-v%:
$(FIX_AWESOME_LINKS) .tmp/upstream-awesome/README.md > versioned_docs/version-$*/awesome.md
cp .tmp/upstream-awesome/README.md versioned_docs/version-1.$*/awesome.md
.PHONY: install
install:
pnpm install
.PHONY: prepare-docs
prepare-docs: install prepare-awesome-latest prepare-awesome\#22 prepare-awesome\#23 prepare-awesome\#24 prepare-awesome\#25 prepare-awesome\#26 prepare-awesome\#27 prepare-awesome-v28
prepare-docs: install prepare-awesome-latest prepare-awesome\#19 prepare-awesome\#20 prepare-awesome\#21 prepare-awesome\#22 prepare-awesome\#23 prepare-awesome\#24
.PHONY: build
build:
pnpm run build
# type checks the astro site and its components
.PHONY: check
check:
pnpm run check
.PHONY: serve
serve: prepare-docs
pnpm run dev
pnpm run start
# only the english docs of the version served at the root, plus the runner:
# starts in a few seconds instead of loading the whole matrix
.PHONY: serve-fast
serve-fast:
pnpm run dev:en-latest
# search is built by pagefind at build time, so it is only available on the
# built site; this serves it locally
.PHONY: serve-built
serve-built: build
pnpm run preview
.PHONY: serve-zh
serve-zh: prepare-docs
pnpm run start -- --locale zh-cn
.PHONY: clean
clean:
rm -rf .tmp
rm -rf sites/docs/dist
rm -rf sites/docs/.cache
rm -rf sites/docs/node_modules/.astro
rm -rf static/_*
rm -rf static/swagger-latest.json
rm -rf static/swagger-19.json
rm -rf static/swagger-20.json
rm -rf static/swagger-21.json
rm -rf static/swagger-22.json
rm -rf static/swagger-23.json
rm -rf static/swagger-24.json
# static/swagger-*.json and static/openapi3-*.json are committed files, use
# update-api-docs to refresh them
.PHONY: update-api-docs
update-api-docs:
./update_api_docs.sh
# only refresh the documents of the gitea main branch (used by the cron job)
.PHONY: update-api-docs-latest
update-api-docs-latest:
./update_api_docs.sh --latest-only
# regenerate the generated runner reference pages of the develop docs from the
# main branch of gitea/runner (used by the update runner reference cron job)
.PHONY: update-runner-docs
update-runner-docs:
./update_runner_docs.sh main runner-docs/reference
# same, for every documented release series: the tags are looked up through the
# Gitea API, so a runner release needs no change here
.PHONY: update-runner-docs-released
update-runner-docs-released:
./update_runner_docs.sh --released
# freezes the current docs, runner or cli tree as a new version, see
# scripts/cut-version.mjs
.PHONY: cut-version
cut-version:
@test -n "$(PRODUCT)" -a -n "$(VERSION)" || { echo 'usage: make cut-version PRODUCT=docs VERSION=1.28'; exit 1; }
node scripts/cut-version.mjs $(PRODUCT) $(VERSION)
+11 -127
View File
@@ -1,139 +1,23 @@
# Gitea Docs ![badge](https://gitea.com/gitea/docs/actions/workflows/build-and-publish.yaml/badge.svg)
The sources of [docs.gitea.com](https://docs.gitea.com), built with
[Astro](https://astro.build) and [Starlight](https://starlight.astro.build).
## How to build
The site covers four products, all served from this repository:
| Product | Content | Versions | Languages |
| --- | --- | --- | --- |
| Docs | `docs/`, `versioned_docs/`, `i18n/` | next, 28, 1.27 … 1.22 | English, 简体中文, 繁體中文 |
| API | `static/swagger-*.json`, `static/openapi3-*.json` | next, 28, 1.27 … 1.22 | English |
| Runner | `runner-docs/`, `runner-docs_versioned_docs/` | develop, 5 … 0 | English |
| CLI | `cli-docs/`, `cli-docs_versioned_docs/` | develop | English |
The enterprise documentation is built and deployed from its own repository and
reached through `/enterprise/`, which a Cloudflare worker maintained elsewhere
routes to that deployment.
```shell
make clean
make prepare-docs
make build
```
## Development
```shell
make install # pnpm install
make serve-fast # english, the version served at the root, starts in seconds
make serve # the whole matrix, every version and language
make build # production build into sites/docs/dist
make check # type checks the site and its components
make clean
make prepare-docs
make serve
```
Search is built by Pagefind while the site is built, so it only answers on the
built site: use `make serve-built` to try it. With the Algolia credentials
(`PUBLIC_DOCSEARCH_APP_ID`, `PUBLIC_DOCSEARCH_API_KEY`) set, DocSearch is used
instead and works in `make serve` too.
`GITEA_DOCS_PRODUCTS`, `GITEA_DOCS_VERSIONS` and `GITEA_DOCS_LOCALES` (comma
separated) restrict what is built, which is what `make serve-fast` uses.
`GITEA_DOCS_STRICT_LINKS=true` turns the warnings about unresolved relative
markdown links into a build error.
`sites/docs/README.md` documents how the sources are mapped onto the site.
## Writing
Pages are plain markdown with the same frontmatter and admonitions as before:
frontmatter `slug`, `sidebar_position` and `sidebar_label` keep working, and so
do the `:::note` style admonitions and the `@version@` style release variables.
Relative `*.md` links are rewritten to urls while the site is built.
The order of the top level sidebar groups comes from `sidebars.js` (and
`versioned_sidebars/` for released versions), the label and order of every other
group from the `_category_.json` of its directory.
## Cutting a version
## Test en version
```shell
make cut-version PRODUCT=docs VERSION=1.28
make cut-version PRODUCT=runner VERSION=6
make cut-version PRODUCT=cli VERSION=0.1
pnpm run start
```
This freezes the current tree, its translations and its sidebar. The label of
the version, its release variables (`@version@`, `@dockerVersion@`, ...) and
which version is served at the root live in
`packages/content-loader/src/products.ts` and are edited by hand afterwards.
That file is the single source of truth for the product, version and language
matrix.
## API docs
The definitions rendered under `/api/` live in `static/`:
`swagger-latest.json` (gitea main) and `swagger-<minor>.json` (released
versions) hold the swagger 2.0 document every gitea version ships,
`openapi3-latest.json` and `openapi3-<minor>.json` the openapi 3.0 document
gitea generates since 1.27. The openapi 3.0 document is what gets rendered
where it exists, and both are offered for download on the overview page of the
version, since code generators cannot read the rendered pages (and several of
them reject swagger 2.0).
```shell
make update-api-docs # refresh latest + every released version
make update-api-docs-latest # refresh only the documents of gitea main
```
The documents of gitea main are refreshed automatically: the `update api spec
files` workflow runs weekly and opens a pull request whenever gitea main
changed. Released versions are updated by hand when a new gitea version is
documented.
## Runner docs
| Version | Content | URL |
| --- | --- | --- |
| develop | `runner-docs/` | `/runner/develop/` |
| current series | `runner-docs_versioned_docs/version-5/` | `/runner/` |
| older series | `runner-docs_versioned_docs/version-4/` | `/runner/4/` |
A version directory covers a whole release series (`version-3` documents every
`3.x` release), so a patch release only needs a content update, not a new
folder. Use floating image tags (`gitea/runner:3`) and links to the runner's
`main` branch in those pages to keep them valid across patch releases.
Its sidebar is written by hand: `runner-sidebars.js` for develop, and
`runner-docs_versioned_sidebars/version-<version>-sidebars.json` per documented
version.
The pages under `reference/` are generated from the runner sources — the command
line reference from `--help`, the example configuration from `config generate`
(`generate-config` before 3.1):
```shell
make update-runner-docs # develop docs, from the main branch of gitea/runner
make update-runner-docs-released # every series, from its newest stable tag
./update_runner_docs.sh v3.0.2 runner-docs_versioned_docs/version-3/reference
```
These are refreshed automatically as well: the `update runner reference`
workflow runs weekly and opens a pull request whenever the runner's CLI or
example configuration changed. Generating them needs Go, since the script builds
the runner binary.
## CLI docs
The documentation of `gt`, the Gitea CLI from
[gitea/cli](https://gitea.com/gitea/cli), is laid out like the runner docs, with
its sidebar in `cli-sidebars.js`. No series is documented yet, so `cli-docs/` is
served at `/cli/`. Once a release exists, cut its series and list it in
`cliSeries` in `packages/content-loader/src/products.ts`, which moves the develop
docs to `/cli/develop/`. The guides leave the flags of each command to
`gt <command> --help`.
## Deployment
`main` is built and published by the `Build and Publish Docs site` workflow, to
S3/CloudFront and to Cloudflare Pages. `cloudflare/_headers` sets the cache
policy and `cloudflare/_redirects` keeps the urls the site used to serve; both
are copied next to the build output by that workflow.
`cloudflare/docsearch-crawler.json` is the Algolia crawler configuration.
`/enterprise/` is served by another deployment and routed to it by a Cloudflare
worker that lives outside this repository.
-55
View File
@@ -1,55 +0,0 @@
---
sidebar_position: 3
---
# Logging in
On a terminal, `gt auth login` asks for the instance and how to log in. gt never asks for
your password.
## OAuth in a browser
```bash
gt auth login --host https://gitea.example.com --oauth
```
gt opens the instance's authorization page, so single sign-on and two-factor
authentication work as on the web. The browser has to run on the same machine as gt.
`--scopes` limits the token to fewer [scopes](/development/oauth2-provider#scopes); gt
refreshes OAuth tokens on its own.
## Access token
Create a token under **Settings > Applications** on the instance and pass it on stdin:
```bash
gt auth login --host https://gitea.example.com --with-token < token.txt
```
The token needs `read:user`, and the scopes of what you do with gt, such as
`write:repository` and `write:issue` for working on pull requests.
## SSH key
gt can sign its requests with an SSH key registered for your account instead of using a
token:
```bash
gt auth login --host https://gitea.example.com --ssh-key ~/.ssh/id_ed25519
```
## Accounts
Tokens go to the system keyring, or with `--credential-store file` to gt's configuration
directory on machines without one. Run `gt auth login` once per instance and account.
gt picks the instance from the repository's remote or `--host`, and the account with
`gt auth switch` or `--user`. `gt auth status` lists your accounts and `gt auth logout`
removes one.
For instances behind an access proxy, `--header` and `--client-cert` add headers and a
client certificate.
## Git over HTTPS
`gt auth setup-git` lets `git push` and `git fetch` over HTTPS use gt's login. gt's own
clone and checkout commands need no setup.
-40
View File
@@ -1,40 +0,0 @@
---
sidebar_position: 4
---
# Using gt in CI
Give gt a token and an instance through the environment, and turn prompts off:
| Variable | Description |
| --- | --- |
| `GITEA_TOKEN` | Access token; gt never stores it |
| `GITEA_CLI_HOST` or `GITEA_INSTANCE_URL` | URL of the instance |
| `GITEA_CLI_REPO` | Repository, like `--repo` |
`--no-input` makes a command fail instead of prompting, and `--yes` confirms changes in
advance.
## Gitea Actions
Gitea does not allow secret names that start with `GITEA_`, so store the token as, for
example, `GT_TOKEN`:
```yaml
on:
push:
branches: [main]
jobs:
staging:
runs-on: ubuntu-latest
env:
GITEA_TOKEN: ${{ secrets.GT_TOKEN }}
GITEA_CLI_HOST: ${{ gitea.server_url }}
GITEA_CLI_REPO: ${{ gitea.repository }}
steps:
- run: curl -fsSL https://gitea.com/gitea/cli/raw/branch/main/scripts/install.sh | sh
- run: gt workflow run deploy.yml --ref main --field env=staging --no-input
```
`gt run watch` and `gt pr checks --watch` wait for runs and checks and fail when one fails.
-38
View File
@@ -1,38 +0,0 @@
---
sidebar_position: 1
slug: /
---
# Gitea CLI
[gt](https://gitea.com/gitea/cli) is the official command line client for Gitea. It works
with repositories, issues, pull requests, releases, Actions and the other resources of a
Gitea instance, from a terminal or a script.
:::info Development version
These pages describe builds from the `main` branch, published as `nightly` binaries and images.
:::
gt needs Gitea 28 or later, and Git for the commands that clone, check out or push.
## Getting started
1. [Install gt](installation.md).
2. [Log in](authentication.md):
```bash
gt auth login
```
3. Run commands in a clone of a repository on that instance, or select one with `--repo`:
```bash
gt issue list --label bug
gt pr checkout 13
gt issue view 42 --repo gitea.com/gitea/cli
```
`gt doctor` checks your setup and suggests a fix for each problem it finds.
`gt <command> --help` lists the flags of a command, and `gt help environment` the global
flags and environment variables.
-37
View File
@@ -1,37 +0,0 @@
---
sidebar_position: 2
---
# Installation
gt is a single binary for Linux, macOS, Windows and FreeBSD.
## Install script
The install script downloads gt from [dl.gitea.com](https://dl.gitea.com/gitea-cli/),
verifies its checksum and installs it.
```bash
# Linux, macOS, FreeBSD
curl -fsSL https://gitea.com/gitea/cli/raw/branch/main/scripts/install.sh | sh
```
```powershell
# Windows
irm https://gitea.com/gitea/cli/raw/branch/main/scripts/install.ps1 | iex
```
Set `GITEA_CLI_VERSION` to install a specific version, or `nightly` for the latest build
of `main`.
## Other ways
- **Binaries:** download them from [dl.gitea.com/gitea-cli](https://dl.gitea.com/gitea-cli/).
- **Docker:** the [`gitea/gitea-cli`](https://hub.docker.com/r/gitea/gitea-cli) image runs
`gt` as its entry point.
- **Go:** `go install gitea.dev/cli/cmd/gt@latest`
## Shell completion and man pages
`gt completion <shell>` prints the completion script for bash, zsh, fish or PowerShell;
`gt completion <shell> --help` shows how to load it. `gt man` prints the manual.
-22
View File
@@ -1,22 +0,0 @@
---
sidebar_position: 5
---
# Output and scripting
Scripts should read JSON: the text output is meant for people and may change.
```bash
gt pr view 123 --json number,title,state
gt issue list --json number,title --jq '.[] | "\(.number)\t\(.title)"'
```
`--json` prints all fields or the ones you list; the **JSON FIELDS** section of a command's
`--help` names them. `--jq` filters the result without needing jq installed. Piped lists
print as tab-separated values.
gt exits with 0 on success, 1 when a command fails, 2 on a usage error and 4 when
authentication is missing or rejected; `gt help exit-codes` lists all codes.
`gt api` calls any API endpoint with gt's login, and `gt alias set` defines shortcuts for
commands you use often.
-1
View File
@@ -1 +0,0 @@
[]
-16
View File
@@ -1,16 +0,0 @@
// Sidebar of the gt (Gitea CLI) documentation (develop version).
// Released versions carry their own copy in
// cli-docs_versioned_sidebars/version-<version>-sidebars.json.
module.exports = {
cli: [
{
type: 'doc',
id: 'index',
label: 'What is gt?',
},
'installation',
'authentication',
'ci',
'scripting',
],
};
-24
View File
@@ -1,24 +0,0 @@
# Cloudflare Pages reads this file from the root of the deployed directory. It
# is copied into the build output by the publish workflow, so that it is not
# uploaded to S3/CloudFront where it would be publicly readable at /_headers.
#
# The build emits a single content hashed asset directory shared by every
# language, so no per locale rules are needed.
# Content hashed build output (js, css, fonts). The file name changes with the
# content, so these can be cached forever.
/_astro/*
Cache-Control: public, max-age=31536000, immutable
# Files under public/img and public/images keep stable names and are replaced in
# place, so they get a short, conservative max-age instead.
/img/*
Cache-Control: public, max-age=86400
/images/*
Cache-Control: public, max-age=86400
# The pagefind index, only present when the site is built without algolia
# docsearch. Content hashed as well.
/pagefind/*
Cache-Control: public, max-age=31536000, immutable
-460
View File
@@ -1,460 +0,0 @@
# Redirects for legacy URLs and routes the site no longer serves directly.
# The api reference, the runner and the cli docs are separate products,
# published in english only, so they have no localized copy.
/zh-cn/api/* /api/:splat 301
/zh-tw/api/* /api/:splat 301
/zh-cn/runner/* /runner/:splat 301
/zh-tw/runner/* /runner/:splat 301
/zh-cn/cli/* /cli/:splat 301
/zh-tw/cli/* /cli/:splat 301
# The version served at the root of a product is also reachable under its
# number, which is what the release notes and old links use.
/api/28/* /api/:splat 301
/runner/3/* /runner/:splat 301
/28/* /:splat 301
# The local search plugin had a results page of its own, algolia docsearch is a
# modal opened from any page.
/search / 301
/zh-cn/search /zh-cn/ 301
/zh-tw/search /zh-tw/ 301
# Pages that moved when the docs were reorganized: the flat `/usage/webhooks`,
# `/advanced/...` and `/developers/...` layout of 1.19 and 1.20, and
# `/help/seek-help`. Those urls kept working until the site moved to Cloudflare
# because it was published with `aws s3 sync` without `--delete`, so the pages
# built before the move were never removed from the bucket. Only what the build
# emits is served now, and gitea itself and blog.gitea.com still link to some of
# them, so they are redirected here.
/actions /usage/actions/ 301
/actions/ /usage/actions/ 301
/administration /category/administration/ 301
/administration/ /category/administration/ 301
/administration/logging-configuration /administration/logging-config/ 301
/advanced/adding-legal-pages /administration/adding-legal-pages/ 301
/advanced/clone-filters /usage/repository/clone-filters/ 301
/advanced/cmd-embedded /administration/cmd-embedded/ 301
/advanced/config-cheat-sheet /administration/config-cheat-sheet/ 301
/advanced/customizing-gitea /administration/customizing-gitea/ 301
/advanced/environment-variables /administration/environment-variables/ 301
/advanced/external-renderers /administration/external-renderers/ 301
/advanced/logging-configuration /administration/logging-config/ 301
/advanced/mail-templates /administration/mail-templates/ 301
/advanced/protected-tags /usage/access-control/protected-tags/ 301
/advanced/repo-indexer /administration/repo-indexer/ 301
/advanced/repo-mirror /usage/repository/repo-mirror/ 301
/advanced/search-engines-indexation /administration/search-engines-indexation/ 301
/advanced/signing /administration/signing/ 301
/developers/api-usage /development/api-usage/ 301
/developers/integrations /development/integrations/ 301
/developers/migrations-interfaces /development/migrations-interfaces/ 301
/developers/oauth2-provider /development/oauth2-provider/ 301
/development /category/development/ 301
/development/ /category/development/ 301
/features/authentication /administration/authentication/ 301
/features/comparison /installation/comparison/ 301
/features/webhooks /usage/repository/webhooks/ 301
/help /category/help/ 301
/help/ /category/help/ 301
/help/seek-help /help/support/ 301
/installation /category/installation/ 301
/installation/ /category/installation/ 301
/installation/upgrade-from-gogs /category/installation/ 301
/upgrade/upgrade-from-gitea /installation/upgrade-from-gitea/ 301
/upgrade/upgrade-from-gogs /category/installation/ 301
/usage /category/usage/ 301
/usage/ /category/usage/ 301
/usage/actions/act-runner /runner/ 301
/usage/agit /usage/issues-prs/agit/ 301
/usage/agit-setup /usage/issues-prs/agit/ 301
/usage/authentication /administration/authentication/ 301
/usage/automatically-linked-references /usage/issues-prs/automatically-linked-references/ 301
/usage/badge /usage/actions/badge/ 301
/usage/blame /usage/repository/blame/ 301
/usage/blocking-user /usage/access-control/blocking-user/ 301
/usage/clone-filters /usage/repository/clone-filters/ 301
/usage/code-owners /usage/repository/code-owners/ 301
/usage/command-line /administration/command-line/ 301
/usage/email-setup /administration/email-setup/ 301
/usage/git-lfs-setup /administration/git-lfs-setup/ 301
/usage/https-setup /administration/https-setup/ 301
/usage/incoming-email /usage/repository/incoming-email/ 301
/usage/issue-pull-request-templates /usage/issues-prs/issue-pull-request-templates/ 301
/usage/labels /usage/issues-prs/labels/ 301
/usage/markdown /usage/repository/markdown/ 301
/usage/merge-message-templates /usage/issues-prs/merge-message-templates/ 301
/usage/migration /usage/repository/migration/ 301
/usage/multi-factor-authentication /usage/user-setting/multi-factor-authentication/ 301
/usage/permissions /usage/access-control/permissions/ 301
/usage/profile-readme /usage/repository/profile-readme/ 301
/usage/protected-tags /usage/access-control/protected-tags/ 301
/usage/pull-request /usage/issues-prs/pull-request/ 301
/usage/push /usage/repository/push/ 301
/usage/push-options /usage/repository/push/ 301
/usage/push-to-create /usage/repository/push/ 301
/usage/repo-mirror /usage/repository/repo-mirror/ 301
/usage/secrets /usage/actions/secrets/ 301
/usage/template-repositories /usage/repository/template-repositories/ 301
/usage/webhooks /usage/repository/webhooks/ 301
# ... and under simplified chinese.
/zh-cn/actions /zh-cn/usage/actions/ 301
/zh-cn/actions/ /zh-cn/usage/actions/ 301
/zh-cn/administration /zh-cn/category/administration/ 301
/zh-cn/administration/ /zh-cn/category/administration/ 301
/zh-cn/administration/logging-configuration /zh-cn/administration/logging-config/ 301
/zh-cn/advanced/adding-legal-pages /zh-cn/administration/adding-legal-pages/ 301
/zh-cn/advanced/clone-filters /zh-cn/usage/repository/clone-filters/ 301
/zh-cn/advanced/cmd-embedded /zh-cn/administration/cmd-embedded/ 301
/zh-cn/advanced/config-cheat-sheet /zh-cn/administration/config-cheat-sheet/ 301
/zh-cn/advanced/customizing-gitea /zh-cn/administration/customizing-gitea/ 301
/zh-cn/advanced/environment-variables /zh-cn/administration/environment-variables/ 301
/zh-cn/advanced/external-renderers /zh-cn/administration/external-renderers/ 301
/zh-cn/advanced/logging-configuration /zh-cn/administration/logging-config/ 301
/zh-cn/advanced/mail-templates /zh-cn/administration/mail-templates/ 301
/zh-cn/advanced/protected-tags /zh-cn/usage/access-control/protected-tags/ 301
/zh-cn/advanced/repo-indexer /zh-cn/administration/repo-indexer/ 301
/zh-cn/advanced/repo-mirror /zh-cn/usage/repository/repo-mirror/ 301
/zh-cn/advanced/search-engines-indexation /zh-cn/administration/search-engines-indexation/ 301
/zh-cn/advanced/signing /zh-cn/administration/signing/ 301
/zh-cn/developers/api-usage /zh-cn/development/api-usage/ 301
/zh-cn/developers/integrations /zh-cn/development/integrations/ 301
/zh-cn/developers/migrations-interfaces /zh-cn/development/migrations-interfaces/ 301
/zh-cn/developers/oauth2-provider /zh-cn/development/oauth2-provider/ 301
/zh-cn/development /zh-cn/category/development/ 301
/zh-cn/development/ /zh-cn/category/development/ 301
/zh-cn/features/authentication /zh-cn/administration/authentication/ 301
/zh-cn/features/comparison /zh-cn/installation/comparison/ 301
/zh-cn/features/webhooks /zh-cn/usage/repository/webhooks/ 301
/zh-cn/help /zh-cn/category/help/ 301
/zh-cn/help/ /zh-cn/category/help/ 301
/zh-cn/help/seek-help /zh-cn/help/support/ 301
/zh-cn/installation /zh-cn/category/installation/ 301
/zh-cn/installation/ /zh-cn/category/installation/ 301
/zh-cn/installation/upgrade-from-gogs /zh-cn/category/installation/ 301
/zh-cn/upgrade/upgrade-from-gitea /zh-cn/installation/upgrade-from-gitea/ 301
/zh-cn/upgrade/upgrade-from-gogs /zh-cn/category/installation/ 301
/zh-cn/usage /zh-cn/category/usage/ 301
/zh-cn/usage/ /zh-cn/category/usage/ 301
/zh-cn/usage/actions/act-runner /runner/ 301
/zh-cn/usage/agit-setup /zh-cn/usage/issues-prs/agit/ 301
/zh-cn/usage/authentication /zh-cn/administration/authentication/ 301
/zh-cn/usage/automatically-linked-references /zh-cn/usage/issues-prs/automatically-linked-references/ 301
/zh-cn/usage/badge /zh-cn/usage/actions/badge/ 301
/zh-cn/usage/blame /zh-cn/usage/repository/blame/ 301
/zh-cn/usage/blocking-user /zh-cn/usage/access-control/blocking-user/ 301
/zh-cn/usage/clone-filters /zh-cn/usage/repository/clone-filters/ 301
/zh-cn/usage/code-owners /zh-cn/usage/repository/code-owners/ 301
/zh-cn/usage/command-line /zh-cn/administration/command-line/ 301
/zh-cn/usage/email-setup /zh-cn/administration/email-setup/ 301
/zh-cn/usage/git-lfs-setup /zh-cn/administration/git-lfs-setup/ 301
/zh-cn/usage/https-setup /zh-cn/administration/https-setup/ 301
/zh-cn/usage/incoming-email /zh-cn/usage/repository/incoming-email/ 301
/zh-cn/usage/issue-pull-request-templates /zh-cn/usage/issues-prs/issue-pull-request-templates/ 301
/zh-cn/usage/labels /zh-cn/usage/issues-prs/labels/ 301
/zh-cn/usage/markdown /zh-cn/usage/repository/markdown/ 301
/zh-cn/usage/merge-message-templates /zh-cn/usage/issues-prs/merge-message-templates/ 301
/zh-cn/usage/migration /zh-cn/usage/repository/migration/ 301
/zh-cn/usage/multi-factor-authentication /zh-cn/usage/user-setting/multi-factor-authentication/ 301
/zh-cn/usage/permissions /zh-cn/usage/access-control/permissions/ 301
/zh-cn/usage/profile-readme /zh-cn/usage/repository/profile-readme/ 301
/zh-cn/usage/protected-tags /zh-cn/usage/access-control/protected-tags/ 301
/zh-cn/usage/pull-request /zh-cn/usage/issues-prs/pull-request/ 301
/zh-cn/usage/push /zh-cn/usage/repository/push/ 301
/zh-cn/usage/push-options /zh-cn/usage/repository/push/ 301
/zh-cn/usage/push-to-create /zh-cn/usage/repository/push/ 301
/zh-cn/usage/repo-mirror /zh-cn/usage/repository/repo-mirror/ 301
/zh-cn/usage/secrets /zh-cn/usage/actions/secrets/ 301
/zh-cn/usage/template-repositories /zh-cn/usage/repository/template-repositories/ 301
/zh-cn/usage/webhooks /zh-cn/usage/repository/webhooks/ 301
# ... and under traditional chinese.
/zh-tw/actions /zh-tw/usage/actions/ 301
/zh-tw/actions/ /zh-tw/usage/actions/ 301
/zh-tw/administration /zh-tw/category/administration/ 301
/zh-tw/administration/ /zh-tw/category/administration/ 301
/zh-tw/administration/logging-configuration /zh-tw/administration/logging-config/ 301
/zh-tw/advanced/adding-legal-pages /zh-tw/administration/adding-legal-pages/ 301
/zh-tw/advanced/clone-filters /zh-tw/usage/repository/clone-filters/ 301
/zh-tw/advanced/cmd-embedded /zh-tw/administration/cmd-embedded/ 301
/zh-tw/advanced/config-cheat-sheet /zh-tw/administration/config-cheat-sheet/ 301
/zh-tw/advanced/customizing-gitea /zh-tw/administration/customizing-gitea/ 301
/zh-tw/advanced/environment-variables /zh-tw/administration/environment-variables/ 301
/zh-tw/advanced/external-renderers /zh-tw/administration/external-renderers/ 301
/zh-tw/advanced/logging-configuration /zh-tw/administration/logging-config/ 301
/zh-tw/advanced/mail-templates /zh-tw/administration/mail-templates/ 301
/zh-tw/advanced/protected-tags /zh-tw/usage/access-control/protected-tags/ 301
/zh-tw/advanced/repo-indexer /zh-tw/administration/repo-indexer/ 301
/zh-tw/advanced/repo-mirror /zh-tw/usage/repository/repo-mirror/ 301
/zh-tw/advanced/search-engines-indexation /zh-tw/administration/search-engines-indexation/ 301
/zh-tw/advanced/signing /zh-tw/administration/signing/ 301
/zh-tw/developers/api-usage /zh-tw/development/api-usage/ 301
/zh-tw/developers/integrations /zh-tw/development/integrations/ 301
/zh-tw/developers/migrations-interfaces /zh-tw/development/migrations-interfaces/ 301
/zh-tw/developers/oauth2-provider /zh-tw/development/oauth2-provider/ 301
/zh-tw/development /zh-tw/category/development/ 301
/zh-tw/development/ /zh-tw/category/development/ 301
/zh-tw/features/authentication /zh-tw/administration/authentication/ 301
/zh-tw/features/comparison /zh-tw/installation/comparison/ 301
/zh-tw/features/webhooks /zh-tw/usage/repository/webhooks/ 301
/zh-tw/help /zh-tw/category/help/ 301
/zh-tw/help/ /zh-tw/category/help/ 301
/zh-tw/help/seek-help /zh-tw/help/support/ 301
/zh-tw/installation /zh-tw/category/installation/ 301
/zh-tw/installation/ /zh-tw/category/installation/ 301
/zh-tw/installation/upgrade-from-gogs /zh-tw/category/installation/ 301
/zh-tw/upgrade/upgrade-from-gitea /zh-tw/installation/upgrade-from-gitea/ 301
/zh-tw/upgrade/upgrade-from-gogs /zh-tw/category/installation/ 301
/zh-tw/usage /zh-tw/category/usage/ 301
/zh-tw/usage/ /zh-tw/category/usage/ 301
/zh-tw/usage/actions/act-runner /runner/ 301
/zh-tw/usage/agit-setup /zh-tw/usage/issues-prs/agit/ 301
/zh-tw/usage/authentication /zh-tw/administration/authentication/ 301
/zh-tw/usage/automatically-linked-references /zh-tw/usage/issues-prs/automatically-linked-references/ 301
/zh-tw/usage/badge /zh-tw/usage/actions/badge/ 301
/zh-tw/usage/blame /zh-tw/usage/repository/blame/ 301
/zh-tw/usage/blocking-user /zh-tw/usage/access-control/blocking-user/ 301
/zh-tw/usage/clone-filters /zh-tw/usage/repository/clone-filters/ 301
/zh-tw/usage/code-owners /zh-tw/usage/repository/code-owners/ 301
/zh-tw/usage/command-line /zh-tw/administration/command-line/ 301
/zh-tw/usage/email-setup /zh-tw/administration/email-setup/ 301
/zh-tw/usage/git-lfs-setup /zh-tw/administration/git-lfs-setup/ 301
/zh-tw/usage/https-setup /zh-tw/administration/https-setup/ 301
/zh-tw/usage/incoming-email /zh-tw/usage/repository/incoming-email/ 301
/zh-tw/usage/issue-pull-request-templates /zh-tw/usage/issues-prs/issue-pull-request-templates/ 301
/zh-tw/usage/labels /zh-tw/usage/issues-prs/labels/ 301
/zh-tw/usage/markdown /zh-tw/usage/repository/markdown/ 301
/zh-tw/usage/merge-message-templates /zh-tw/usage/issues-prs/merge-message-templates/ 301
/zh-tw/usage/migration /zh-tw/usage/repository/migration/ 301
/zh-tw/usage/multi-factor-authentication /zh-tw/usage/user-setting/multi-factor-authentication/ 301
/zh-tw/usage/permissions /zh-tw/usage/access-control/permissions/ 301
/zh-tw/usage/protected-tags /zh-tw/usage/access-control/protected-tags/ 301
/zh-tw/usage/pull-request /zh-tw/usage/issues-prs/pull-request/ 301
/zh-tw/usage/push /zh-tw/usage/repository/push/ 301
/zh-tw/usage/push-options /zh-tw/usage/repository/push/ 301
/zh-tw/usage/push-to-create /zh-tw/usage/repository/push/ 301
/zh-tw/usage/repo-mirror /zh-tw/usage/repository/repo-mirror/ 301
/zh-tw/usage/secrets /zh-tw/usage/actions/secrets/ 301
/zh-tw/usage/template-repositories /zh-tw/usage/repository/template-repositories/ 301
/zh-tw/usage/webhooks /zh-tw/usage/repository/webhooks/ 301
# ... and under the develop version.
/next/actions /next/usage/actions/ 301
/next/actions/ /next/usage/actions/ 301
/next/administration /next/category/administration/ 301
/next/administration/ /next/category/administration/ 301
/next/administration/logging-configuration /next/administration/logging-config/ 301
/next/advanced/adding-legal-pages /next/administration/adding-legal-pages/ 301
/next/advanced/clone-filters /next/usage/repository/clone-filters/ 301
/next/advanced/cmd-embedded /next/administration/cmd-embedded/ 301
/next/advanced/config-cheat-sheet /next/administration/config-cheat-sheet/ 301
/next/advanced/customizing-gitea /next/administration/customizing-gitea/ 301
/next/advanced/environment-variables /next/administration/environment-variables/ 301
/next/advanced/external-renderers /next/administration/external-renderers/ 301
/next/advanced/logging-configuration /next/administration/logging-config/ 301
/next/advanced/mail-templates /next/administration/mail-templates/ 301
/next/advanced/protected-tags /next/usage/access-control/protected-tags/ 301
/next/advanced/repo-indexer /next/administration/repo-indexer/ 301
/next/advanced/repo-mirror /next/usage/repository/repo-mirror/ 301
/next/advanced/search-engines-indexation /next/administration/search-engines-indexation/ 301
/next/advanced/signing /next/administration/signing/ 301
/next/developers/api-usage /next/development/api-usage/ 301
/next/developers/integrations /next/development/integrations/ 301
/next/developers/migrations-interfaces /next/development/migrations-interfaces/ 301
/next/developers/oauth2-provider /next/development/oauth2-provider/ 301
/next/development /next/category/development/ 301
/next/development/ /next/category/development/ 301
/next/features/authentication /next/administration/authentication/ 301
/next/features/comparison /next/installation/comparison/ 301
/next/features/webhooks /next/usage/repository/webhooks/ 301
/next/help /next/category/help/ 301
/next/help/ /next/category/help/ 301
/next/help/seek-help /next/help/support/ 301
/next/installation /next/category/installation/ 301
/next/installation/ /next/category/installation/ 301
/next/installation/upgrade-from-gogs /next/category/installation/ 301
/next/upgrade/upgrade-from-gitea /next/installation/upgrade-from-gitea/ 301
/next/upgrade/upgrade-from-gogs /next/category/installation/ 301
/next/usage /next/category/usage/ 301
/next/usage/ /next/category/usage/ 301
/next/usage/actions/act-runner /runner/ 301
/next/usage/agit /next/usage/issues-prs/agit/ 301
/next/usage/agit-setup /next/usage/issues-prs/agit/ 301
/next/usage/authentication /next/administration/authentication/ 301
/next/usage/automatically-linked-references /next/usage/issues-prs/automatically-linked-references/ 301
/next/usage/badge /next/usage/actions/badge/ 301
/next/usage/blame /next/usage/repository/blame/ 301
/next/usage/blocking-user /next/usage/access-control/blocking-user/ 301
/next/usage/clone-filters /next/usage/repository/clone-filters/ 301
/next/usage/code-owners /next/usage/repository/code-owners/ 301
/next/usage/command-line /next/administration/command-line/ 301
/next/usage/email-setup /next/administration/email-setup/ 301
/next/usage/git-lfs-setup /next/administration/git-lfs-setup/ 301
/next/usage/https-setup /next/administration/https-setup/ 301
/next/usage/incoming-email /next/usage/repository/incoming-email/ 301
/next/usage/issue-pull-request-templates /next/usage/issues-prs/issue-pull-request-templates/ 301
/next/usage/labels /next/usage/issues-prs/labels/ 301
/next/usage/markdown /next/usage/repository/markdown/ 301
/next/usage/merge-message-templates /next/usage/issues-prs/merge-message-templates/ 301
/next/usage/migration /next/usage/repository/migration/ 301
/next/usage/multi-factor-authentication /next/usage/user-setting/multi-factor-authentication/ 301
/next/usage/permissions /next/usage/access-control/permissions/ 301
/next/usage/profile-readme /next/usage/repository/profile-readme/ 301
/next/usage/protected-tags /next/usage/access-control/protected-tags/ 301
/next/usage/pull-request /next/usage/issues-prs/pull-request/ 301
/next/usage/push /next/usage/repository/push/ 301
/next/usage/push-options /next/usage/repository/push/ 301
/next/usage/push-to-create /next/usage/repository/push/ 301
/next/usage/repo-mirror /next/usage/repository/repo-mirror/ 301
/next/usage/secrets /next/usage/actions/secrets/ 301
/next/usage/template-repositories /next/usage/repository/template-repositories/ 301
/next/usage/webhooks /next/usage/repository/webhooks/ 301
# ... and under simplified chinese, develop.
/zh-cn/next/actions /zh-cn/next/usage/actions/ 301
/zh-cn/next/actions/ /zh-cn/next/usage/actions/ 301
/zh-cn/next/administration /zh-cn/next/category/administration/ 301
/zh-cn/next/administration/ /zh-cn/next/category/administration/ 301
/zh-cn/next/administration/logging-configuration /zh-cn/next/administration/logging-config/ 301
/zh-cn/next/advanced/adding-legal-pages /zh-cn/next/administration/adding-legal-pages/ 301
/zh-cn/next/advanced/clone-filters /zh-cn/next/usage/repository/clone-filters/ 301
/zh-cn/next/advanced/cmd-embedded /zh-cn/next/administration/cmd-embedded/ 301
/zh-cn/next/advanced/config-cheat-sheet /zh-cn/next/administration/config-cheat-sheet/ 301
/zh-cn/next/advanced/customizing-gitea /zh-cn/next/administration/customizing-gitea/ 301
/zh-cn/next/advanced/environment-variables /zh-cn/next/administration/environment-variables/ 301
/zh-cn/next/advanced/external-renderers /zh-cn/next/administration/external-renderers/ 301
/zh-cn/next/advanced/logging-configuration /zh-cn/next/administration/logging-config/ 301
/zh-cn/next/advanced/mail-templates /zh-cn/next/administration/mail-templates/ 301
/zh-cn/next/advanced/protected-tags /zh-cn/next/usage/access-control/protected-tags/ 301
/zh-cn/next/advanced/repo-indexer /zh-cn/next/administration/repo-indexer/ 301
/zh-cn/next/advanced/repo-mirror /zh-cn/next/usage/repository/repo-mirror/ 301
/zh-cn/next/advanced/search-engines-indexation /zh-cn/next/administration/search-engines-indexation/ 301
/zh-cn/next/advanced/signing /zh-cn/next/administration/signing/ 301
/zh-cn/next/developers/api-usage /zh-cn/next/development/api-usage/ 301
/zh-cn/next/developers/integrations /zh-cn/next/development/integrations/ 301
/zh-cn/next/developers/migrations-interfaces /zh-cn/next/development/migrations-interfaces/ 301
/zh-cn/next/developers/oauth2-provider /zh-cn/next/development/oauth2-provider/ 301
/zh-cn/next/development /zh-cn/next/category/development/ 301
/zh-cn/next/development/ /zh-cn/next/category/development/ 301
/zh-cn/next/features/authentication /zh-cn/next/administration/authentication/ 301
/zh-cn/next/features/comparison /zh-cn/next/installation/comparison/ 301
/zh-cn/next/features/webhooks /zh-cn/next/usage/repository/webhooks/ 301
/zh-cn/next/help /zh-cn/next/category/help/ 301
/zh-cn/next/help/ /zh-cn/next/category/help/ 301
/zh-cn/next/help/seek-help /zh-cn/next/help/support/ 301
/zh-cn/next/installation /zh-cn/next/category/installation/ 301
/zh-cn/next/installation/ /zh-cn/next/category/installation/ 301
/zh-cn/next/installation/upgrade-from-gogs /zh-cn/next/category/installation/ 301
/zh-cn/next/upgrade/upgrade-from-gitea /zh-cn/next/installation/upgrade-from-gitea/ 301
/zh-cn/next/upgrade/upgrade-from-gogs /zh-cn/next/category/installation/ 301
/zh-cn/next/usage /zh-cn/next/category/usage/ 301
/zh-cn/next/usage/ /zh-cn/next/category/usage/ 301
/zh-cn/next/usage/actions/act-runner /runner/ 301
/zh-cn/next/usage/agit-setup /zh-cn/next/usage/issues-prs/agit/ 301
/zh-cn/next/usage/authentication /zh-cn/next/administration/authentication/ 301
/zh-cn/next/usage/automatically-linked-references /zh-cn/next/usage/issues-prs/automatically-linked-references/ 301
/zh-cn/next/usage/badge /zh-cn/next/usage/actions/badge/ 301
/zh-cn/next/usage/blame /zh-cn/next/usage/repository/blame/ 301
/zh-cn/next/usage/blocking-user /zh-cn/next/usage/access-control/blocking-user/ 301
/zh-cn/next/usage/clone-filters /zh-cn/next/usage/repository/clone-filters/ 301
/zh-cn/next/usage/code-owners /zh-cn/next/usage/repository/code-owners/ 301
/zh-cn/next/usage/command-line /zh-cn/next/administration/command-line/ 301
/zh-cn/next/usage/email-setup /zh-cn/next/administration/email-setup/ 301
/zh-cn/next/usage/git-lfs-setup /zh-cn/next/administration/git-lfs-setup/ 301
/zh-cn/next/usage/https-setup /zh-cn/next/administration/https-setup/ 301
/zh-cn/next/usage/incoming-email /zh-cn/next/usage/repository/incoming-email/ 301
/zh-cn/next/usage/issue-pull-request-templates /zh-cn/next/usage/issues-prs/issue-pull-request-templates/ 301
/zh-cn/next/usage/labels /zh-cn/next/usage/issues-prs/labels/ 301
/zh-cn/next/usage/markdown /zh-cn/next/usage/repository/markdown/ 301
/zh-cn/next/usage/merge-message-templates /zh-cn/next/usage/issues-prs/merge-message-templates/ 301
/zh-cn/next/usage/migration /zh-cn/next/usage/repository/migration/ 301
/zh-cn/next/usage/multi-factor-authentication /zh-cn/next/usage/user-setting/multi-factor-authentication/ 301
/zh-cn/next/usage/permissions /zh-cn/next/usage/access-control/permissions/ 301
/zh-cn/next/usage/profile-readme /zh-cn/next/usage/repository/profile-readme/ 301
/zh-cn/next/usage/protected-tags /zh-cn/next/usage/access-control/protected-tags/ 301
/zh-cn/next/usage/pull-request /zh-cn/next/usage/issues-prs/pull-request/ 301
/zh-cn/next/usage/push /zh-cn/next/usage/repository/push/ 301
/zh-cn/next/usage/push-options /zh-cn/next/usage/repository/push/ 301
/zh-cn/next/usage/push-to-create /zh-cn/next/usage/repository/push/ 301
/zh-cn/next/usage/repo-mirror /zh-cn/next/usage/repository/repo-mirror/ 301
/zh-cn/next/usage/secrets /zh-cn/next/usage/actions/secrets/ 301
/zh-cn/next/usage/template-repositories /zh-cn/next/usage/repository/template-repositories/ 301
/zh-cn/next/usage/webhooks /zh-cn/next/usage/repository/webhooks/ 301
# ... and under traditional chinese, develop.
/zh-tw/next/actions /zh-tw/next/usage/actions/ 301
/zh-tw/next/actions/ /zh-tw/next/usage/actions/ 301
/zh-tw/next/administration /zh-tw/next/category/administration/ 301
/zh-tw/next/administration/ /zh-tw/next/category/administration/ 301
/zh-tw/next/administration/logging-configuration /zh-tw/next/administration/logging-config/ 301
/zh-tw/next/advanced/adding-legal-pages /zh-tw/next/administration/adding-legal-pages/ 301
/zh-tw/next/advanced/clone-filters /zh-tw/next/usage/repository/clone-filters/ 301
/zh-tw/next/advanced/cmd-embedded /zh-tw/next/administration/cmd-embedded/ 301
/zh-tw/next/advanced/config-cheat-sheet /zh-tw/next/administration/config-cheat-sheet/ 301
/zh-tw/next/advanced/customizing-gitea /zh-tw/next/administration/customizing-gitea/ 301
/zh-tw/next/advanced/environment-variables /zh-tw/next/administration/environment-variables/ 301
/zh-tw/next/advanced/external-renderers /zh-tw/next/administration/external-renderers/ 301
/zh-tw/next/advanced/logging-configuration /zh-tw/next/administration/logging-config/ 301
/zh-tw/next/advanced/mail-templates /zh-tw/next/administration/mail-templates/ 301
/zh-tw/next/advanced/protected-tags /zh-tw/next/usage/access-control/protected-tags/ 301
/zh-tw/next/advanced/repo-indexer /zh-tw/next/administration/repo-indexer/ 301
/zh-tw/next/advanced/repo-mirror /zh-tw/next/usage/repository/repo-mirror/ 301
/zh-tw/next/advanced/search-engines-indexation /zh-tw/next/administration/search-engines-indexation/ 301
/zh-tw/next/advanced/signing /zh-tw/next/administration/signing/ 301
/zh-tw/next/developers/api-usage /zh-tw/next/development/api-usage/ 301
/zh-tw/next/developers/integrations /zh-tw/next/development/integrations/ 301
/zh-tw/next/developers/migrations-interfaces /zh-tw/next/development/migrations-interfaces/ 301
/zh-tw/next/developers/oauth2-provider /zh-tw/next/development/oauth2-provider/ 301
/zh-tw/next/development /zh-tw/next/category/development/ 301
/zh-tw/next/development/ /zh-tw/next/category/development/ 301
/zh-tw/next/features/authentication /zh-tw/next/administration/authentication/ 301
/zh-tw/next/features/comparison /zh-tw/next/installation/comparison/ 301
/zh-tw/next/features/webhooks /zh-tw/next/usage/repository/webhooks/ 301
/zh-tw/next/help /zh-tw/next/category/help/ 301
/zh-tw/next/help/ /zh-tw/next/category/help/ 301
/zh-tw/next/help/seek-help /zh-tw/next/help/support/ 301
/zh-tw/next/installation /zh-tw/next/category/installation/ 301
/zh-tw/next/installation/ /zh-tw/next/category/installation/ 301
/zh-tw/next/installation/upgrade-from-gogs /zh-tw/next/category/installation/ 301
/zh-tw/next/upgrade/upgrade-from-gitea /zh-tw/next/installation/upgrade-from-gitea/ 301
/zh-tw/next/upgrade/upgrade-from-gogs /zh-tw/next/category/installation/ 301
/zh-tw/next/usage /zh-tw/next/category/usage/ 301
/zh-tw/next/usage/ /zh-tw/next/category/usage/ 301
/zh-tw/next/usage/actions/act-runner /runner/ 301
/zh-tw/next/usage/agit-setup /zh-tw/next/usage/issues-prs/agit/ 301
/zh-tw/next/usage/authentication /zh-tw/next/administration/authentication/ 301
/zh-tw/next/usage/automatically-linked-references /zh-tw/next/usage/issues-prs/automatically-linked-references/ 301
/zh-tw/next/usage/badge /zh-tw/next/usage/actions/badge/ 301
/zh-tw/next/usage/blame /zh-tw/next/usage/repository/blame/ 301
/zh-tw/next/usage/blocking-user /zh-tw/next/usage/access-control/blocking-user/ 301
/zh-tw/next/usage/clone-filters /zh-tw/next/usage/repository/clone-filters/ 301
/zh-tw/next/usage/code-owners /zh-tw/next/usage/repository/code-owners/ 301
/zh-tw/next/usage/command-line /zh-tw/next/administration/command-line/ 301
/zh-tw/next/usage/email-setup /zh-tw/next/administration/email-setup/ 301
/zh-tw/next/usage/git-lfs-setup /zh-tw/next/administration/git-lfs-setup/ 301
/zh-tw/next/usage/https-setup /zh-tw/next/administration/https-setup/ 301
/zh-tw/next/usage/incoming-email /zh-tw/next/usage/repository/incoming-email/ 301
/zh-tw/next/usage/issue-pull-request-templates /zh-tw/next/usage/issues-prs/issue-pull-request-templates/ 301
/zh-tw/next/usage/labels /zh-tw/next/usage/issues-prs/labels/ 301
/zh-tw/next/usage/markdown /zh-tw/next/usage/repository/markdown/ 301
/zh-tw/next/usage/merge-message-templates /zh-tw/next/usage/issues-prs/merge-message-templates/ 301
/zh-tw/next/usage/migration /zh-tw/next/usage/repository/migration/ 301
/zh-tw/next/usage/multi-factor-authentication /zh-tw/next/usage/user-setting/multi-factor-authentication/ 301
/zh-tw/next/usage/permissions /zh-tw/next/usage/access-control/permissions/ 301
/zh-tw/next/usage/protected-tags /zh-tw/next/usage/access-control/protected-tags/ 301
/zh-tw/next/usage/pull-request /zh-tw/next/usage/issues-prs/pull-request/ 301
/zh-tw/next/usage/push /zh-tw/next/usage/repository/push/ 301
/zh-tw/next/usage/push-options /zh-tw/next/usage/repository/push/ 301
/zh-tw/next/usage/push-to-create /zh-tw/next/usage/repository/push/ 301
/zh-tw/next/usage/repo-mirror /zh-tw/next/usage/repository/repo-mirror/ 301
/zh-tw/next/usage/secrets /zh-tw/next/usage/actions/secrets/ 301
/zh-tw/next/usage/template-repositories /zh-tw/next/usage/repository/template-repositories/ 301
/zh-tw/next/usage/webhooks /zh-tw/next/usage/repository/webhooks/ 301
# Runner versions that were published under their full number, and the develop
# runner docs, which used to be `next`.
/runner/0.2.11/* /runner/0/:splat 301
/runner/1.0.8/* /runner/1/:splat 301
/runner/next/* /runner/develop/:splat 301
-34
View File
@@ -1,34 +0,0 @@
{
"_comment": "Algolia DocSearch crawler configuration. The three facets come from the docsearch:* meta tags every page carries; only the versions people read are indexed, the older ones stay reachable through the version picker.",
"index_name": "gitea",
"start_urls": [
"https://docs.gitea.com/",
"https://docs.gitea.com/next/",
"https://docs.gitea.com/zh-cn/",
"https://docs.gitea.com/zh-tw/",
"https://docs.gitea.com/runner/",
"https://docs.gitea.com/cli/",
"https://docs.gitea.com/api/",
"https://docs.gitea.com/enterprise/"
],
"sitemap_urls": ["https://docs.gitea.com/sitemap-index.xml"],
"exclusion_patterns": [
"https://docs.gitea.com/1.2*/**",
"https://docs.gitea.com/*/1.2*/**",
"https://docs.gitea.com/api/1.2*/**",
"https://docs.gitea.com/runner/[0-9]/**",
"https://docs.gitea.com/cli/[0-9]*/**"
],
"selectors": {
"lvl0": { "selector": "//nav[contains(@aria-labelledby,'starlight__sidebar')]//a[@aria-current='page']/ancestor::details//summary//span", "type": "xpath", "global": true, "default_value": "Documentation" },
"lvl1": ".sl-markdown-content h1, h1",
"lvl2": ".sl-markdown-content h2",
"lvl3": ".sl-markdown-content h3",
"lvl4": ".sl-markdown-content h4",
"text": ".sl-markdown-content p, .sl-markdown-content li, .sl-markdown-content td"
},
"custom_settings": {
"attributesForFaceting": ["product", "version", "language"]
},
"conversation_id": []
}
+2 -2
View File
@@ -12,10 +12,10 @@ Some jurisdictions (such as EU), requires certain legal pages (e.g. Privacy Poli
## Getting Pages
Gitea source code ships with sample pages, available in `contrib/service/sample-page` directory. Copy them to `custom/public/assets/`. For example, to add Privacy Policy:
Gitea source code ships with sample pages, available in `contrib/legal` directory. Copy them to `custom/public/assets/`. For example, to add Privacy Policy:
```bash
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/service/sample-page/privacy.html.sample
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
```
Now you need to edit the page to meet your requirements. In particular you must change the email addresses, web addresses and references to "Your Gitea Instance" to match your situation.
-153
View File
@@ -1,153 +0,0 @@
---
date: "2026-09-12T00:00:00+00:00"
slug: "audit-logging"
sidebar_position: 41
aliases:
- /en-us/audit-logging
---
# Audit Logging
Gitea can record security-relevant events as structured audit records: each
event has an `action`, `actor`, `scope`, `origin`, `message` and a JSON
`metadata` blob. Recording is **off by default** and does not change request
behavior when it is disabled.
This is separate from the application, router and access logs described in
[Logging Configuration](logging-config.md). Those logs are for operations and
debugging. The audit log is a durable trail of who changed what.
## Enable recording
Set `[audit].RECORD_OUTPUT` to `database` in `app.ini` and restart Gitea:
```ini
[audit]
RECORD_OUTPUT = database
RETENTION_DAYS = 30
```
Invalid values of `RECORD_OUTPUT` fall back to `disabled`. See the
[configuration cheat sheet](config-cheat-sheet.md#audit-audit) for every option.
With Docker, the same settings can be applied as
`GITEA__audit__RECORD_OUTPUT=database` and `GITEA__audit__RETENTION_DAYS=30`
before Gitea writes them into `app.ini`.
## View events
The Audit Log pages are always available and still list any events that were
stored earlier. When recording is disabled, the site administration page also
shows a warning.
| Audience | Location | Events shown |
| --- | --- | --- |
| Site administrators | Site administration → Monitoring → Audit Log (`/-/admin/monitor/audit_logs`) | Every event |
| Signed-in users | User settings → Audit Log (`/user/settings/audit_logs`) | Events scoped to that user |
| Organization owners | Organization settings → Audit Log (`/<org>/settings/audit_logs`) | Events scoped to that organization |
| Repository administrators | Repository settings → Audit Log (`/<owner>/<repo>/settings/audit_logs`) | Events scoped to that repository |
Each listing can be filtered by actor (username), action and origin, and sorted
by timestamp. The actor filter does not match the
[system actors](#actors-and-origins). Action filters accept an exact action or
a family prefix such as `user:impersonation` or `repository:webhook`.
Site administrators can download the current filtered result as JSONL
(newline-delimited JSON) from **Export JSONL**. The file name is
`gitea-audit-log-<timestamp>.jsonl`.
## Event shape
A recorded event contains:
- **Action**: a stable, colon-separated identifier such as `repository:archive`
or `user:accesstoken:add`.
- **Actor**: the user who performed the action. Actions taken while impersonating
a user record both the impersonator and the impersonated user.
- **Actor credential**: when the request authenticated with a named credential,
the event stores its kind and id, never the secret. Typical values:
`access-token:<id>`, `oauth2-grant:<id>`, `gitea-actions:<task id>`,
`deploy-key:<key id>`.
- **Scope**: the affected unit — `user`, `organization`, `repository` or
`system` (instance-wide).
- **Origin**: how the action was initiated — `ui`, `api`, `cli` or `system`.
- **Message**: a human-readable sentence rendered from a per-action template.
- **Metadata**: extra fields that fill the message template (token name, new
visibility, and so on). Secrets and token values are not stored.
- **IP address**: the client address of the request, when one exists. Events
triggered by a git push record the SSH client address for SSH pushes and
`127.0.0.1` for HTTP pushes.
- **Timestamp**: when the event was recorded.
An exported JSONL line looks like:
```json
{"action":"repository:archive","actor":{"type":"user","id":1,"name":"alice"},"scope":{"type":"repository","id":42,"name":"org/repo"},"message":"Archived repository org/repo.","time":"2026-09-12T11:00:00Z","ip_address":"203.0.113.10","origin":"ui"}
```
The `system:startup` message is kept stable across Gitea versions so operators
can parse it: `System started [Gitea {version}]`.
## Actors and origins
Most web and API requests pick up the signed-in user automatically.
Other entry points record a system actor:
- `gitea:cli` for `gitea admin` commands and the `system:startup` and
`system:shutdown` events
- `gitea:auth-source` for authentication-source syncs and for users an
authentication source creates or updates at sign-in
- `gitea-actions` for Gitea Actions tasks
- `gitea:deploy-key` for pushes with a deploy key
- `(Cron)` for scheduled cron tasks
- `Unknown` when no actor can be resolved
Events of the `gitea:cli` actor use origin `cli`. Cron tasks, git hooks and
other background work use origin `system`.
## What is recorded
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, 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,
OAuth2 applications, secrets, webhooks
- **Repository**: create, fork, archive, delete, rename, visibility, transfer,
mirrors, signing verification, collaborators and teams, default branch,
branch and tag protection, deploy keys, webhooks, secrets
- **Issues and pull requests**: create, delete, comments and merges
- **Projects and wiki pages**: create, update and delete
- **Actions**: enable, disable and dispatch a workflow
- **System**: startup and shutdown, instance-wide webhooks, authentication
sources, instance-wide OAuth2 applications
Recording never fails the request that triggered it. A write error is logged
and the original operation continues.
## What is not recorded
- Read-only access such as browsing, clone, fetch or API GET requests
- Logins, successful or failed, other than failed two-factor authentication
(use the [access log](logging-config.md) and
[Fail2ban Setup](fail2ban-setup.md) for authentication traffic)
- Edits to issues and pull requests
- Token or secret values
- Which SSH key a real user pushed with (deploy keys are named; ordinary SSH
user pushes are not)
## Retention
`RETENTION_DAYS` (default **30**) is the age after which recorded events are
eligible for deletion. Set it to `0` to keep events forever.
Cleanup is performed by the `cron.delete_old_audit_events` task (`SCHEDULE`
defaults to `@every 24h`, `OLDER_THAN` defaults to `[audit].RETENTION_DAYS`).
The task is registered only while `RECORD_OUTPUT` records events **and**
`RETENTION_DAYS` is greater than `0`. Turning recording off therefore also
stops pruning; existing rows stay until you delete them or turn recording back
on.
+5 -88
View File
@@ -18,13 +18,12 @@ Both the LDAP via BindDN and the simple auth LDAP share the following fields:
- Host **(required)**
- 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`
- The address where the LDAP server can be reached.
- Example: `mydomain.com`
- Port **(required)**
- The port to use when connecting to hosts given without a URL.
- The port to use when connecting to the server.
- Example: `389` for LDAP or `636` for LDAP SSL
- Enable TLS Encryption (optional)
@@ -338,13 +337,9 @@ The default login user email is `X-WEBAUTH-EMAIL`, you can change it via changin
If set `ENABLE_REVERSE_PROXY_FULL_NAME=true`, a user full name expected in `X-WEBAUTH-FULLNAME` will be assigned to the user when auto creating the user. You can also change the header name with `REVERSE_PROXY_AUTHENTICATION_FULL_NAME`.
It applies to the web interface, Git over HTTP, Git LFS and the package registry.
You can also limit the reverse proxy's IP address range with `REVERSE_PROXY_TRUSTED_PROXIES` which default value is `127.0.0.0/8,::1/128`. By `REVERSE_PROXY_LIMIT`, you can limit trusted proxies level.
:::warning
Gitea trusts these headers on every request it receives. Make sure Gitea is only reachable through your authenticating proxy, and that the proxy sets or removes these headers on every request, including on paths you exempt from authentication, for example for Git or package clients. `REVERSE_PROXY_TRUSTED_PROXIES` does not restrict them.
:::
To also accept them on the REST API under `/api/v1`, enable:
You can enable the this authentication method for the API with
```ini
[service]
@@ -354,81 +349,3 @@ ENABLE_REVERSE_PROXY_AUTHENTICATION_API = true
:::note
When this method is enabled for the API, the reverse proxy is responsible for handling CSRF protection.
:::
## OAuth2 and OpenID Connect
Gitea can delegate the login to an external OAuth2 or OpenID Connect provider,
which is what "Sign in with ..." on the login page uses. This is the client side
of the protocol; for the other direction, using a Gitea instance as the provider
for another application, see
[Gitea as an OAuth2 provider](../development/oauth2-provider.md).
A source is added under `Site Administration -> Identity & Access ->
Authentication Sources -> Add Authentication Source`, with `OAuth2` as the
authentication type, or on the command line with
`gitea admin auth add-oauth`. The fields are:
- **Authentication Name (required)**
- The name of the source. It is part of the callback URL, so it cannot be
changed later without registering a new callback URL at the provider.
- **OAuth2 Provider (required)**
- `OpenID Connect` for any provider that implements OpenID Connect discovery
(Keycloak, Authentik, Authelia, Entra ID, Okta, Zitadel and others), or one
of the providers Gitea knows about directly: Gitea, GitHub, GitLab, Google,
Discord, Bitbucket, Dropbox, Facebook, Mastodon, Nextcloud, Twitter, Yandex
and Azure AD v2.
- **Client ID (Key)** and **Client Secret (required)**
- The credentials of the application registered at the provider.
- **OpenID Connect Auto Discovery URL**
- Only for the `OpenID Connect` provider: the discovery document of the
provider, usually `https://provider.example.com/.well-known/openid-configuration`.
Gitea reads the endpoints from it.
- **Additional Scopes**
- Scopes to request on top of the ones the provider needs by default. For
OpenID Connect, `openid` is always added, and the scopes are taken from
`OPENID_CONNECT_SCOPES` in `app.ini` when it is set.
- **Required Claim Name** and **Required Claim Value**
- Restrict the login to accounts whose token carries this claim, optionally
with this exact value.
- **Claim name providing group names**, **Group Claim value for administrator
users**, **Group Claim value for restricted users** and **Map claimed groups
to Organization teams**
- Grant the administrator or the restricted flag, and organization team
membership, from the groups the provider reports. They all need the claim
name to be set.
- **Icon URL**
- Image shown next to the button on the login page.
Register `{ROOT_URL}/user/oauth2/{Authentication Name}/callback` as the
redirect URI at the provider, for example
`https://gitea.example.com/user/oauth2/keycloak/callback` for a source named
`keycloak`. A wrong redirect URI is the most common reason for the login to
fail at the provider.
What happens to accounts that log in this way is configured in `app.ini`, see
[OAuth2 Client](config-cheat-sheet.md#oauth2-client-oauth2_client):
```ini title="app.ini"
[oauth2_client]
; create an account for a user who logs in for the first time
ENABLE_AUTO_REGISTRATION = true
; where the username of a new account comes from
USERNAME = nickname
; what to do when the username or email is already taken
ACCOUNT_LINKING = login
```
+1 -1
View File
@@ -83,7 +83,7 @@ cd gitea-dump-1610949662
mv app.ini /etc/gitea/conf/app.ini
mv data/* /var/lib/gitea/data/
mv log/* /var/lib/gitea/log/
mv repos/* /var/lib/gitea/data/gitea-repositories/
mv repos/* /var/lib/gitea/data/repositories/
chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea
# mysql
+7
View File
@@ -50,6 +50,13 @@ 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
+8 -11
View File
@@ -45,9 +45,6 @@ Starts the server:
- Gitea should not be run as root. To bind to a port below 1024, you can use setcap on
Linux: `sudo setcap 'cap_net_bind_service=+ep' /path/to/gitea`. This will need to be
redone every time you update Gitea.
A systemd unit can grant the capability to the process instead, which survives an
upgrade and works with SELinux in enforcing mode, see
[running Gitea with SELinux](../installation/selinux.md).
### admin
@@ -205,8 +202,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. Required.
- `--skip-tls-verify`: Disable TLS verification.
- `--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.
- `--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.
- `--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 +228,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name.
- `--skip-tls-verify`: Disable TLS verification.
- `--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.
- `--host value`: The address where the LDAP server can be reached.
- `--port value`: The port to use when connecting to the LDAP server.
- `--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 +254,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name. Required.
- `--skip-tls-verify`: Disable TLS verification.
- `--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.
- `--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.
- `--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 +276,8 @@ Admin operations:
- `--not-active`: Deactivate the authentication source.
- `--security-protocol value`: Security protocol name.
- `--skip-tls-verify`: Disable TLS verification.
- `--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.
- `--host value`: The address where the LDAP server can be reached.
- `--port value`: The port to use when connecting to the LDAP server.
- `--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.
File diff suppressed because it is too large. Load diff
+12 -15
View File
@@ -85,8 +85,6 @@ To obtain any embedded file (including templates), the [`gitea embedded` tool](.
Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and
shouldn't be touched without fully understanding these components.
Gitea pages are protected by Content-Security-Policy, use `<script nonce="{{ctx.CspScriptNonce}}">...</script>` for script tags.
### Customizing startpage / homepage
Copy [`home.tmpl`](https://github.com/go-gitea/gitea/blob/main/templates/home.tmpl) for your version of Gitea from `templates` to `$GITEA_CUSTOM/templates`.
@@ -138,10 +136,10 @@ The data is encoded and sent to the PlantUML server which generates the picture.
demo server at http://www.plantuml.com/plantuml, but if you (or your users) have sensitive data you
can set up your own [PlantUML server](https://plantuml.com/server) instead. To set up PlantUML rendering,
copy JavaScript files from https://gitea.com/davidsvantesson/plantuml-code-highlight and put them in your
`$GITEA_CUSTOM/public/assets/` folder. Then add the following to `$GITEA_CUSTOM/templates/custom/footer.tmpl`:
`$GITEA_CUSTOM/public/assets/` folder. Then add the following to `custom/footer.tmpl`:
```html
<script nonce="{{ctx.CspScriptNonce}}">
<script>
$(async () => {
if (!$('.language-plantuml').length) return;
await Promise.all([
@@ -187,18 +185,18 @@ nano $GITEA_CUSTOM/templates/custom/footer.tmpl
```
```html
<script nonce="{{ctx.CspScriptNonce}}">
<script>
function onPageChange() {
// Supported 3D file types
const fileTypes = ['3dm', '3ds', '3mf', 'amf', 'bim', 'brep', 'dae', 'fbx', 'fcstd', 'glb', 'gltf', 'ifc', 'igs', 'iges', 'stp', 'step', 'stl', 'obj', 'off', 'ply', 'wrl'];
// Select matching link
const links = Array.from(document.querySelectorAll('a.ui.mini.basic.button'));
const link3D = links.find(link => {
const href = link.href.toLowerCase();
return href.includes('/raw/') && fileTypes.some(ext => href.endsWith(`.${ext}`));
});
if (link3D) {
const existingScript = document.querySelector('script[src="/assets/o3dv/o3dv.min.js"]');
@@ -228,11 +226,11 @@ nano $GITEA_CUSTOM/templates/custom/footer.tmpl
newView3D.style.flexGrow = '1';
newView3D.style.minHeight = '0';
newView3D.style.width = '100%';
const header = document.querySelector('header');
const headerHeight = header ? header.offsetHeight : 0;
newView3D.style.height = `calc(100vh - ${headerHeight}px)`;
newView3D.style.height = `calc(100vh - ${headerHeight}px)`;
// Append the new container inside fileView
fileView.appendChild(newView3D);
@@ -275,7 +273,7 @@ nano $GITEA_CUSTOM/templates/custom/footer.tmpl
};
// Run when the page is fully loaded
document.addEventListener('DOMContentLoaded', onPageChange);
document.addEventListener('DOMContentLoaded', onPageChange);
const targetSelector = 'a.ui.mini.basic.button[href*="/raw/"]';
let lastHref = null;
@@ -291,7 +289,7 @@ nano $GITEA_CUSTOM/templates/custom/footer.tmpl
const fileName = currentHref.split('/').pop();
console.log('New Raw file link detected after delay:', fileName);
onPageChange();
}
};
@@ -396,16 +394,15 @@ Starting with Gitea 1.20, you can customize the git configuration via the `git.c
### Enabling signed git pushes
[Signed pushes](https://git-scm.com/docs/git-push#Documentation/git-push.txt---signedtruefalseif-asked) allow clients to cryptographically sign the push operation itself (not just individual commits). To enable signed pushes, add the following to `app.ini`:
To enable signed git pushes, set these two options:
```ini
[git.config]
receive.advertisePushOptions = true
receive.certNonceSeed = <randomstring>
```
`certNonceSeed` should be set to a random string and be kept secret. It is used to generate anti-replay nonces. Gitea already sets `receive.advertisePushOptions = true` by default, so no additional configuration is needed. Note that Gitea does not read `/etc/gitconfig`, so this option must be set via `app.ini` as shown above.
On the client side, pushes can be signed via `git push --signed` or enabled permanently using `git config --global push.gpgSign if-asked`.
`certNonceSeed` should be set to a random string and be kept secret.
### Labels
-15
View File
@@ -86,21 +86,6 @@ PROTOCOL = smtps
Note that you'll need to create and use an [App password](https://support.google.com/accounts/answer/185833?hl=en) by enabling 2FA on your Google
account. You won't be able to use your Google account password directly.
An app password is the only option: Google
[turned off access for apps that sign in with a password alone](https://workspaceupdates.googleblog.com/2023/09/winding-down-google-sync-and-less-secure-apps-support.html)
in 2024 and asks applications to use OAuth instead, which Gitea's mailer does
not implement — it authenticates with `CRAM-MD5`, `PLAIN` or `LOGIN`.
Two things to keep in mind:
- app passwords require 2-step verification on the account, and a Google
Workspace administrator can switch them off for the whole domain. If they are
not available, send through the
[Workspace SMTP relay service](https://support.google.com/a/answer/2956491)
or through another mail provider.
- port `587` works as well, with `SMTP_PORT = 587` and
`PROTOCOL = smtp+starttls`.
### ProtonMail
This feature is currently only available for select Proton for Business customers and those with Visionary and Family plans with custom domain addresses. See [ProtonMail's SMTP documentation](https://proton.me/support/smtp-submission) for more information. This limitation can be circumvented by using the ProtonMail Bridge application.
-21
View File
@@ -41,24 +41,3 @@ client that causes SSH transfers to hang: https://github.com/git-lfs/git-lfs/pul
This can be worked around on all the client machines by setting the git config:
`git config --global lfs.ssh.automultiplex false`
:::
# Changing LFS files through the API
The [contents API](https://docs.gitea.com/api/operations/repo-change-files/)
works on LFS tracked files as well: send the file content as usual and Gitea
stores it as an LFS object and commits a pointer file, as long as the path is
matched by a `filter=lfs` rule in `.gitattributes`.
What is easy to get wrong is the `sha` of the file being changed, which
`PUT`/`DELETE /repos/{owner}/{repo}/contents/{filepath}` and
`POST /repos/{owner}/{repo}/contents` require for an existing file. Gitea
compares it with the ID of the blob the commit has at that path, and for an LFS
tracked file that blob is the **pointer file**, not the content:
- use the `sha` returned by
[`GET /repos/{owner}/{repo}/contents/{filepath}`](https://docs.gitea.com/api/operations/repo-get-contents/)
- do not use `lfs_oid` from the same response, which identifies the LFS object,
and do not use a checksum of the file itself
Sending anything else fails with `sha does not match`, even though the request
looks correct.
-22
View File
@@ -78,28 +78,6 @@ [email protected]
To learn more about the config values, please checkout the [Config Cheat Sheet](./config-cheat-sheet.md#server-server).
:::warning
`ACME_DIRECTORY` is where the account key and the issued certificates are
cached, and the default `https` is a relative path, resolved against the working
directory of the Gitea process. In the official Docker image that working
directory is `/app/gitea`, which is part of the container and not of the `/data`
volume, so every recreated container starts without an account and without
certificates and asks the CA for new ones. Let's Encrypt allows
[5 certificates per week](https://letsencrypt.org/docs/rate-limits/) for the
same set of domains, after which the instance is left without a working
certificate until the limit expires.
Point the setting at a path inside the volume when running in a container:
```ini title="app.ini"
[server]
ACME_DIRECTORY=/data/gitea/https
```
The rootless image keeps its working directory (`/var/lib/gitea`) in a volume,
so it is only affected when that volume is not persisted.
:::
## Using a reverse proxy
Setup up your reverse proxy as shown in the [reverse proxy guide](../administration/reverse-proxies.md).
-2
View File
@@ -16,8 +16,6 @@ The logging configuration of Gitea mainly consists of 3 types of components:
There is a fully functional log output by default, so it is not necessary to define one.
Security-relevant events (repository transfers, token changes, impersonation, and similar) are recorded separately. See [Audit Logging](audit-logging.md).
## Collecting Logs for Help
To collect logs for help and issue report, see [Support Options](help/support.md).
+4 -5
View File
@@ -10,10 +10,9 @@ aliases:
## Builtin repository code search without 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.
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.
## Setting up the repository indexer
@@ -33,7 +32,7 @@ Please bear in mind that indexing the contents can consume a lot of system resou
### Choosing the files for indexing by size
The `MAX_FILE_SIZE` option will make the indexer skip all files larger than the specified value in bytes.
The `MAX_FILE_SIZE` option will make the indexer skip all files larger than the specified value.
### Choosing the files for indexing by path
+9 -23
View File
@@ -13,10 +13,8 @@ aliases:
1. Set `[server] ROOT_URL = https://git.example.com/` in your `app.ini` file.
2. Make the reverse-proxy pass `https://git.example.com/foo` to `http://gitea:3000/foo`.
3. Make sure the reverse-proxy does not decode the URI. The request `https://git.example.com/a%2Fb` should be passed as `http://gitea:3000/a%2Fb`.
4. Make sure `Host` and `X-Forwarded-Proto` headers are correctly passed to Gitea to make Gitea see the real URL being visited.
5. Make sure your webserver has a certificate, including all intermediate and RootCA certificates, for `git clone` and `git pull` to work.
6. Gitea uses a WebSocket connection at `/-/ws` for real-time updates like the notification counter. Make sure the reverse-proxy talks HTTP/1.1 and forwards the `Upgrade` and `Connection` headers, see the examples below. Without it, Gitea falls back to periodic polling.
7. Make sure the reverse-proxy sets the `X-Real-IP` header, otherwise Gitea uses a client-sent value. For example `header_up X-Real-IP {remote_host}` in Caddy's `reverse_proxy`, `RequestHeader set X-Real-IP "expr=%{REMOTE_ADDR}"` in Apache or `http-request set-header X-Real-IP %[src]` in HAProxy. To log the client port, also set `X-Real-Port`, for example `proxy_set_header X-Real-Port $remote_port;` in nginx.
4. Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea to make Gitea see the real URL being visited.
5. Make sure your webserver has a certificate, including all intermediate and RootCA certificates, for `git clone` and `git pull` to work.
### Use a sub-path
@@ -43,7 +41,6 @@ server {
location / {
client_max_body_size 512M;
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
@@ -70,7 +67,6 @@ server {
rewrite ^ $request_uri;
rewrite ^/(gitea($|/))?(.*) /$3 break;
proxy_pass http://127.0.0.1:3000$uri;
proxy_http_version 1.1;
# other common HTTP headers, see the "Nginx" config section above
proxy_set_header Connection $http_connection;
@@ -117,7 +113,6 @@ server {
}
location / {
# other directives, see the "Nginx" config section above
proxy_pass http://localhost:3000;
}
}
@@ -134,7 +129,6 @@ server {
server_name git.example.com;
location / {
# other directives, see the "Nginx" config section above
proxy_pass http://localhost:3000;
}
}
@@ -162,14 +156,14 @@ If you are using Nginx Proxy Manager to serve your Gitea instance it differs sli
It is [adding some directives](https://github.com/NginxProxyManager/nginx-proxy-manager/blob/master/docker/rootfs/etc/nginx/conf.d/include/proxy.conf) for a custom location by default, so you have to skip these from the above mentioned Nginx config. Otherwise Nginx will produce `400 bad request` error due to duplicated directives (`proxy_set_header Host $host` is the particularly problematic one).
So while creating the `/` Custom location, just add the following line to it's configuration:
So while creating the `/` Custom location, just add the following lines to it's configuration:
```nginx
client_max_body_size 512M;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
```
Enable `Websockets Support` on the proxy host, Nginx Proxy Manager then adds the WebSocket directives itself. Adding `proxy_http_version` on top of that makes Nginx refuse to start.
## Apache HTTPD
If you want Apache HTTPD to serve your Gitea instance, you can add the following to your Apache HTTPD configuration (usually located at `/etc/apache2/httpd.conf` in Ubuntu):
@@ -180,15 +174,13 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following
ProxyPreserveHost On
ProxyRequests off
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:3000/ nocanon upgrade=websocket
ProxyPass / http://localhost:3000/ nocanon
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>
```
:::note
The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
`upgrade=websocket` requires Apache HTTPD 2.4.48 or later. On older versions you **MUST** remove it, otherwise Apache HTTPD will not start.
:::
If you wish to use Let's Encrypt with webroot validation, add the line `ProxyPass /.well-known !` before `ProxyPass` to disable proxying these requests to Gitea.
@@ -206,7 +198,7 @@ In case you already have a site, and you want Gitea to share the domain name, yo
</Proxy>
AllowEncodedSlashes NoDecode
# Note: no trailing slash after either /git or port
ProxyPass /git http://localhost:3000 nocanon upgrade=websocket
ProxyPass /git http://localhost:3000 nocanon
ProxyPreserveHost On
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>
@@ -215,7 +207,7 @@ In case you already have a site, and you want Gitea to share the domain name, yo
Then you **MUST** set something like `[server] ROOT_URL = http://git.example.com/git/` correctly in your configuration.
:::note
The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`. `upgrade=websocket` requires Apache HTTPD 2.4.48 or later, remove it on older versions.
The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
:::
## Apache HTTPD and serve static resources directly
@@ -256,16 +248,12 @@ Set `[server] STATIC_URL_PREFIX = /_/static` in your configuration.
AllowEncodedSlashes NoDecode
# Note: no trailing slash after either /git or port
ProxyPass / http://localhost:3000/ nocanon upgrade=websocket
ProxyPass / http://localhost:3000/ nocanon
ProxyPreserveHost On
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>
```
:::note
The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`. `upgrade=websocket` requires Apache HTTPD 2.4.48 or later, remove it on older versions.
:::
## Caddy
If you want Caddy to serve your Gitea instance, you can add the following server block to your Caddyfile:
@@ -300,13 +288,11 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a
- Install Application Request Routing (ARR for short) either by using the Microsoft Web Platform Installer 5.1 (WebPI) or downloading the extension from [IIS.net](https://www.iis.net/downloads/microsoft/application-request-routing)
- Once the module is installed in IIS, you will see a new Icon in the IIS Administration Console called URL Rewrite.
- Install the `WebSocket Protocol` Windows feature, otherwise ARR cannot proxy Gitea's WebSocket endpoint.
- Open the IIS Manager Console and click on the `Gitea Proxy` Website from the tree view on the left. Select and double click the URL Rewrite Icon from the middle pane to load the URL Rewrite interface.
- Choose the `Add Rule` action from the right pane of the management console and select the `Reverse Proxy Rule` from the `Inbound and Outbound Rules` category.
- In the Inbound Rules section, set the server name to be the host that Gitea is running on with its port. e.g. if you are running Gitea on the localhost with port 3000, the following should work: `127.0.0.1:3000`
- Enable SSL Offloading
- In the Outbound Rules, ensure `Rewrite the domain names of the links in HTTP response` is set and set the `From:` field as above and the `To:` to your external hostname, say: `git.example.com`
- Turn `Reverse rewrite host in response headers` off, in the `Server Proxy Settings` of Application Request Routing (select the server node in the IIS Manager, open `Application Request Routing Cache`, then `Server Proxy Settings` in the right pane). While it is on, ARR rewrites the host of the `Location` header back to the internal one, so the redirects Gitea sends after a sign-in or a form submission send the browser to `127.0.0.1:3000` instead of `git.example.com`.
- Now edit the `web.config` for your website to match the following: (changing `127.0.0.1:3000` and `git.example.com` as appropriate)
```xml
@@ -9,7 +9,7 @@ Thank you for your interest in contributing to Gitea! This guide will help you u
## Getting Started
Before you start contributing, please read our [Hacking on Gitea](../development/hacking-on-gitea) guide to set up your development environment.
Before you start contributing, please read our [Hacking on Gitea](../development/hacking-on-gitea.md) guide to set up your development environment.
## Contribution Guidelines
@@ -17,7 +17,7 @@ We have specific guidelines for different types of contributions:
### Backend Development
If you're working on backend code (Go), please follow our [Guidelines for Backend Development](./guidelines-backend). This includes:
If you're working on backend code (Go), please follow our [Guidelines for Backend Development](guidelines-backend.md). This includes:
- Package design and dependencies
- Database operations and migrations
@@ -26,7 +26,7 @@ If you're working on backend code (Go), please follow our [Guidelines for Backen
### Frontend Development
For frontend contributions (JavaScript, CSS, Vue), refer to our [Guidelines for Frontend Development](./guidelines-frontend). This covers:
For frontend contributions (JavaScript, CSS, Vue), refer to our [Guidelines for Frontend Development](guidelines-frontend.md). This covers:
- Framework usage (Vue3, Fomantic-UI)
- Code style and best practices
@@ -35,7 +35,7 @@ For frontend contributions (JavaScript, CSS, Vue), refer to our [Guidelines for
### Refactoring
When refactoring existing code, follow our [Guidelines for Refactoring](./guidelines-refactoring) to ensure:
When refactoring existing code, follow our [Guidelines for Refactoring](guidelines-refactoring.md) to ensure:
- Clear refactoring objectives
- Proper review process
@@ -44,7 +44,7 @@ When refactoring existing code, follow our [Guidelines for Refactoring](./guidel
### Localization
To contribute translations or localization improvements, see our [Localization Guide](./localization) which explains:
To contribute translations or localization improvements, see our [Localization Guide](localization.md) which explains:
- How to contribute translations via Crowdin
- Supported languages
-1
View File
@@ -73,7 +73,6 @@ By default, this creates a token with very limited permissions. To complete your
- `activitypub`
- `admin`
- `commitstatus` (included in `repository`)
- `issue`
- `misc`
- `notification`
+1 -6
View File
@@ -111,9 +111,6 @@ Gitea token scopes are as follows:
| **admin** | `/admin/*` API routes: Site-wide administrative operations (hidden for non-admin accounts). |
| &nbsp;&nbsp;&nbsp; **read:admin** | Grants read access for admin operations, such as getting cron jobs or registered user emails. |
| &nbsp;&nbsp;&nbsp; **write:admin** | Grants read/write/delete access for admin operations, such as running cron jobs or updating user accounts. |
| **commitstatus** | `/repos/{owner}/{repo}/statuses/{sha}` and `/repos/{owner}/{repo}/commits/{ref}/status(es)` API routes: Commit status operations. |
| &nbsp;&nbsp;&nbsp; **read:commitstatus** | Grants read access to commit statuses. Included in `read:repository`. |
| &nbsp;&nbsp;&nbsp; **write:commitstatus** | Grants read/write access to commit statuses, such as reporting CI results. Included in `write:repository`. |
| **issue** | `issues/*`, `labels/*`, `milestones/*` API routes: Issue-related operations. |
| &nbsp;&nbsp;&nbsp; **read:issue** | Grants read access for issues operations, such as getting issue comments, issue attachments, and milestones. |
| &nbsp;&nbsp;&nbsp; **write:issue** | Grants read/write/delete access for issues operations, such as posting or editing an issue comment or attachment, and updating milestones. |
@@ -144,9 +141,7 @@ Gitea creates OAuth applications for the following services by default on startu
|-----------|-----------|---------|
|[git-credential-oauth](https://github.com/hickford/git-credential-oauth)|Git credential helper|`a4792ccc-144e-407e-86c9-5e7d8d9c3269`|
|[Git Credential Manager](https://github.com/git-ecosystem/git-credential-manager)|Git credential helper|`e90ee53c-94e2-48ac-9358-a874fb9e0662`|
|[Gitea CLI](https://gitea.com/gitea/cli)|Gitea CLI|`d57cb8c4-630c-4168-8324-ec79935e18d4`|
|Gitea App|Official Gitea mobile app|`b757811a-05c8-4c76-8d74-a5ee3d2073f2`|
|[gitea-vscode](https://gitea.com/gitea/gitea-vscode)|VS Code extension|`75a9ec3e-42b5-40cb-9144-9ea96ecd56a6`|
|[tea](https://gitea.com/gitea/tea)|tea|`d57cb8c4-630c-4168-8324-ec79935e18d4`|
To prevent unexpected behavior, they are being displayed as locked in the UI and their creation can instead be controlled by the `DEFAULT_APPLICATIONS` parameter in `app.ini`.
+20 -5
View File
@@ -33,7 +33,7 @@ then the config file (app.ini) should exists in the "custom/conf" directory of y
Some package vendors might use "/etc/gitea" to store the config file, while some others don't.
You could manually find the config file (app.ini) by checking Gitea's startup logs
or reading the Gitea Web's Site Administrator -> Configuration Summary.
or reading the Gitea Web's Site Administrator -> Confugiraton Summary.
If you are using some isolated enviroments like container (docker),
the path you see usually is not what it is in the host's filesystem.
@@ -134,13 +134,22 @@ 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. 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
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
### 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.
@@ -319,8 +328,14 @@ It is highly recommended to back-up your database before running these commands.
## How to adopt repositories from disk
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.
- 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.
## Gitea can't start on NFS
+1 -1
View File
@@ -43,7 +43,7 @@ You can try it out using [the online demo](https://demo.gitea.com).
- **Security**
Gitea places a strong emphasis on security, offering features such as user permission management, access control lists, [audit logging](administration/audit-logging.md), and more to ensure the security of code and data.
Gitea places a strong emphasis on security, offering features such as user permission management, access control lists, and more to ensure the security of code and data.
- **Code Review**
-1
View File
@@ -34,7 +34,6 @@ _Symbols used in table:_
| Telemetry | **✘** | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
| Third-party render tool support | ✓ | ✘ | ✘ | ✘ | ✓ | ✘ | ✘ |
| WebAuthn (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✓ |
| Audit log | ✓ | ✓ | ⁄ | ✓ | ✓ | ? | ? |
| Extensive API | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Built-in Package/Container Registry | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Sync commits to an external repo (push mirror) | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ | ✓ |
+1 -23
View File
@@ -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. PostgreSQL, MySQL and MSSQL are covered here. 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. 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.
:::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,28 +177,6 @@ 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.
+4 -27
View File
@@ -40,24 +40,7 @@ chmod +x gitea
Note that the above command will download Gitea @version@ for 64-bit Linux.
## Verify signature
### Sigstore
Starting with v1.27 Gitea signs all binaries using [sigstore](https://sigstore.dev/) to prevent against unwanted modification of binaries.
To validate the binary, download the bundle file which ends in `sigstore.json` for the binary you downloaded and use the [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) command line tool.
```sh
cosign verify-blob gitea-@version@-linux-amd64 --bundle gitea-@version@-linux-amd64.sigstore.json --certificate-oidc-issuer=https://token.actions.githubusercontent.com --certificate-identity-regexp="https://github.com/go-gitea/gitea/.github/workflows/release-.*"
```
If the command outputs `Verified OK`, binary was not modified.
:::note
The above command will match any release workflow. You may choose to restrict the identity further by requiring a specific branch or workflow to be matched. For example this url will match only nightly builds made on main branch: `https://github.com/go-gitea/gitea/.github/workflows/release-nightly.yml@refs/heads/main`
:::
### GPG
## Verify GPG signature
Gitea signs all binaries with a [GPG key](https://keys.openpgp.org/search?q=teabot%40gitea.io) to prevent against unwanted modification of binaries.
To validate the binary, download the signature file which ends in `.asc` for the binary you downloaded and use the GPG command line tool.
@@ -70,7 +53,6 @@ gpg --verify gitea-@[email protected] gitea-@version@-linux-amd64
Look for the text `Good signature from "Teabot <[email protected]>"` to assert a good binary,
despite warnings like `This key is not certified with a trusted signature!`.
## Recommended server configuration
:::note
@@ -171,13 +153,6 @@ Supported values for `<shell>` are `bash`, `fish`, `pwsh` and `zsh`. Details on
After you complete the above steps, you can run Gitea two ways:
:::note
On a distribution with SELinux in enforcing mode (Fedora, RHEL, CentOS Stream,
Rocky Linux, AlmaLinux and others), the binary and the data directory need
labels the default policy does not give them, and binding to a port below 1024
takes an extra step. See [running Gitea with SELinux](selinux.md).
:::
### 1. Creating a service file to start Gitea automatically (recommended)
See how to create [Linux service](installation/run-as-service-in-ubuntu.md)
@@ -239,7 +214,9 @@ As of v1.8, there is a problem with the arm7 version of Gitea, and it doesn't ru
It is recommended to switch to the arm6 version, which has been tested and shown to work on Raspberry Pis and similar devices.
{/* please remove after fixing the arm7 bug */}
<!---
please remove after fixing the arm7 bug
--->
### Git error after updating to a new version of Gitea
If during the update, the binary file name has been changed to a new version of Gitea,
+2 -10
View File
@@ -6,8 +6,6 @@ aliases:
- /en-us/install-from-source
---
:::warning This document is outdated, pleaes refer to [build-source.md](https://github.com/go-gitea/gitea/tree/main/docs/build-source.md):::
# Installation from source
You should [install go](https://go.dev/doc/install) and set up your go
@@ -23,7 +21,7 @@ version is @minNodeVersion@ and the latest LTS version is recommended.
:::note
Go version @minGoVersion@ or higher is required. However, it is recommended to
obtain the same version as our continuous integration, see the advice given in
[Hacking on Gitea](https://github.com/go-gitea/gitea/blob/main/docs/build-setup.md)
[Hacking on Gitea](development/hacking-on-gitea.md)
:::
## Download
@@ -73,7 +71,7 @@ To build from source, the following programs must be present on the system:
- `go` @minGoVersion@ or higher, see [here](https://go.dev/dl/)
- `node` @minNodeVersion@ or higher with `npm`, see [here](https://nodejs.org/en/download/)
- `make`, see [here](https://github.com/go-gitea/gitea/blob/main/docs/build-setup.md#make)
- `make`, see [here](development/hacking-on-gitea.md#installing-make)
Various [make tasks](https://github.com/go-gitea/gitea/blob/main/Makefile)
are provided to keep the build process as simple as possible.
@@ -127,12 +125,6 @@ launched manually from command line, it can be killed by pressing `Ctrl + C`.
./gitea web
```
:::note
A binary built this way carries no SELinux label of its own. On a distribution
with SELinux in enforcing mode, see
[running Gitea with SELinux](selinux.md) before installing it as a service.
:::
## Changing default paths
Gitea will search for a number of things from the _`CustomPath`_. By default this is
+43
View File
@@ -0,0 +1,43 @@
---
date: "2016-12-01T16:00:00+02:00"
slug: "install-on-cloud-provider"
sidebar_position: 90
aliases:
- /en-us/install-on-cloud-provider
---
# Installation on Cloud Provider
## Cloudron
Gitea is available as a 1-click install on [Cloudron](https://cloudron.io).
Cloudron makes it easy to run apps like Gitea on your server and keep them up-to-date and secure.
[![Install](/cloudron.svg)](https://cloudron.io/button.html?app=io.gitea.cloudronapp)
The Gitea package is maintained [here](https://git.cloudron.io/cloudron/gitea-app).
There is a [demo instance](https://my.demo.cloudron.io) (username: cloudron password: cloudron) where
you can experiment with running Gitea.
## Linode
[Linode](https://www.linode.com/) has Gitea as an app in their marketplace.
To deploy Gitea to Linode, have a look at the [Linode Marketplace](https://www.linode.com/marketplace/apps/linode/gitea/).
## alwaysdata
[alwaysdata](https://www.alwaysdata.com/) has Gitea as an app in their marketplace.
To deploy Gitea to alwaysdata, have a look at the [alwaysdata Marketplace](https://www.alwaysdata.com/en/marketplace/gitea/).
## Exoscale
[Exoscale](https://www.exoscale.com/) provides Gitea managed by [Glasskube](https://glasskube.eu/) in their marketplace.
Exoscale is a European cloud service provider.
The package is maintained and update via the open source [Glasskube Kubernetes Operator](https://github.com/glasskube/operator).
To deploy Gitea to Exoscale, have a look at the [Exoscale Marketplace](https://www.exoscale.com/marketplace/listing/glasskube-gitea/).
@@ -12,7 +12,7 @@ You can run Gitea as a Linux service, using either systemd or supervisor. The st
## Using systemd
Copy the sample [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/service/systemd/gitea.service) to `/etc/systemd/system/gitea.service`, then edit the file with your favorite editor.
Copy the sample [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) to `/etc/systemd/system/gitea.service`, then edit the file with your favorite editor.
Uncomment any service that needs to be enabled on this host, such as MySQL.
@@ -48,7 +48,7 @@ mkdir /home/git/gitea/log/supervisor
```
Append the configuration from the sample
[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/service/supervisor/gitea) to `/etc/supervisor/supervisord.conf`.
[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/supervisor/gitea) to `/etc/supervisor/supervisord.conf`.
Using your favorite editor, change the user (`git`) and home
(`/home/git`) settings to match the deployment environment. Change the PORT
Loaded 50 of 2365 files, more files were not shown because too many files have changed in this diff. Show more