Compare commits
154 commits
gitea.nulo
...
v1.17.2
Author | SHA1 | Date | |
---|---|---|---|
|
32eef4aa2e | ||
|
449b39ea0e | ||
|
06f968d662 | ||
|
084797b4dc | ||
|
7888a55e8c | ||
|
ea416d7d0e | ||
|
0db6add5c0 | ||
|
0ecbb71bee | ||
|
ea38455e1f | ||
|
8fc80b34a0 | ||
|
71aa64ae25 | ||
|
3aba72c613 | ||
|
bd1412c3af | ||
|
3973ce36d9 | ||
|
fbde31fb1e | ||
|
2f0a1eb0d5 | ||
|
e3697efbb0 | ||
|
989dd5502c | ||
|
54c0fe62cc | ||
|
2e2133d33f | ||
|
0d869c574e | ||
|
04105dbb7c | ||
|
0a0cd75071 | ||
|
85f829fb3c | ||
|
5ebd26d306 | ||
|
bc7a4375be | ||
|
fbcb42488f | ||
|
0230f1e1aa | ||
|
6779c351b1 | ||
|
c1889f5b01 | ||
|
c0754e9d19 | ||
|
bf41958c16 | ||
|
033178f2fc | ||
|
ebc8801fb2 | ||
|
37458bffbf | ||
|
ec9b43ba16 | ||
|
e6ec411491 | ||
|
17d3a474e0 | ||
|
9e8b1c6630 | ||
|
eee51d8366 | ||
|
c61ed6fad4 | ||
|
b88a4b4854 | ||
|
399917a2d4 | ||
|
68cceb5321 | ||
|
15b61dac98 | ||
|
35ca651c80 | ||
|
737486152c | ||
|
c40c753613 | ||
|
7a9b01a2dd | ||
|
b43d7e1254 | ||
|
987798a3a9 | ||
|
13b74accda | ||
|
79fa1c15a4 | ||
|
78dabdd9ae | ||
|
e5d2031828 | ||
|
c3b4f3f7e9 | ||
|
9bccfe9856 | ||
|
85034564c2 | ||
|
eacab6b10d | ||
|
ac9792c0c7 | ||
|
f7c874cb1a | ||
|
d19c2c9fcb | ||
|
59228d8a71 | ||
|
67701771af | ||
|
113d13a026 | ||
|
9ec1c8812e | ||
|
e1e43333cf | ||
|
cedf4fef0a | ||
|
a04fc567b4 | ||
|
92d79b556b | ||
|
65176fdaf3 | ||
|
aac905dcfb | ||
|
5ce8fdbc37 | ||
|
76accb51ed | ||
|
bd2218e14c | ||
|
0747592865 | ||
|
07d140625e | ||
|
a6c2a1a117 | ||
|
56b99551ae | ||
|
51c8c0f3fe | ||
|
8769df117d | ||
|
09f2e1e1a2 | ||
|
eeb490c7ab | ||
|
97a8c96c5b | ||
|
d1e53bfd7f | ||
|
fc7b5afd9b | ||
|
210b096da7 | ||
|
d6bc1558c6 | ||
|
6986e56791 | ||
|
ae86a0bc9f | ||
|
4b53a5c3a1 | ||
|
da10ce8b07 | ||
|
4ed32e79b6 | ||
|
fa46d66835 | ||
|
648ec3cfed | ||
|
a9a440e600 | ||
|
39b2ede930 | ||
|
0a32bd56eb | ||
|
e0f35ea00f | ||
|
bed13bfa9e | ||
|
435038b2c6 | ||
|
2fe0dab2d5 | ||
|
e930d66a9c | ||
|
2c93bd79f2 | ||
|
90b4a9e929 | ||
|
c16f0d2a19 | ||
|
3f5d72709f | ||
|
95a27eb662 | ||
|
c91b8c8089 | ||
|
975a962a2f | ||
|
4c1f4ee84c | ||
|
780b198997 | ||
|
f4e219f668 | ||
|
92a43d577d | ||
|
66686f6d0e | ||
|
26f4fe2b44 | ||
|
b8ab9298e1 | ||
|
54ef658861 | ||
|
c556a83c35 | ||
|
317c565e77 | ||
|
1d02a9c9fb | ||
|
d371ced49d | ||
|
5e5ff77ed7 | ||
|
039a60225a | ||
|
654c173b9d | ||
|
a92d247fdd | ||
|
42be548ecc | ||
|
76ba23a14f | ||
|
c88a59bb23 | ||
|
01a4fb0ae6 | ||
|
f42fc3b287 | ||
|
35fd55c7df | ||
|
e321b40bb0 | ||
|
d22826a28e | ||
|
bf43db10a9 | ||
|
3e4fe009e7 | ||
|
1ffc700777 | ||
|
0dab13884a | ||
|
0b7b342ab0 | ||
|
fb5ca1bf64 | ||
|
764e75d9b9 | ||
|
05464ac2a5 | ||
|
dbafb4f4d4 | ||
|
29ac31628c | ||
|
710a1419fa | ||
|
761db4d53e | ||
|
2dc6571085 | ||
|
1823bfde7c | ||
|
ab9fcb0cf4 | ||
|
2a48833f93 | ||
|
a4b1967ea3 | ||
|
8733f4b25a | ||
|
a180d945eb | ||
|
36ccb8829b |
2150 changed files with 30814 additions and 57326 deletions
|
@ -5,6 +5,6 @@ tmp_dir = ".air"
|
||||||
cmd = "make backend"
|
cmd = "make backend"
|
||||||
bin = "gitea"
|
bin = "gitea"
|
||||||
include_ext = ["go", "tmpl"]
|
include_ext = ["go", "tmpl"]
|
||||||
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata", "models/fixtures", "models/migrations/fixtures", "modules/migration/file_format_testdata", "modules/avatar/identicon/testdata"]
|
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata"]
|
||||||
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
|
include_dir = ["cmd", "models", "modules", "options", "routers", "services", "templates"]
|
||||||
exclude_regex = ["_test.go$", "_gen.go$"]
|
exclude_regex = ["_test.go$"]
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# config for changelog tool
|
||||||
|
# source: https://gitea.com/gitea/changelog
|
||||||
|
|
||||||
# The full repository name
|
# The full repository name
|
||||||
repo: go-gitea/gitea
|
repo: go-gitea/gitea
|
||||||
|
|
||||||
|
@ -18,6 +21,10 @@ groups:
|
||||||
name: SECURITY
|
name: SECURITY
|
||||||
labels:
|
labels:
|
||||||
- kind/security
|
- kind/security
|
||||||
|
-
|
||||||
|
name: FEDERATION
|
||||||
|
labels:
|
||||||
|
- theme/federation
|
||||||
-
|
-
|
||||||
name: FEATURES
|
name: FEATURES
|
||||||
labels:
|
labels:
|
||||||
|
|
145
.drone.yml
145
.drone.yml
|
@ -19,13 +19,13 @@ volumes:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deps-frontend
|
- name: deps-frontend
|
||||||
image: node:18
|
image: node:16
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-frontend
|
- make deps-frontend
|
||||||
|
|
||||||
- name: deps-backend
|
- name: deps-backend
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-backend
|
- make deps-backend
|
||||||
|
@ -34,21 +34,11 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: lint-frontend
|
- name: lint-frontend
|
||||||
image: node:18
|
image: node:16
|
||||||
commands:
|
commands:
|
||||||
- make lint-frontend
|
- make lint-frontend
|
||||||
depends_on: [deps-frontend]
|
depends_on: [deps-frontend]
|
||||||
|
|
||||||
- name: security-check
|
|
||||||
image: golang:1.19
|
|
||||||
pull: always
|
|
||||||
commands:
|
|
||||||
- make security-check
|
|
||||||
depends_on: [deps-backend]
|
|
||||||
volumes:
|
|
||||||
- name: deps
|
|
||||||
path: /go
|
|
||||||
|
|
||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
||||||
pull: always
|
pull: always
|
||||||
|
@ -92,31 +82,31 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: checks-frontend
|
- name: checks-frontend
|
||||||
image: node:18
|
image: node:16
|
||||||
commands:
|
commands:
|
||||||
- make checks-frontend
|
- make checks-frontend
|
||||||
depends_on: [deps-frontend]
|
depends_on: [deps-frontend]
|
||||||
|
|
||||||
- name: checks-backend
|
- name: checks-backend
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
commands:
|
commands:
|
||||||
- make --always-make checks-backend # ensure the 'go-licenses' make target runs
|
- make checks-backend
|
||||||
depends_on: [deps-backend]
|
depends_on: [deps-backend]
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: test-frontend
|
- name: test-frontend
|
||||||
image: node:18
|
image: node:16
|
||||||
commands:
|
commands:
|
||||||
- make test-frontend
|
- make test-frontend
|
||||||
depends_on: [lint-frontend]
|
depends_on: [lint-frontend]
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
image: node:18
|
image: node:16
|
||||||
commands:
|
commands:
|
||||||
- make frontend
|
- make frontend
|
||||||
depends_on: [deps-frontend]
|
depends_on: [test-frontend]
|
||||||
|
|
||||||
- name: build-backend-no-gcc
|
- name: build-backend-no-gcc
|
||||||
image: golang:1.18 # this step is kept as the lowest version of golang that we support
|
image: golang:1.18 # this step is kept as the lowest version of golang that we support
|
||||||
|
@ -132,7 +122,7 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: build-backend-arm64
|
- name: build-backend-arm64
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: on
|
GO111MODULE: on
|
||||||
GOPROXY: https://goproxy.io
|
GOPROXY: https://goproxy.io
|
||||||
|
@ -148,7 +138,7 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: build-backend-windows
|
- name: build-backend-windows
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: on
|
GO111MODULE: on
|
||||||
GOPROXY: https://goproxy.io
|
GOPROXY: https://goproxy.io
|
||||||
|
@ -163,7 +153,7 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: build-backend-386
|
- name: build-backend-386
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: on
|
GO111MODULE: on
|
||||||
GOPROXY: https://goproxy.io
|
GOPROXY: https://goproxy.io
|
||||||
|
@ -253,7 +243,7 @@ steps:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: deps-backend
|
- name: deps-backend
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-backend
|
- make deps-backend
|
||||||
|
@ -370,7 +360,7 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: generate-coverage
|
- name: generate-coverage
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
commands:
|
commands:
|
||||||
- make coverage
|
- make coverage
|
||||||
environment:
|
environment:
|
||||||
|
@ -446,7 +436,7 @@ steps:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: deps-backend
|
- name: deps-backend
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-backend
|
- make deps-backend
|
||||||
|
@ -508,78 +498,6 @@ steps:
|
||||||
- name: deps
|
- name: deps
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: testing-e2e
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- compliance
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: deps
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
services:
|
|
||||||
- name: pgsql
|
|
||||||
pull: default
|
|
||||||
image: postgres:10
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: testgitea-e2e
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_INITDB_ARGS: --encoding=UTF8 --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: deps-frontend
|
|
||||||
image: node:18
|
|
||||||
pull: always
|
|
||||||
commands:
|
|
||||||
- make deps-frontend
|
|
||||||
|
|
||||||
- name: build-frontend
|
|
||||||
image: node:18
|
|
||||||
commands:
|
|
||||||
- make frontend
|
|
||||||
depends_on: [deps-frontend]
|
|
||||||
|
|
||||||
- name: deps-backend
|
|
||||||
image: golang:1.18
|
|
||||||
pull: always
|
|
||||||
commands:
|
|
||||||
- make deps-backend
|
|
||||||
volumes:
|
|
||||||
- name: deps
|
|
||||||
path: /go
|
|
||||||
|
|
||||||
# TODO: We should probably build all dependencies into a test image
|
|
||||||
- name: test-e2e
|
|
||||||
image: mcr.microsoft.com/playwright:v1.27.0-focal
|
|
||||||
commands:
|
|
||||||
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
|
|
||||||
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
|
|
||||||
- apt-get -qq update && apt-get -qqy install build-essential
|
|
||||||
- export TEST_PGSQL_SCHEMA=''
|
|
||||||
- ./build/test-env-prepare.sh
|
|
||||||
- su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql"
|
|
||||||
environment:
|
|
||||||
GOPROXY: https://goproxy.io
|
|
||||||
GOSUMDB: sum.golang.org
|
|
||||||
USE_REPO_TEST_DIR: 1
|
|
||||||
TEST_PGSQL_DBNAME: 'testgitea-e2e'
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
depends_on: [build-frontend, deps-backend]
|
|
||||||
volumes:
|
|
||||||
- name: deps
|
|
||||||
path: /go
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: update_translations
|
name: update_translations
|
||||||
|
@ -626,8 +544,6 @@ steps:
|
||||||
commit_message: "[skip ci] Updated translations via Crowdin"
|
commit_message: "[skip ci] Updated translations via Crowdin"
|
||||||
remote: "git@github.com:go-gitea/gitea.git"
|
remote: "git@github.com:go-gitea/gitea.git"
|
||||||
environment:
|
environment:
|
||||||
DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
|
|
||||||
DRONE_COMMIT_AUTHOR: GiteaBot
|
|
||||||
GIT_PUSH_SSH_KEY:
|
GIT_PUSH_SSH_KEY:
|
||||||
from_secret: git_push_ssh_key
|
from_secret: git_push_ssh_key
|
||||||
|
|
||||||
|
@ -662,7 +578,7 @@ trigger:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: download
|
- name: download
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- timeout -s ABRT 40m make generate-license generate-gitignore
|
- timeout -s ABRT 40m make generate-license generate-gitignore
|
||||||
|
@ -672,14 +588,12 @@ steps:
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
author_email: "teabot@gitea.io"
|
author_email: "teabot@gitea.io"
|
||||||
author_name: "GiteaBot"
|
author_name: GiteaBot
|
||||||
branch: main
|
branch: main
|
||||||
commit: true
|
commit: true
|
||||||
commit_message: "[skip ci] Updated licenses and gitignores"
|
commit_message: "[skip ci] Updated licenses and gitignores "
|
||||||
remote: "git@github.com:go-gitea/gitea.git"
|
remote: "git@github.com:go-gitea/gitea.git"
|
||||||
environment:
|
environment:
|
||||||
DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
|
|
||||||
DRONE_COMMIT_AUTHOR: "GiteaBot"
|
|
||||||
GIT_PUSH_SSH_KEY:
|
GIT_PUSH_SSH_KEY:
|
||||||
from_secret: git_push_ssh_key
|
from_secret: git_push_ssh_key
|
||||||
|
|
||||||
|
@ -720,13 +634,13 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: deps-frontend
|
- name: deps-frontend
|
||||||
image: node:18
|
image: node:16
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-frontend
|
- make deps-frontend
|
||||||
|
|
||||||
- name: deps-backend
|
- name: deps-backend
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-backend
|
- make deps-backend
|
||||||
|
@ -735,17 +649,15 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: static
|
- name: static
|
||||||
image: techknowlogick/xgo:go-1.19.x
|
image: techknowlogick/xgo:go-1.18.x
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
|
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
|
||||||
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
|
|
||||||
- export PATH=$PATH:$GOPATH/bin
|
- export PATH=$PATH:$GOPATH/bin
|
||||||
- make release
|
- make release
|
||||||
environment:
|
environment:
|
||||||
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
||||||
TAGS: bindata sqlite sqlite_unlock_notify
|
TAGS: bindata sqlite sqlite_unlock_notify
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
path: /go
|
path: /go
|
||||||
|
@ -841,13 +753,13 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: deps-frontend
|
- name: deps-frontend
|
||||||
image: node:18
|
image: node:16
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-frontend
|
- make deps-frontend
|
||||||
|
|
||||||
- name: deps-backend
|
- name: deps-backend
|
||||||
image: golang:1.19
|
image: golang:1.18
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- make deps-backend
|
- make deps-backend
|
||||||
|
@ -856,17 +768,15 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: static
|
- name: static
|
||||||
image: techknowlogick/xgo:go-1.19.x
|
image: techknowlogick/xgo:go-1.18.x
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
|
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
|
||||||
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
|
|
||||||
- export PATH=$PATH:$GOPATH/bin
|
- export PATH=$PATH:$GOPATH/bin
|
||||||
- make release
|
- make release
|
||||||
environment:
|
environment:
|
||||||
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
||||||
TAGS: bindata sqlite sqlite_unlock_notify
|
TAGS: bindata sqlite sqlite_unlock_notify
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
depends_on: [fetch-tags]
|
depends_on: [fetch-tags]
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
|
@ -941,8 +851,7 @@ steps:
|
||||||
image: plugins/hugo:latest
|
image: plugins/hugo:latest
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
# https://github.com/drone-plugins/drone-hugo/issues/36
|
- apk add --no-cache make bash curl
|
||||||
- apk upgrade --no-cache libcurl && apk add --no-cache make bash curl
|
|
||||||
- cd docs
|
- cd docs
|
||||||
- make trans-copy clean build
|
- make trans-copy clean build
|
||||||
|
|
||||||
|
|
|
@ -26,3 +26,6 @@ indent_style = tab
|
||||||
|
|
||||||
[*.svg]
|
[*.svg]
|
||||||
insert_final_newline = false
|
insert_final_newline = false
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
|
@ -11,8 +11,12 @@ parserOptions:
|
||||||
plugins:
|
plugins:
|
||||||
- eslint-plugin-unicorn
|
- eslint-plugin-unicorn
|
||||||
- eslint-plugin-import
|
- eslint-plugin-import
|
||||||
|
- eslint-plugin-vue
|
||||||
|
- eslint-plugin-html
|
||||||
- eslint-plugin-jquery
|
- eslint-plugin-jquery
|
||||||
- eslint-plugin-sonarjs
|
|
||||||
|
extends:
|
||||||
|
- plugin:vue/recommended
|
||||||
|
|
||||||
env:
|
env:
|
||||||
es2022: true
|
es2022: true
|
||||||
|
@ -21,20 +25,30 @@ env:
|
||||||
globals:
|
globals:
|
||||||
__webpack_public_path__: true
|
__webpack_public_path__: true
|
||||||
|
|
||||||
|
settings:
|
||||||
|
html/html-extensions: [".tmpl"]
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
- files: ["web_src/**/*.js", "docs/**/*.js"]
|
- files: ["web_src/**/*.js", "web_src/**/*.vue", "templates/**/*.tmpl"]
|
||||||
env:
|
env:
|
||||||
browser: true
|
browser: true
|
||||||
node: false
|
node: false
|
||||||
|
- files: ["templates/**/*.tmpl"]
|
||||||
|
rules:
|
||||||
|
no-tabs: [0]
|
||||||
|
indent: [2, tab, {SwitchCase: 1}]
|
||||||
- files: ["web_src/**/*worker.js"]
|
- files: ["web_src/**/*worker.js"]
|
||||||
env:
|
env:
|
||||||
worker: true
|
worker: true
|
||||||
rules:
|
rules:
|
||||||
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
|
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
|
||||||
- files: ["build/generate-images.js"]
|
- files: ["build/generate-images.js"]
|
||||||
rules:
|
rules:
|
||||||
import/no-unresolved: [0]
|
import/no-unresolved: [0]
|
||||||
import/no-extraneous-dependencies: [0]
|
import/no-extraneous-dependencies: [0]
|
||||||
|
- files: ["*.test.js"]
|
||||||
|
env:
|
||||||
|
jest: true
|
||||||
- files: ["*.config.js"]
|
- files: ["*.config.js"]
|
||||||
rules:
|
rules:
|
||||||
import/no-unused-modules: [0]
|
import/no-unused-modules: [0]
|
||||||
|
@ -43,7 +57,7 @@ rules:
|
||||||
accessor-pairs: [2]
|
accessor-pairs: [2]
|
||||||
array-bracket-newline: [0]
|
array-bracket-newline: [0]
|
||||||
array-bracket-spacing: [2, never]
|
array-bracket-spacing: [2, never]
|
||||||
array-callback-return: [2, {checkForEach: true}]
|
array-callback-return: [0]
|
||||||
array-element-newline: [0]
|
array-element-newline: [0]
|
||||||
arrow-body-style: [0]
|
arrow-body-style: [0]
|
||||||
arrow-parens: [2, always]
|
arrow-parens: [2, always]
|
||||||
|
@ -106,7 +120,7 @@ rules:
|
||||||
import/no-extraneous-dependencies: [2]
|
import/no-extraneous-dependencies: [2]
|
||||||
import/no-import-module-exports: [0]
|
import/no-import-module-exports: [0]
|
||||||
import/no-internal-modules: [0]
|
import/no-internal-modules: [0]
|
||||||
import/no-mutable-exports: [0]
|
import/no-mutable-exports: [2]
|
||||||
import/no-named-as-default-member: [0]
|
import/no-named-as-default-member: [0]
|
||||||
import/no-named-as-default: [2]
|
import/no-named-as-default: [2]
|
||||||
import/no-named-default: [0]
|
import/no-named-default: [0]
|
||||||
|
@ -118,7 +132,7 @@ rules:
|
||||||
import/no-restricted-paths: [0]
|
import/no-restricted-paths: [0]
|
||||||
import/no-self-import: [2]
|
import/no-self-import: [2]
|
||||||
import/no-unassigned-import: [0]
|
import/no-unassigned-import: [0]
|
||||||
import/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$"]}]
|
import/no-unresolved: [2, {commonjs: true}]
|
||||||
import/no-unused-modules: [2, {unusedExports: true}]
|
import/no-unused-modules: [2, {unusedExports: true}]
|
||||||
import/no-useless-path-segments: [2, {commonjs: true}]
|
import/no-useless-path-segments: [2, {commonjs: true}]
|
||||||
import/no-webpack-loader-syntax: [2]
|
import/no-webpack-loader-syntax: [2]
|
||||||
|
@ -182,7 +196,6 @@ rules:
|
||||||
linebreak-style: [2, unix]
|
linebreak-style: [2, unix]
|
||||||
lines-around-comment: [0]
|
lines-around-comment: [0]
|
||||||
lines-between-class-members: [0]
|
lines-between-class-members: [0]
|
||||||
logical-assignment-operators: [0]
|
|
||||||
max-classes-per-file: [0]
|
max-classes-per-file: [0]
|
||||||
max-depth: [0]
|
max-depth: [0]
|
||||||
max-len: [0]
|
max-len: [0]
|
||||||
|
@ -209,7 +222,7 @@ rules:
|
||||||
no-compare-neg-zero: [2]
|
no-compare-neg-zero: [2]
|
||||||
no-cond-assign: [2, except-parens]
|
no-cond-assign: [2, except-parens]
|
||||||
no-confusing-arrow: [0]
|
no-confusing-arrow: [0]
|
||||||
no-console: [1, {allow: [debug, info, warn, error]}]
|
no-console: [1, {allow: [info, warn, error]}]
|
||||||
no-const-assign: [2]
|
no-const-assign: [2]
|
||||||
no-constant-binary-expression: [2]
|
no-constant-binary-expression: [2]
|
||||||
no-constant-condition: [0]
|
no-constant-condition: [0]
|
||||||
|
@ -243,7 +256,7 @@ rules:
|
||||||
no-floating-decimal: [0]
|
no-floating-decimal: [0]
|
||||||
no-func-assign: [2]
|
no-func-assign: [2]
|
||||||
no-global-assign: [2]
|
no-global-assign: [2]
|
||||||
no-implicit-coercion: [2]
|
no-implicit-coercion: [0]
|
||||||
no-implicit-globals: [0]
|
no-implicit-globals: [0]
|
||||||
no-implied-eval: [2]
|
no-implied-eval: [2]
|
||||||
no-import-assign: [2]
|
no-import-assign: [2]
|
||||||
|
@ -285,7 +298,7 @@ rules:
|
||||||
no-redeclare: [2]
|
no-redeclare: [2]
|
||||||
no-regex-spaces: [2]
|
no-regex-spaces: [2]
|
||||||
no-restricted-exports: [0]
|
no-restricted-exports: [0]
|
||||||
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename]
|
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top]
|
||||||
no-restricted-imports: [0]
|
no-restricted-imports: [0]
|
||||||
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
|
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
|
||||||
no-return-assign: [0]
|
no-return-assign: [0]
|
||||||
|
@ -319,8 +332,8 @@ rules:
|
||||||
no-unused-labels: [2]
|
no-unused-labels: [2]
|
||||||
no-unused-private-class-members: [2]
|
no-unused-private-class-members: [2]
|
||||||
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
|
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
|
||||||
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
|
no-use-before-define: [2, nofunc]
|
||||||
no-useless-backreference: [2]
|
no-useless-backreference: [0]
|
||||||
no-useless-call: [2]
|
no-useless-call: [2]
|
||||||
no-useless-catch: [2]
|
no-useless-catch: [2]
|
||||||
no-useless-computed-key: [2]
|
no-useless-computed-key: [2]
|
||||||
|
@ -345,13 +358,13 @@ rules:
|
||||||
padded-blocks: [2, never]
|
padded-blocks: [2, never]
|
||||||
padding-line-between-statements: [0]
|
padding-line-between-statements: [0]
|
||||||
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
|
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
|
||||||
prefer-const: [2, {destructuring: all, ignoreReadBeforeAssign: true}]
|
prefer-const: [2, {destructuring: all}]
|
||||||
prefer-destructuring: [0]
|
prefer-destructuring: [0]
|
||||||
prefer-exponentiation-operator: [2]
|
prefer-exponentiation-operator: [2]
|
||||||
prefer-named-capture-group: [0]
|
prefer-named-capture-group: [0]
|
||||||
prefer-numeric-literals: [2]
|
prefer-numeric-literals: [2]
|
||||||
prefer-object-has-own: [0]
|
prefer-object-has-own: [0]
|
||||||
prefer-object-spread: [2]
|
prefer-object-spread: [0]
|
||||||
prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
|
prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
|
||||||
prefer-regex-literals: [2]
|
prefer-regex-literals: [2]
|
||||||
prefer-rest-params: [2]
|
prefer-rest-params: [2]
|
||||||
|
@ -368,38 +381,6 @@ rules:
|
||||||
semi-spacing: [2, {before: false, after: true}]
|
semi-spacing: [2, {before: false, after: true}]
|
||||||
semi-style: [2, last]
|
semi-style: [2, last]
|
||||||
semi: [2, always, {omitLastInOneLineBlock: true}]
|
semi: [2, always, {omitLastInOneLineBlock: true}]
|
||||||
sonarjs/cognitive-complexity: [0]
|
|
||||||
sonarjs/elseif-without-else: [0]
|
|
||||||
sonarjs/max-switch-cases: [0]
|
|
||||||
sonarjs/no-all-duplicated-branches: [2]
|
|
||||||
sonarjs/no-collapsible-if: [0]
|
|
||||||
sonarjs/no-collection-size-mischeck: [2]
|
|
||||||
sonarjs/no-duplicate-string: [0]
|
|
||||||
sonarjs/no-duplicated-branches: [0]
|
|
||||||
sonarjs/no-element-overwrite: [2]
|
|
||||||
sonarjs/no-empty-collection: [2]
|
|
||||||
sonarjs/no-extra-arguments: [0]
|
|
||||||
sonarjs/no-gratuitous-expressions: [2]
|
|
||||||
sonarjs/no-identical-conditions: [2]
|
|
||||||
sonarjs/no-identical-expressions: [0]
|
|
||||||
sonarjs/no-identical-functions: [0]
|
|
||||||
sonarjs/no-ignored-return: [2]
|
|
||||||
sonarjs/no-inverted-boolean-check: [2]
|
|
||||||
sonarjs/no-nested-switch: [0]
|
|
||||||
sonarjs/no-nested-template-literals: [0]
|
|
||||||
sonarjs/no-one-iteration-loop: [2]
|
|
||||||
sonarjs/no-redundant-boolean: [2]
|
|
||||||
sonarjs/no-redundant-jump: [0]
|
|
||||||
sonarjs/no-same-line-conditional: [2]
|
|
||||||
sonarjs/no-small-switch: [0]
|
|
||||||
sonarjs/no-unused-collection: [2]
|
|
||||||
sonarjs/no-use-of-empty-return-value: [2]
|
|
||||||
sonarjs/no-useless-catch: [0]
|
|
||||||
sonarjs/non-existent-operator: [2]
|
|
||||||
sonarjs/prefer-immediate-return: [0]
|
|
||||||
sonarjs/prefer-object-literal: [0]
|
|
||||||
sonarjs/prefer-single-boolean-return: [0]
|
|
||||||
sonarjs/prefer-while: [2]
|
|
||||||
sort-imports: [0]
|
sort-imports: [0]
|
||||||
sort-keys: [0]
|
sort-keys: [0]
|
||||||
sort-vars: [0]
|
sort-vars: [0]
|
||||||
|
@ -447,13 +428,12 @@ rules:
|
||||||
unicorn/no-new-array: [0]
|
unicorn/no-new-array: [0]
|
||||||
unicorn/no-new-buffer: [0]
|
unicorn/no-new-buffer: [0]
|
||||||
unicorn/no-null: [0]
|
unicorn/no-null: [0]
|
||||||
unicorn/no-object-as-default-parameter: [0]
|
unicorn/no-object-as-default-parameter: [2]
|
||||||
unicorn/no-process-exit: [0]
|
unicorn/no-process-exit: [0]
|
||||||
unicorn/no-reduce: [2]
|
unicorn/no-reduce: [2]
|
||||||
unicorn/no-static-only-class: [2]
|
unicorn/no-static-only-class: [2]
|
||||||
unicorn/no-thenable: [2]
|
unicorn/no-thenable: [2]
|
||||||
unicorn/no-this-assignment: [2]
|
unicorn/no-this-assignment: [2]
|
||||||
unicorn/no-unnecessary-await: [2]
|
|
||||||
unicorn/no-unreadable-array-destructuring: [0]
|
unicorn/no-unreadable-array-destructuring: [0]
|
||||||
unicorn/no-unreadable-iife: [2]
|
unicorn/no-unreadable-iife: [2]
|
||||||
unicorn/no-unsafe-regex: [0]
|
unicorn/no-unsafe-regex: [0]
|
||||||
|
@ -474,16 +454,14 @@ rules:
|
||||||
unicorn/prefer-array-index-of: [2]
|
unicorn/prefer-array-index-of: [2]
|
||||||
unicorn/prefer-array-some: [2]
|
unicorn/prefer-array-some: [2]
|
||||||
unicorn/prefer-at: [0]
|
unicorn/prefer-at: [0]
|
||||||
unicorn/prefer-code-point: [0]
|
unicorn/prefer-code-point: [2]
|
||||||
unicorn/prefer-dataset: [2]
|
unicorn/prefer-dataset: [2]
|
||||||
unicorn/prefer-date-now: [2]
|
unicorn/prefer-date-now: [2]
|
||||||
unicorn/prefer-default-parameters: [0]
|
unicorn/prefer-default-parameters: [0]
|
||||||
unicorn/prefer-event-key: [2]
|
unicorn/prefer-event-key: [2]
|
||||||
unicorn/prefer-event-target: [2]
|
|
||||||
unicorn/prefer-export-from: [2]
|
unicorn/prefer-export-from: [2]
|
||||||
unicorn/prefer-includes: [2]
|
unicorn/prefer-includes: [2]
|
||||||
unicorn/prefer-json-parse-buffer: [0]
|
unicorn/prefer-json-parse-buffer: [0]
|
||||||
unicorn/prefer-logical-operator-over-ternary: [2]
|
|
||||||
unicorn/prefer-math-trunc: [2]
|
unicorn/prefer-math-trunc: [2]
|
||||||
unicorn/prefer-modern-dom-apis: [0]
|
unicorn/prefer-modern-dom-apis: [0]
|
||||||
unicorn/prefer-modern-math-apis: [2]
|
unicorn/prefer-modern-math-apis: [2]
|
||||||
|
@ -518,13 +496,17 @@ rules:
|
||||||
unicorn/require-number-to-fixed-digits-argument: [2]
|
unicorn/require-number-to-fixed-digits-argument: [2]
|
||||||
unicorn/require-post-message-target-origin: [0]
|
unicorn/require-post-message-target-origin: [0]
|
||||||
unicorn/string-content: [0]
|
unicorn/string-content: [0]
|
||||||
unicorn/switch-case-braces: [0]
|
|
||||||
unicorn/template-indent: [2]
|
unicorn/template-indent: [2]
|
||||||
unicorn/text-encoding-identifier-case: [0]
|
unicorn/text-encoding-identifier-case: [0]
|
||||||
unicorn/throw-new-error: [2]
|
unicorn/throw-new-error: [2]
|
||||||
use-isnan: [2]
|
use-isnan: [2]
|
||||||
valid-typeof: [2, {requireStringLiterals: true}]
|
valid-typeof: [2, {requireStringLiterals: true}]
|
||||||
vars-on-top: [0]
|
vars-on-top: [0]
|
||||||
|
vue/attributes-order: [0]
|
||||||
|
vue/component-definition-name-casing: [0]
|
||||||
|
vue/html-closing-bracket-spacing: [0]
|
||||||
|
vue/max-attributes-per-line: [0]
|
||||||
|
vue/one-component-per-file: [0]
|
||||||
wrap-iife: [2, inside]
|
wrap-iife: [2, inside]
|
||||||
wrap-regex: [0]
|
wrap-regex: [0]
|
||||||
yield-star-spacing: [2, after]
|
yield-star-spacing: [2, after]
|
3
.gitattributes
vendored
3
.gitattributes
vendored
|
@ -1,6 +1,7 @@
|
||||||
* text=auto eol=lf
|
* text=auto eol=lf
|
||||||
*.tmpl linguist-language=Handlebars
|
*.tmpl linguist-language=Handlebars
|
||||||
/assets/*.json linguist-generated
|
/.eslintrc linguist-language=YAML
|
||||||
|
/.stylelintrc linguist-language=YAML
|
||||||
/public/vendor/** -text -eol linguist-vendored
|
/public/vendor/** -text -eol linguist-vendored
|
||||||
/vendor/** -text -eol linguist-vendored
|
/vendor/** -text -eol linguist-vendored
|
||||||
/web_src/fomantic/build/** linguist-generated
|
/web_src/fomantic/build/** linguist-generated
|
||||||
|
|
24
.gitignore
vendored
24
.gitignore
vendored
|
@ -63,14 +63,21 @@ cpu.out
|
||||||
/indexers
|
/indexers
|
||||||
/log
|
/log
|
||||||
/public/img/avatar
|
/public/img/avatar
|
||||||
/tests/integration/gitea-integration-*
|
/integrations/gitea-integration-mysql
|
||||||
/tests/integration/indexers-*
|
/integrations/gitea-integration-mysql8
|
||||||
/tests/e2e/gitea-e2e-*
|
/integrations/gitea-integration-pgsql
|
||||||
/tests/e2e/indexers-*
|
/integrations/gitea-integration-sqlite
|
||||||
/tests/e2e/reports
|
/integrations/gitea-integration-mssql
|
||||||
/tests/e2e/test-artifacts
|
/integrations/indexers-mysql
|
||||||
/tests/e2e/test-snapshots
|
/integrations/indexers-mysql8
|
||||||
/tests/*.ini
|
/integrations/indexers-pgsql
|
||||||
|
/integrations/indexers-sqlite
|
||||||
|
/integrations/indexers-mssql
|
||||||
|
/integrations/sqlite.ini
|
||||||
|
/integrations/mysql.ini
|
||||||
|
/integrations/mysql8.ini
|
||||||
|
/integrations/pgsql.ini
|
||||||
|
/integrations/mssql.ini
|
||||||
/node_modules
|
/node_modules
|
||||||
/yarn.lock
|
/yarn.lock
|
||||||
/yarn-error.log
|
/yarn-error.log
|
||||||
|
@ -95,7 +102,6 @@ cpu.out
|
||||||
!/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2
|
!/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2
|
||||||
/VERSION
|
/VERSION
|
||||||
/.air
|
/.air
|
||||||
/.go-licenses
|
|
||||||
|
|
||||||
# Snapcraft
|
# Snapcraft
|
||||||
snap/.snapcraft/
|
snap/.snapcraft/
|
||||||
|
|
42
.gitpod.yml
42
.gitpod.yml
|
@ -1,42 +0,0 @@
|
||||||
tasks:
|
|
||||||
- name: Setup
|
|
||||||
init: |
|
|
||||||
cp -r contrib/ide/vscode .vscode
|
|
||||||
make deps
|
|
||||||
make build
|
|
||||||
command: |
|
|
||||||
gp sync-done setup
|
|
||||||
exit 0
|
|
||||||
- name: Run frontend
|
|
||||||
command: |
|
|
||||||
gp sync-await setup
|
|
||||||
make watch-frontend
|
|
||||||
- name: Run backend
|
|
||||||
command: |
|
|
||||||
gp sync-await setup
|
|
||||||
mkdir -p custom/conf/
|
|
||||||
echo -e "[server]\nROOT_URL=$(gp url 3000)/" > custom/conf/app.ini
|
|
||||||
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
|
|
||||||
export TAGS="sqlite sqlite_unlock_notify"
|
|
||||||
make watch-backend
|
|
||||||
- name: Run docs
|
|
||||||
before: sudo bash -c "$(grep 'https://github.com/gohugoio/hugo/releases/download' Makefile | tr -d '\')" # install hugo
|
|
||||||
command: cd docs && make clean update && hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
|
|
||||||
|
|
||||||
vscode:
|
|
||||||
extensions:
|
|
||||||
- editorconfig.editorconfig
|
|
||||||
- dbaeumer.vscode-eslint
|
|
||||||
- golang.go
|
|
||||||
- stylelint.vscode-stylelint
|
|
||||||
- DavidAnson.vscode-markdownlint
|
|
||||||
- johnsoncodehk.volar
|
|
||||||
- ms-azuretools.vscode-docker
|
|
||||||
- zixuanchen.vitest-explorer
|
|
||||||
- alexcvzz.vscode-sqlite
|
|
||||||
|
|
||||||
ports:
|
|
||||||
- name: Gitea
|
|
||||||
port: 3000
|
|
||||||
- name: Docs
|
|
||||||
port: 1313
|
|
|
@ -12,23 +12,19 @@ linters:
|
||||||
- dupl
|
- dupl
|
||||||
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
|
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
|
||||||
- gofmt
|
- gofmt
|
||||||
|
- misspell
|
||||||
- gocritic
|
- gocritic
|
||||||
- bidichk
|
- bidichk
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- revive
|
- revive
|
||||||
- gofumpt
|
- gofumpt
|
||||||
- depguard
|
- depguard
|
||||||
- nakedret
|
|
||||||
- unconvert
|
|
||||||
- wastedassign
|
|
||||||
- nolintlint
|
|
||||||
- stylecheck
|
|
||||||
enable-all: false
|
enable-all: false
|
||||||
disable-all: true
|
disable-all: true
|
||||||
fast: false
|
fast: false
|
||||||
|
|
||||||
run:
|
run:
|
||||||
go: 1.19
|
go: 1.18
|
||||||
timeout: 10m
|
timeout: 10m
|
||||||
skip-dirs:
|
skip-dirs:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
@ -36,10 +32,6 @@ run:
|
||||||
- web_src
|
- web_src
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
stylecheck:
|
|
||||||
checks: ["all", "-ST1005", "-ST1003"]
|
|
||||||
nakedret:
|
|
||||||
max-func-lines: 0
|
|
||||||
gocritic:
|
gocritic:
|
||||||
disabled-checks:
|
disabled-checks:
|
||||||
- ifElseChain
|
- ifElseChain
|
||||||
|
@ -74,7 +66,7 @@ linters-settings:
|
||||||
- name: modifies-value-receiver
|
- name: modifies-value-receiver
|
||||||
gofumpt:
|
gofumpt:
|
||||||
extra-rules: true
|
extra-rules: true
|
||||||
lang-version: "1.19"
|
lang-version: "1.18"
|
||||||
depguard:
|
depguard:
|
||||||
# TODO: use depguard to replace import checks in gitea-vet
|
# TODO: use depguard to replace import checks in gitea-vet
|
||||||
list-type: denylist
|
list-type: denylist
|
||||||
|
@ -85,8 +77,6 @@ linters-settings:
|
||||||
- github.com/unknwon/com: "use gitea's util and replacements"
|
- github.com/unknwon/com: "use gitea's util and replacements"
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 0
|
|
||||||
max-same-issues: 0
|
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
# Exclude some linters from running on tests files.
|
# Exclude some linters from running on tests files.
|
||||||
- path: _test\.go
|
- path: _test\.go
|
||||||
|
@ -147,6 +137,9 @@ issues:
|
||||||
- path: models/issue_comment_list.go
|
- path: models/issue_comment_list.go
|
||||||
linters:
|
linters:
|
||||||
- dupl
|
- dupl
|
||||||
|
- linters:
|
||||||
|
- misspell
|
||||||
|
text: '`Unknwon` is a misspelling of `Unknown`'
|
||||||
- path: models/update.go
|
- path: models/update.go
|
||||||
linters:
|
linters:
|
||||||
- unused
|
- unused
|
||||||
|
@ -169,7 +162,3 @@ issues:
|
||||||
- path: models/user/openid.go
|
- path: models/user/openid.go
|
||||||
linters:
|
linters:
|
||||||
- golint
|
- golint
|
||||||
- path: models/user/badge.go
|
|
||||||
linters:
|
|
||||||
- revive
|
|
||||||
text: "exported: type name will be used as user.UserBadge by other packages, and that stutters; consider calling this Badge"
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
commands-show-output: false
|
|
||||||
fenced-code-language: false
|
|
||||||
first-line-h1: false
|
|
||||||
header-increment: false
|
|
||||||
line-length: {code_blocks: false, tables: false, stern: true, line_length: -1}
|
|
||||||
no-alt-text: false
|
|
||||||
no-bare-urls: false
|
|
||||||
no-blanks-blockquote: false
|
|
||||||
no-duplicate-header: {allow_different_nesting: true}
|
|
||||||
no-emphasis-as-header: false
|
|
||||||
no-empty-links: false
|
|
||||||
no-hard-tabs: {code_blocks: false}
|
|
||||||
no-inline-html: false
|
|
||||||
no-space-in-code: false
|
|
||||||
no-space-in-emphasis: false
|
|
||||||
no-trailing-punctuation: false
|
|
||||||
no-trailing-spaces: {br_spaces: 0}
|
|
||||||
single-h1: false
|
|
|
@ -1,12 +0,0 @@
|
||||||
extends: [[spectral:oas, all]]
|
|
||||||
|
|
||||||
rules:
|
|
||||||
info-contact: off
|
|
||||||
oas2-api-host: off
|
|
||||||
oas2-parameter-description: off
|
|
||||||
oas2-schema: off
|
|
||||||
oas2-valid-schema-example: off
|
|
||||||
openapi-tags: off
|
|
||||||
operation-description: off
|
|
||||||
operation-singular-tag: off
|
|
||||||
operation-tag-defined: off
|
|
|
@ -1,39 +0,0 @@
|
||||||
clone:
|
|
||||||
git:
|
|
||||||
image: woodpeckerci/plugin-git
|
|
||||||
settings:
|
|
||||||
tags: true
|
|
||||||
|
|
||||||
pipeline:
|
|
||||||
build:
|
|
||||||
image: docker.io/alpine:3.16
|
|
||||||
commands:
|
|
||||||
- echo "172.17.0.1 alpine.proxy.coso npm.proxy.coso" >> /etc/hosts
|
|
||||||
- echo "http://alpine.proxy.coso/alpine/v3.16/main" > /etc/apk/repositories
|
|
||||||
- echo "http://alpine.proxy.coso/alpine/v3.16/community" >> /etc/apk/repositories
|
|
||||||
- apk add git nodejs npm go make rsync openssh-client-default
|
|
||||||
- npm set registry http://npm.proxy.coso
|
|
||||||
|
|
||||||
- GOOS=linux GOARCH=amd64 LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="bindata sqlite sqlite_unlock_notify" make build
|
|
||||||
|
|
||||||
- eval $(ssh-agent -s)
|
|
||||||
- echo "$${SSH_KEY}" | tr -d '\r' | ssh-add -
|
|
||||||
- mkdir -p ~/.ssh
|
|
||||||
- echo "[nulo.in]:420,[186.136.121.7]:420 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGPkgRVWYcVcgjI0xAjDgZQsYuXU9edcya8zna01ibyUMlfKHIMD9yOoq0R+fQPTCqwiol/2tKMPJ2hlKshc+H8=" > ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
# #!/bin/sh
|
|
||||||
# # Editar en https://gitea.nulo.in/Nulo/gitea si se cambia
|
|
||||||
# bin=/usr/local/bin/gitea
|
|
||||||
# new=/usr/local/bin/gitea.new
|
|
||||||
#
|
|
||||||
# rm "$new"
|
|
||||||
# cat /dev/stdin > "$new" || exit $?
|
|
||||||
# chmod +x "$new" || exit $?
|
|
||||||
# mv "$new" "$bin" || exit $?
|
|
||||||
# sv restart gitea || exit $?
|
|
||||||
- ssh -p420 ci-gitea@nulo.in doas /usr/local/sbin/instalar-gitea < gitea
|
|
||||||
when:
|
|
||||||
branch: gitea.nulo.in
|
|
||||||
event: push
|
|
||||||
secrets:
|
|
||||||
- ssh_key
|
|
418
CHANGELOG.md
418
CHANGELOG.md
|
@ -4,353 +4,6 @@ This changelog goes through all the changes that have been made in each release
|
||||||
without substantial changes to our git log; to see the highlights of what has
|
without substantial changes to our git log; to see the highlights of what has
|
||||||
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
|
|
||||||
## [1.18.3](https://github.com/go-gitea/gitea/releases/tag/v1.18.3) - 2023-01-23
|
|
||||||
|
|
||||||
* SECURITY
|
|
||||||
* Prevent multiple `To` recipients (#22566) (#22569)
|
|
||||||
* BUGFIXES
|
|
||||||
* Truncate commit summary on repo files table. (#22551) (#22552)
|
|
||||||
* Mute all links in issue timeline (#22534)
|
|
||||||
|
|
||||||
## [1.18.2](https://github.com/go-gitea/gitea/releases/tag/v1.18.2) - 2023-01-19
|
|
||||||
|
|
||||||
* BUGFIXES
|
|
||||||
* When updating by rebase we need to set the environment for head repo (#22535) (#22536)
|
|
||||||
* Fix issue not auto-closing when it includes a reference to a branch (#22514) (#22521)
|
|
||||||
* Fix invalid issue branch reference if not specified in template (#22513) (#22520)
|
|
||||||
* Fix 500 error viewing pull request when fork has pull requests disabled (#22512) (#22515)
|
|
||||||
* Reliable selection of admin user (#22509) (#22511)
|
|
||||||
* Set disable_gravatar/enable_federated_avatar when offline mode is true (#22479) (#22496)
|
|
||||||
* BUILD
|
|
||||||
* cgo cross-compile for freebsd (#22397) (#22519)
|
|
||||||
|
|
||||||
## [1.18.1](https://github.com/go-gitea/gitea/releases/tag/v1.18.1) - 2023-01-17
|
|
||||||
|
|
||||||
* API
|
|
||||||
* Add `sync_on_commit` option for push mirrors api (#22271) (#22292)
|
|
||||||
* BUGFIXES
|
|
||||||
* Update `github.com/zeripath/zapx/v15` (#22485)
|
|
||||||
* Fix pull request API field `closed_at` always being `null` (#22482) (#22483)
|
|
||||||
* Fix container blob mount (#22226) (#22476)
|
|
||||||
* Fix error when calculating repository size (#22392) (#22474)
|
|
||||||
* Fix Operator does not exist bug on explore page with ONLY_SHOW_RELEVANT_REPOS (#22454) (#22472)
|
|
||||||
* Fix environments for KaTeX and error reporting (#22453) (#22473)
|
|
||||||
* Remove the netgo tag for Windows build (#22467) (#22468)
|
|
||||||
* Fix migration from GitBucket (#22477) (#22465)
|
|
||||||
* Prevent panic on looking at api "git" endpoints for empty repos (#22457) (#22458)
|
|
||||||
* Fix PR status layout on mobile (#21547) (#22441)
|
|
||||||
* Fix wechatwork webhook sends empty content in PR review (#21762) (#22440)
|
|
||||||
* Remove duplicate "Actions" label in mobile view (#21974) (#22439)
|
|
||||||
* Fix leaving organization bug on user settings -> orgs (#21983) (#22438)
|
|
||||||
* Fixed colour transparency regex matching in project board sorting (#22092) (#22437)
|
|
||||||
* Correctly handle select on multiple channels in Queues (#22146) (#22428)
|
|
||||||
* Prepend refs/heads/ to issue template refs (#20461) (#22427)
|
|
||||||
* Restore function to "Show more" buttons (#22399) (#22426)
|
|
||||||
* Continue GCing other repos on error in one repo (#22422) (#22425)
|
|
||||||
* Allow HOST has no port (#22280) (#22409)
|
|
||||||
* Fix omit avatar_url in discord payload when empty (#22393) (#22394)
|
|
||||||
* Don't display stop watch top bar icon when disabled and hidden when click other place (#22374) (#22387)
|
|
||||||
* Don't lookup mail server when using sendmail (#22300) (#22383)
|
|
||||||
* Fix gravatar disable bug (#22337)
|
|
||||||
* Fix update settings table on install (#22326) (#22327)
|
|
||||||
* Fix sitemap (#22272) (#22320)
|
|
||||||
* Fix code search title translation (#22285) (#22316)
|
|
||||||
* Fix due date rendering the wrong date in issue (#22302) (#22306)
|
|
||||||
* Fix get system setting bug when enabled redis cache (#22298)
|
|
||||||
* Fix bug of DisableGravatar default value (#22297)
|
|
||||||
* Fix key signature error page (#22229) (#22230)
|
|
||||||
* TESTING
|
|
||||||
* Remove test session cache to reduce possible concurrent problem (#22199) (#22429)
|
|
||||||
* MISC
|
|
||||||
* Restore previous official review when an official review is deleted (#22449) (#22460)
|
|
||||||
* Log STDERR of external renderer when it fails (#22442) (#22444)
|
|
||||||
|
|
||||||
## [1.18.0](https://github.com/go-gitea/gitea/releases/tag/1.18.0) - 2022-12-22
|
|
||||||
|
|
||||||
* SECURITY
|
|
||||||
* Remove ReverseProxy authentication from the API (#22219) (#22251)
|
|
||||||
* Support Go Vulnerability Management (#21139)
|
|
||||||
* Forbid HTML string tooltips (#20935)
|
|
||||||
* BREAKING
|
|
||||||
* Rework mailer settings (#18982)
|
|
||||||
* Remove U2F support (#20141)
|
|
||||||
* Refactor `i18n` to `locale` (#20153)
|
|
||||||
* Enable contenthash in filename for dynamic assets (#20813)
|
|
||||||
* FEATURES
|
|
||||||
* Add color previews in markdown (#21474)
|
|
||||||
* Allow package version sorting (#21453)
|
|
||||||
* Add support for Chocolatey/NuGet v2 API (#21393)
|
|
||||||
* Add API endpoint to get changed files of a PR (#21177)
|
|
||||||
* Add filetree on left of diff view (#21012)
|
|
||||||
* Support Issue forms and PR forms (#20987)
|
|
||||||
* Add support for Vagrant packages (#20930)
|
|
||||||
* Add support for `npm unpublish` (#20688)
|
|
||||||
* Add badge capabilities to users (#20607)
|
|
||||||
* Add issue filter for Author (#20578)
|
|
||||||
* Add KaTeX rendering to Markdown. (#20571)
|
|
||||||
* Add support for Pub packages (#20560)
|
|
||||||
* Support localized README (#20508)
|
|
||||||
* Add support mCaptcha as captcha provider (#20458)
|
|
||||||
* Add team member invite by email (#20307)
|
|
||||||
* Added email notification option to receive all own messages (#20179)
|
|
||||||
* Switch Unicode Escaping to a VSCode-like system (#19990)
|
|
||||||
* Add user/organization code search (#19977)
|
|
||||||
* Only show relevant repositories on explore page (#19361)
|
|
||||||
* User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133)
|
|
||||||
* Add sitemap support (#18407)
|
|
||||||
* Allow creation of OAuth2 applications for orgs (#18084)
|
|
||||||
* Add system setting table with cache and also add cache supports for user setting (#18058)
|
|
||||||
* Add pages to view watched repos and subscribed issues/PRs (#17156)
|
|
||||||
* Support Proxy protocol (#12527)
|
|
||||||
* Implement sync push mirror on commit (#19411)
|
|
||||||
* API
|
|
||||||
* Allow empty assignees on pull request edit (#22150) (#22214)
|
|
||||||
* Make external issue tracker regexp configurable via API (#21338)
|
|
||||||
* Add name field for org api (#21270)
|
|
||||||
* Show teams with no members if user is admin (#21204)
|
|
||||||
* Add latest commit's SHA to content response (#20398)
|
|
||||||
* Add allow_rebase_update, default_delete_branch_after_merge to repository api response (#20079)
|
|
||||||
* Add new endpoints for push mirrors management (#19841)
|
|
||||||
* ENHANCEMENTS
|
|
||||||
* Add setting to disable the git apply step in test patch (#22130) (#22170)
|
|
||||||
* Multiple improvements for comment edit diff (#21990) (#22007)
|
|
||||||
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21928)
|
|
||||||
* Fix flex layout for repo list icons (#21896) (#21920)
|
|
||||||
* Fix vertical align of committer avatar rendered by email address (#21884) (#21918)
|
|
||||||
* Fix setting HTTP headers after write (#21833) (#21877)
|
|
||||||
* Color and Style enhancements (#21784, #21799) (#21868)
|
|
||||||
* Ignore line anchor links with leading zeroes (#21728) (#21776)
|
|
||||||
* Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) (#21738)
|
|
||||||
* Use CSS color-scheme instead of invert (#21616) (#21623)
|
|
||||||
* Respect user's locale when rendering the date range in the repo activity page (#21410)
|
|
||||||
* Change `commits-table` column width (#21564)
|
|
||||||
* Refactor git command arguments and make all arguments to be safe to be used (#21535)
|
|
||||||
* CSS color enhancements (#21534)
|
|
||||||
* Add link to user profile in markdown mention only if user exists (#21533, #21554)
|
|
||||||
* Add option to skip index dirs (#21501)
|
|
||||||
* Diff file tree tweaks (#21446)
|
|
||||||
* Localize all timestamps (#21440)
|
|
||||||
* Add `code` highlighting in issue titles (#21432)
|
|
||||||
* Use Name instead of DisplayName in LFS Lock (#21415)
|
|
||||||
* Consolidate more CSS colors into variables (#21402)
|
|
||||||
* Redirect to new repository owner (#21398)
|
|
||||||
* Use ISO date format instead of hard-coded English date format for date range in repo activity page (#21396)
|
|
||||||
* Use weighted algorithm for string matching when finding files in repo (#21370)
|
|
||||||
* Show private data in feeds (#21369)
|
|
||||||
* Refactor parseTreeEntries, speed up tree list (#21368)
|
|
||||||
* Add GET and DELETE endpoints for Docker blob uploads (#21367)
|
|
||||||
* Add nicer error handling on template compile errors (#21350)
|
|
||||||
* Add `stat` to `ToCommit` function for speed (#21337)
|
|
||||||
* Support instance-wide OAuth2 applications (#21335)
|
|
||||||
* Record OAuth client type at registration (#21316)
|
|
||||||
* Add new CSS variables --color-accent and --color-small-accent (#21305)
|
|
||||||
* Improve error descriptions for unauthorized_client (#21292)
|
|
||||||
* Case-insensitive "find files in repo" (#21269)
|
|
||||||
* Consolidate more CSS rules, fix inline code on arc-green (#21260)
|
|
||||||
* Log real ip of requests from ssh (#21216)
|
|
||||||
* Save files in local storage as group readable (#21198)
|
|
||||||
* Enable fluid page layout on medium size viewports (#21178)
|
|
||||||
* File header tweaks (#21175)
|
|
||||||
* Added missing headers on user packages page (#21172)
|
|
||||||
* Display image digest for container packages (#21170)
|
|
||||||
* Skip dirty check for team forms (#21154)
|
|
||||||
* Keep path when creating a new branch (#21153)
|
|
||||||
* Remove fomantic image module (#21145)
|
|
||||||
* Make labels clickable in the comments section. (#21137)
|
|
||||||
* Sort branches and tags by date descending (#21136)
|
|
||||||
* Better repo API unit checks (#21130)
|
|
||||||
* Improve commit status icons (#21124)
|
|
||||||
* Limit length of repo description and repo url input fields (#21119)
|
|
||||||
* Show .editorconfig errors in frontend (#21088)
|
|
||||||
* Allow poster to choose reviewers (#21084)
|
|
||||||
* Remove black labels and CSS cleanup (#21003)
|
|
||||||
* Make e-mail sanity check more precise (#20991)
|
|
||||||
* Use native inputs in whitespace dropdown (#20980)
|
|
||||||
* Enhance package date display (#20928)
|
|
||||||
* Display total blob size of a package version (#20927)
|
|
||||||
* Show language name on hover (#20923)
|
|
||||||
* Show instructions for all generic package files (#20917)
|
|
||||||
* Refactor AssertExistsAndLoadBean to use generics (#20797)
|
|
||||||
* Move the official website link at the footer of gitea (#20777)
|
|
||||||
* Add support for full name in reverse proxy auth (#20776)
|
|
||||||
* Remove useless JS operation for relative time tooltips (#20756)
|
|
||||||
* Replace some icons with SVG (#20741)
|
|
||||||
* Change commit status icons to SVG (#20736)
|
|
||||||
* Improve single repo action for issue and pull requests (#20730)
|
|
||||||
* Allow multiple files in generic packages (#20661)
|
|
||||||
* Add option to create new issue from /issues page (#20650)
|
|
||||||
* Background color of private list-items updated (#20630)
|
|
||||||
* Added search input field to issue filter (#20623)
|
|
||||||
* Increase default item listing size `ISSUE_PAGING_NUM` to 20 (#20547)
|
|
||||||
* Modify milestone search keywords to be case insensitive again (#20513)
|
|
||||||
* Show hint to link package to repo when viewing empty repo package list (#20504)
|
|
||||||
* Add Tar ZSTD support (#20493)
|
|
||||||
* Make code review checkboxes clickable (#20481)
|
|
||||||
* Add "X-Gitea-Object-Type" header for GET `/raw/` & `/media/` API (#20438)
|
|
||||||
* Display project in issue list (#20434)
|
|
||||||
* Prepend commit message to template content when opening a new PR (#20429)
|
|
||||||
* Replace fomantic popup module with tippy.js (#20428)
|
|
||||||
* Allow to specify colors for text in markup (#20363)
|
|
||||||
* Allow access to the Public Organization Member lists with minimal permissions (#20330)
|
|
||||||
* Use default values when provided values are empty (#20318)
|
|
||||||
* Vertical align navbar avatar at middle (#20302)
|
|
||||||
* Delete cancel button in repo creation page (#21381)
|
|
||||||
* Include login_name in adminCreateUser response (#20283)
|
|
||||||
* fix: icon margin in user/settings/repos (#20281)
|
|
||||||
* Remove blue text on migrate page (#20273)
|
|
||||||
* Modify milestone search keywords to be case insensitive (#20266)
|
|
||||||
* Move some files into models' sub packages (#20262)
|
|
||||||
* Add tooltip to repo icons in explore page (#20241)
|
|
||||||
* Remove deprecated licenses (#20222)
|
|
||||||
* Webhook for Wiki changes (#20219)
|
|
||||||
* Share HTML template renderers and create a watcher framework (#20218)
|
|
||||||
* Allow enable LDAP source and disable user sync via CLI (#20206)
|
|
||||||
* Adds a checkbox to select all issues/PRs (#20177)
|
|
||||||
* Refactor `i18n` to `locale` (#20153)
|
|
||||||
* Disable status checks in template if none found (#20088)
|
|
||||||
* Allow manager logging to set SQL (#20064)
|
|
||||||
* Add order by for assignee no sort issue (#20053)
|
|
||||||
* Take a stab at porting existing components to Vue3 (#20044)
|
|
||||||
* Add doctor command to write commit-graphs (#20007)
|
|
||||||
* Add support for authentication based on reverse proxy email (#19949)
|
|
||||||
* Enable spellcheck for EasyMDE, use contenteditable mode (#19776)
|
|
||||||
* Allow specifying SECRET_KEY_URI, similar to INTERNAL_TOKEN_URI (#19663)
|
|
||||||
* Rework mailer settings (#18982)
|
|
||||||
* Add option to purge users (#18064)
|
|
||||||
* Add author search input (#21246)
|
|
||||||
* Make rss/atom identifier globally unique (#21550)
|
|
||||||
* BUGFIXES
|
|
||||||
* Auth interface return error when verify failure (#22119) (#22259)
|
|
||||||
* Use complete SHA to create and query commit status (#22244) (#22257)
|
|
||||||
* Update bleve and zapx to fix unaligned atomic (#22031) (#22218)
|
|
||||||
* Prevent panic in doctor command when running default checks (#21791) (#21807)
|
|
||||||
* Load GitRepo in API before deleting issue (#21720) (#21796)
|
|
||||||
* Ignore line anchor links with leading zeroes (#21728) (#21776)
|
|
||||||
* Set last login when activating account (#21731) (#21755)
|
|
||||||
* Fix UI language switching bug (#21597) (#21749)
|
|
||||||
* Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) (#21738)
|
|
||||||
* Allow local package identifiers for PyPI packages (#21690) (#21727)
|
|
||||||
* Deal with markdown template without metadata (#21639) (#21654)
|
|
||||||
* Fix opaque background on mermaid diagrams (#21642) (#21652)
|
|
||||||
* Fix repository adoption on Windows (#21646) (#21650)
|
|
||||||
* Sync git hooks when config file path changed (#21619) (#21626)
|
|
||||||
* Fix 500 on PR files API (#21602) (#21607)
|
|
||||||
* Fix `Timestamp.IsZero` (#21593) (#21603)
|
|
||||||
* Fix viewing user subscriptions (#21482)
|
|
||||||
* Fix mermaid-related bugs (#21431)
|
|
||||||
* Fix branch dropdown shifting on page load (#21428)
|
|
||||||
* Fix default theme-auto selector when nologin (#21346)
|
|
||||||
* Fix and improve incorrect error messages (#21342)
|
|
||||||
* Fix formatted link for PR review notifications to matrix (#21319)
|
|
||||||
* Center-aligning content of WebAuthN page (#21127)
|
|
||||||
* Remove follow from commits by file (#20765)
|
|
||||||
* Fix commit status popup (#20737)
|
|
||||||
* Fix init mail render logic (#20704)
|
|
||||||
* Use correct page size for link header pagination (#20546)
|
|
||||||
* Preserve unix socket file (#20499)
|
|
||||||
* Use tippy.js for context popup (#20393)
|
|
||||||
* Add missing parameter for error in log message (#20144)
|
|
||||||
* Do not allow organisation owners add themselves as collaborator (#20043)
|
|
||||||
* Rework file highlight rendering and fix yaml copy-paste (#19967)
|
|
||||||
* Improve code diff highlight, fix incorrect rendered diff result (#19958)
|
|
||||||
* TESTING
|
|
||||||
* Improve OAuth integration tests (#21390)
|
|
||||||
* Add playwright tests (#20123)
|
|
||||||
* BUILD
|
|
||||||
* Switch to building with go1.19 (#20695)
|
|
||||||
* Update JS dependencies, adjust eslint (#20659)
|
|
||||||
* Add more linters to improve code readability (#19989)
|
|
||||||
|
|
||||||
## [1.17.4](https://github.com/go-gitea/gitea/releases/tag/1.17.4) - 2022-12-21
|
|
||||||
|
|
||||||
* SECURITY
|
|
||||||
* Do not allow Ghost access to limited visible user/org (#21849) (#21875)
|
|
||||||
* Fix package access for admins and inactive users (#21580) (#21592)
|
|
||||||
* ENHANCEMENTS
|
|
||||||
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21927)
|
|
||||||
* Fix vertical align of committer avatar rendered by email address (#21884) (#21919)
|
|
||||||
* Fix setting HTTP headers after write (#21833) (#21874)
|
|
||||||
* Ignore line anchor links with leading zeroes (#21728) (#21777)
|
|
||||||
* Enable Monaco automaticLayout (#21516)
|
|
||||||
* BUGFIXES
|
|
||||||
* Do not list active repositories as unadopted (#22034) (#22167)
|
|
||||||
* Correctly handle moved files in apply patch (#22118) (#22136)
|
|
||||||
* Fix condition for is_internal (#22095) (#22131)
|
|
||||||
* Fix permission check on issue/pull lock (#22114)
|
|
||||||
* Fix sorting admin user list by last login (#22081) (#22106)
|
|
||||||
* Workaround for container registry push/pull errors (#21862) (#22069)
|
|
||||||
* Fix issue/PR numbers (#22037) (#22045)
|
|
||||||
* Handle empty author names (#21902) (#22028)
|
|
||||||
* Fix ListBranches to handle empty case (#21921) (#22025)
|
|
||||||
* Fix enabling partial clones on 1.17 (#21809)
|
|
||||||
* Prevent panic in doctor command when running default checks (#21791) (#21808)
|
|
||||||
* Upgrade golang.org/x/crypto (#21792) (#21794)
|
|
||||||
* Init git module before database migration (#21764) (#21766)
|
|
||||||
* Set last login when activating account (#21731) (#21754)
|
|
||||||
* Add HEAD fix to gitea doctor (#21352) (#21751)
|
|
||||||
* Fix UI language switching bug (#21597) (#21748)
|
|
||||||
* Remove semver compatible flag and change pypi to an array of test cases (#21708) (#21729)
|
|
||||||
* Allow local package identifiers for PyPI packages (#21690) (#21726)
|
|
||||||
* Fix repository adoption on Windows (#21646) (#21651)
|
|
||||||
* Sync git hooks when config file path changed (#21619) (#21625)
|
|
||||||
* Added check for disabled Packages (#21540) (#21614)
|
|
||||||
* Fix `Timestamp.IsZero` (#21593) (#21604)
|
|
||||||
* Fix issues count bug (#21600)
|
|
||||||
* Support binary deploy in npm packages (#21589)
|
|
||||||
* Update milestone counters when issue is deleted (#21459) (#21586)
|
|
||||||
* SessionUser protection against nil pointer dereference (#21581)
|
|
||||||
* Case-insensitive NuGet symbol file GUID (#21409) (#21575)
|
|
||||||
* Suppress `ExternalLoginUserNotExist` error (#21504) (#21572)
|
|
||||||
* Prevent Authorization header for presigned LFS urls (#21531) (#21569)
|
|
||||||
* Update binding to fix bugs (#21560)
|
|
||||||
* Fix generating compare link (#21519) (#21530)
|
|
||||||
* Ignore error when retrieving changed PR review files (#21487) (#21524)
|
|
||||||
* Fix incorrect notification commit url (#21479) (#21483)
|
|
||||||
* Display total commit count in hook message (#21400) (#21481)
|
|
||||||
* Enforce grouped NuGet search results (#21442) (#21480)
|
|
||||||
* Return 404 when user is not found on avatar (#21476) (#21477)
|
|
||||||
* Normalize NuGet package version on upload (#22186) (#22201)
|
|
||||||
* MISC
|
|
||||||
* Check for zero time instant in TimeStamp.IsZero() (#22171) (#22173)
|
|
||||||
* Fix warn in database structs sync (#22111)
|
|
||||||
* Allow for resolution of NPM registry paths that match upstream (#21568) (#21723)
|
|
||||||
|
|
||||||
## [1.17.3](https://github.com/go-gitea/gitea/releases/tag/v1.17.3) - 2022-10-15
|
|
||||||
|
|
||||||
* SECURITY
|
|
||||||
* Sanitize and Escape refs in git backend (#21464) (#21463)
|
|
||||||
* Bump `golang.org/x/text` (#21412) (#21413)
|
|
||||||
* Update bluemonday (#21281) (#21287)
|
|
||||||
* ENHANCEMENTS
|
|
||||||
* Fix empty container layer history and UI (#21251) (#21278)
|
|
||||||
* Use en-US as fallback when using other default language (#21200) (#21256)
|
|
||||||
* Make the vscode clone link respect transport protocol (#20557) (#21128)
|
|
||||||
* BUGFIXES
|
|
||||||
* Do DB update after merge in hammer context (#21401) (#21416)
|
|
||||||
* Add Num{Issues,Pulls} stats checks (#21404) (#21414)
|
|
||||||
* Stop logging CheckPath returns error: context canceled (#21064) (#21405)
|
|
||||||
* Parse OAuth Authorization header when request omits client secret (#21351) (#21374)
|
|
||||||
* Ignore port for loopback redirect URIs (#21293) (#21373)
|
|
||||||
* Set SemverCompatible to false for Conan packages (#21275) (#21366)
|
|
||||||
* Tag list should include draft releases with existing tags (#21263) (#21365)
|
|
||||||
* Fix linked account translation (#21331) (#21334)
|
|
||||||
* Make NuGet service index publicly accessible (#21242) (#21277)
|
|
||||||
* Foreign ID conflicts if ID is 0 for each item (#21271) (#21272)
|
|
||||||
* Use absolute links in feeds (#21229) (#21265)
|
|
||||||
* Prevent invalid behavior for file reviewing when loading more files (#21230) (#21234)
|
|
||||||
* Respect `REQUIRE_SIGNIN_VIEW` for packages (#20873) (#21232)
|
|
||||||
* Treat git object mode 40755 as directory (#21195) (#21218)
|
|
||||||
* Allow uppercase ASCII alphabet in PyPI package names (#21095) (#21217)
|
|
||||||
* Fix limited user cannot view himself's profile (#21212)
|
|
||||||
* Fix template bug of admin monitor (#21209)
|
|
||||||
* Fix reaction of issues (#21185) (#21196)
|
|
||||||
* Fix CSV diff for added/deleted files (#21189) (#21193)
|
|
||||||
* Fix pagination limit parameter problem (#21111)
|
|
||||||
* TESTING
|
|
||||||
* Fix missing m.Run() in TestMain (#21341)
|
|
||||||
* BUILD
|
|
||||||
* Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239)
|
|
||||||
|
|
||||||
## [1.17.2](https://github.com/go-gitea/gitea/releases/tag/v1.17.2) - 2022-09-06
|
## [1.17.2](https://github.com/go-gitea/gitea/releases/tag/v1.17.2) - 2022-09-06
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
|
@ -742,31 +395,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
* Prevent showing webauthn error for every time visiting `/user/settings/security` (#18385)
|
* Prevent showing webauthn error for every time visiting `/user/settings/security` (#18385)
|
||||||
* Use correct translation key for errors (#18342)
|
* Use correct translation key for errors (#18342)
|
||||||
|
|
||||||
## [1.16.9](https://github.com/go-gitea/gitea/releases/tag/v1.16.9) - 2022-07-12
|
|
||||||
|
|
||||||
* SECURITY
|
|
||||||
* Add write check for creating Commit status (#20332) (#20334)
|
|
||||||
* Check for permission when fetching user controlled issues (#20133) (#20196)
|
|
||||||
* BUGFIXES
|
|
||||||
* Hide notify mail setting ui if not enabled (#20138) (#20337)
|
|
||||||
* Add write check for creating Commit status (#20332) (#20334)
|
|
||||||
* Only show Followers that current user can access (#20220) (#20253)
|
|
||||||
* Release page show all tags in compare dropdown (#20070) (#20071)
|
|
||||||
* Fix permission check for delete tag (#19985) (#20001)
|
|
||||||
* Only log non ErrNotExist errors in git.GetNote (#19884) (#19905)
|
|
||||||
* Use exact search instead of fuzzy search for branch filter dropdown (#19885) (#19893)
|
|
||||||
* Set Setpgid on child git processes (#19865) (#19881)
|
|
||||||
* Import git from alpine 3.16 repository as 2.30.4 is needed for `safe.directory = '*'` to work but alpine 3.13 has 2.30.3 (#19876)
|
|
||||||
* Ensure responses are context.ResponseWriters (#19843) (#19859)
|
|
||||||
* Fix incorrect usage of `Count` function (#19850)
|
|
||||||
* Fix raw endpoint PDF file headers (#19825) (#19826)
|
|
||||||
* Make WIP prefixes case insensitive, e.g. allow `Draft` as a WIP prefix (#19780) (#19811)
|
|
||||||
* Don't return 500 on NotificationUnreadCount (#19802)
|
|
||||||
* Prevent NPE when cache service is disabled (#19703) (#19783)
|
|
||||||
* Detect truncated utf-8 characters at the end of content as still representing utf-8 (#19773) (#19774)
|
|
||||||
* Fix doctor pq: syntax error at or near "." quote user table name (#19765) (#19770)
|
|
||||||
* Fix bug with assigneees (#19757)
|
|
||||||
|
|
||||||
## [1.16.8](https://github.com/go-gitea/gitea/releases/tag/v1.16.8) - 2022-05-16
|
## [1.16.8](https://github.com/go-gitea/gitea/releases/tag/v1.16.8) - 2022-05-16
|
||||||
|
|
||||||
* ENHANCEMENTS
|
* ENHANCEMENTS
|
||||||
|
@ -1430,7 +1058,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
* Fix SVG side by side comparison link (#17375) (#17391)
|
* Fix SVG side by side comparison link (#17375) (#17391)
|
||||||
|
|
||||||
## [1.15.4](https://github.com/go-gitea/gitea/releases/tag/v1.15.4) - 2021-10-08
|
## [1.15.4](https://github.com/go-gitea/gitea/releases/tag/v1.15.4) - 2021-10-08
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Raw file API: don't try to interpret 40char filenames as commit SHA (#17185) (#17272)
|
* Raw file API: don't try to interpret 40char filenames as commit SHA (#17185) (#17272)
|
||||||
* Don't allow merged PRs to be reopened (#17192) (#17271)
|
* Don't allow merged PRs to be reopened (#17192) (#17271)
|
||||||
|
@ -2372,7 +1999,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
* Return original URL of Repositories (#13885) (#13886)
|
* Return original URL of Repositories (#13885) (#13886)
|
||||||
|
|
||||||
## [1.13.0](https://github.com/go-gitea/gitea/releases/tag/v1.13.0) - 2020-12-01
|
## [1.13.0](https://github.com/go-gitea/gitea/releases/tag/v1.13.0) - 2020-12-01
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Add Allow-/Block-List for Migrate & Mirrors (#13610) (#13776)
|
* Add Allow-/Block-List for Migrate & Mirrors (#13610) (#13776)
|
||||||
* Prevent git operations for inactive users (#13527) (#13536)
|
* Prevent git operations for inactive users (#13527) (#13536)
|
||||||
|
@ -3286,7 +2912,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
* Blacklist manifest.json & milestones user (#10292) (#10293)
|
* Blacklist manifest.json & milestones user (#10292) (#10293)
|
||||||
|
|
||||||
## [1.11.0](https://github.com/go-gitea/gitea/releases/tag/v1.11.0) - 2020-02-10
|
## [1.11.0](https://github.com/go-gitea/gitea/releases/tag/v1.11.0) - 2020-02-10
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Fix followers and following tabs in profile (#10202) (#10203)
|
* Fix followers and following tabs in profile (#10202) (#10203)
|
||||||
* Make CertFile and KeyFile relative to CustomPath (#9868) (#9874)
|
* Make CertFile and KeyFile relative to CustomPath (#9868) (#9874)
|
||||||
|
@ -3739,7 +3364,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
|
|
||||||
This is a re-tag version of v1.10.5 and also explicitly built with Go 1.13.
|
This is a re-tag version of v1.10.5 and also explicitly built with Go 1.13.
|
||||||
|
|
||||||
WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be used.
|
WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should **not** be used.
|
||||||
|
|
||||||
## [1.10.5](https://github.com/go-gitea/gitea/releases/tag/v1.10.5) - 2020-03-06
|
## [1.10.5](https://github.com/go-gitea/gitea/releases/tag/v1.10.5) - 2020-03-06
|
||||||
|
|
||||||
|
@ -3760,7 +3385,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Ensure that 2fa is checked on reset-password (#9857) (#9877)
|
* Ensure that 2fa is checked on reset-password (#9857) (#9877)
|
||||||
|
|
||||||
## [1.10.3](https://github.com/go-gitea/gitea/releases/tag/v1.10.3) - 2020-01-17
|
## [1.10.3](https://github.com/go-gitea/gitea/releases/tag/v1.10.3) - 2020-01-17
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Hide credentials when submitting migration (#9102) (#9704)
|
* Hide credentials when submitting migration (#9102) (#9704)
|
||||||
* Never allow an empty password to validate (#9682) (#9684)
|
* Never allow an empty password to validate (#9682) (#9684)
|
||||||
|
@ -3779,7 +3403,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Branches not at ref commit ID should not be listed as Merged (#9614) (#9639)
|
* Branches not at ref commit ID should not be listed as Merged (#9614) (#9639)
|
||||||
|
|
||||||
## [1.10.2](https://github.com/go-gitea/gitea/releases/tag/v1.10.2) - 2020-01-02
|
## [1.10.2](https://github.com/go-gitea/gitea/releases/tag/v1.10.2) - 2020-01-02
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Allow only specific Columns to be updated on Issue via API (#9539) (#9580)
|
* Allow only specific Columns to be updated on Issue via API (#9539) (#9580)
|
||||||
* Add ErrReactionAlreadyExist error (#9550) (#9564)
|
* Add ErrReactionAlreadyExist error (#9550) (#9564)
|
||||||
|
@ -3800,7 +3423,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix File Edit: Author/Committer interchanged (#9297) (#9300)
|
* Fix File Edit: Author/Committer interchanged (#9297) (#9300)
|
||||||
|
|
||||||
## [1.10.1](https://github.com/go-gitea/gitea/releases/tag/v1.10.1) - 2019-12-05
|
## [1.10.1](https://github.com/go-gitea/gitea/releases/tag/v1.10.1) - 2019-12-05
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix max length check and limit in multiple repo forms (#9148) (#9204)
|
* Fix max length check and limit in multiple repo forms (#9148) (#9204)
|
||||||
* Properly fix displaying virtual session provider in admin panel (#9137) (#9203)
|
* Properly fix displaying virtual session provider in admin panel (#9137) (#9203)
|
||||||
|
@ -3822,7 +3444,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Shadow password correctly for session config (#8984) (#9002)
|
* Shadow password correctly for session config (#8984) (#9002)
|
||||||
|
|
||||||
## [1.10.0](https://github.com/go-gitea/gitea/releases/tag/v1.10.0) - 2019-11-13
|
## [1.10.0](https://github.com/go-gitea/gitea/releases/tag/v1.10.0) - 2019-11-13
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Fix deadline on update issue or PR via API (#8698)
|
* Fix deadline on update issue or PR via API (#8698)
|
||||||
* Hide some user information via API if user doesn't have enough permission (#8655) (#8657)
|
* Hide some user information via API if user doesn't have enough permission (#8655) (#8657)
|
||||||
|
@ -4120,7 +3741,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix Statuses API only shows first 10 statuses: Add paging and extend API GetCommitStatuses (#7141)
|
* Fix Statuses API only shows first 10 statuses: Add paging and extend API GetCommitStatuses (#7141)
|
||||||
|
|
||||||
## [1.9.6](https://github.com/go-gitea/gitea/releases/tag/v1.9.6) - 2019-11-13
|
## [1.9.6](https://github.com/go-gitea/gitea/releases/tag/v1.9.6) - 2019-11-13
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Allow to merge if file path contains " or \ (#8629) (#8772)
|
* Allow to merge if file path contains " or \ (#8629) (#8772)
|
||||||
* Fix 500 when edit hook (#8782) (#8790)
|
* Fix 500 when edit hook (#8782) (#8790)
|
||||||
|
@ -4129,7 +3749,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Add Close() method to gogitRepository (#8901) (#8958)
|
* Add Close() method to gogitRepository (#8901) (#8958)
|
||||||
|
|
||||||
## [1.9.5](https://github.com/go-gitea/gitea/releases/tag/v1.9.5) - 2019-10-30
|
## [1.9.5](https://github.com/go-gitea/gitea/releases/tag/v1.9.5) - 2019-10-30
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Hide some user information via API if user doesn't have enough permission (#8655) (#8658)
|
* Hide some user information via API if user doesn't have enough permission (#8655) (#8658)
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
|
@ -4154,7 +3773,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Update heatmap fixtures to restore tests (#8615) (#8617)
|
* Update heatmap fixtures to restore tests (#8615) (#8617)
|
||||||
|
|
||||||
## [1.9.4](https://github.com/go-gitea/gitea/releases/tag/v1.9.4) - 2019-10-08
|
## [1.9.4](https://github.com/go-gitea/gitea/releases/tag/v1.9.4) - 2019-10-08
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Highlight issue references (#8101) (#8404)
|
* Highlight issue references (#8101) (#8404)
|
||||||
* Fix bug when migrating a private repository #7917 (#8403)
|
* Fix bug when migrating a private repository #7917 (#8403)
|
||||||
|
@ -4181,7 +3799,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Make show private icon when repo avatar set (#8144) (#8175)
|
* Make show private icon when repo avatar set (#8144) (#8175)
|
||||||
|
|
||||||
## [1.9.3](https://github.com/go-gitea/gitea/releases/tag/v1.9.3) - 2019-09-06
|
## [1.9.3](https://github.com/go-gitea/gitea/releases/tag/v1.9.3) - 2019-09-06
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix go get from a private repository with Go 1.13 (#8100)
|
* Fix go get from a private repository with Go 1.13 (#8100)
|
||||||
* Strict name matching for Repository.GetTagID() (#8082)
|
* Strict name matching for Repository.GetTagID() (#8082)
|
||||||
|
@ -4197,7 +3814,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Keep blame view buttons sequence consistent with normal view when viewing a file (#8007) (#8009)
|
* Keep blame view buttons sequence consistent with normal view when viewing a file (#8007) (#8009)
|
||||||
|
|
||||||
## [1.9.2](https://github.com/go-gitea/gitea/releases/tag/v1.9.2) - 2019-08-22
|
## [1.9.2](https://github.com/go-gitea/gitea/releases/tag/v1.9.2) - 2019-08-22
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix wrong sender when send slack webhook (#7918) (#7924)
|
* Fix wrong sender when send slack webhook (#7918) (#7924)
|
||||||
* Upload support text/plain; charset=utf8 (#7899)
|
* Upload support text/plain; charset=utf8 (#7899)
|
||||||
|
@ -4212,7 +3828,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Drone/docker: prepare multi-arch release + provide arm64 image (#7571) (#7884)
|
* Drone/docker: prepare multi-arch release + provide arm64 image (#7571) (#7884)
|
||||||
|
|
||||||
## [1.9.1](https://github.com/go-gitea/gitea/releases/tag/v1.9.1) - 2019-08-14
|
## [1.9.1](https://github.com/go-gitea/gitea/releases/tag/v1.9.1) - 2019-08-14
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742) (#7752)
|
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742) (#7752)
|
||||||
* SECURITY
|
* SECURITY
|
||||||
|
@ -4240,7 +3855,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Correct wrong datetime format for git (#7689) (#7690)
|
* Correct wrong datetime format for git (#7689) (#7690)
|
||||||
|
|
||||||
## [1.9.0](https://github.com/go-gitea/gitea/releases/tag/v1.9.0) - 2019-07-30
|
## [1.9.0](https://github.com/go-gitea/gitea/releases/tag/v1.9.0) - 2019-07-30
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Better logging (#6038) (#6095)
|
* Better logging (#6038) (#6095)
|
||||||
* SECURITY
|
* SECURITY
|
||||||
|
@ -4597,7 +4211,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Added docker example for backup (#5846)
|
* Added docker example for backup (#5846)
|
||||||
|
|
||||||
## [1.8.3](https://github.com/go-gitea/gitea/releases/tag/v1.8.3) - 2019-06-17
|
## [1.8.3](https://github.com/go-gitea/gitea/releases/tag/v1.8.3) - 2019-06-17
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Always set userID on LFS authentication (#7224) (Part of #6993)
|
* Always set userID on LFS authentication (#7224) (Part of #6993)
|
||||||
* Fix LFS Locks over SSH (#6999) (#7223)
|
* Fix LFS Locks over SSH (#6999) (#7223)
|
||||||
|
@ -4608,7 +4221,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix GCArgs load from ini (#7156) (#7157)
|
* Fix GCArgs load from ini (#7156) (#7157)
|
||||||
|
|
||||||
## [1.8.2](https://github.com/go-gitea/gitea/releases/tag/v1.8.2) - 2019-05-29
|
## [1.8.2](https://github.com/go-gitea/gitea/releases/tag/v1.8.2) - 2019-05-29
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix possbile mysql invalid connnection error (#7051) (#7071)
|
* Fix possbile mysql invalid connnection error (#7051) (#7071)
|
||||||
* Handle invalid administrator username on install page (#7060) (#7063)
|
* Handle invalid administrator username on install page (#7060) (#7063)
|
||||||
|
@ -4624,7 +4236,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix wrong init dependency on markup extensions (#7038) (#7074)
|
* Fix wrong init dependency on markup extensions (#7038) (#7074)
|
||||||
|
|
||||||
## [1.8.1](https://github.com/go-gitea/gitea/releases/tag/v1.8.1) - 2019-05-08
|
## [1.8.1](https://github.com/go-gitea/gitea/releases/tag/v1.8.1) - 2019-05-08
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix 404 when sending pull requests in some situations (#6871) (#6873)
|
* Fix 404 when sending pull requests in some situations (#6871) (#6873)
|
||||||
* Enforce osusergo build tag for releases (#6862) (#6869)
|
* Enforce osusergo build tag for releases (#6862) (#6869)
|
||||||
|
@ -4651,7 +4262,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix config ui error about cache ttl (#6861) (#6865)
|
* Fix config ui error about cache ttl (#6861) (#6865)
|
||||||
|
|
||||||
## [1.8.0](https://github.com/go-gitea/gitea/releases/tag/v1.8.0) - 2019-04-20
|
## [1.8.0](https://github.com/go-gitea/gitea/releases/tag/v1.8.0) - 2019-04-20
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Prevent remote code execution vulnerability with mirror repo URL settings (#6593) (#6594)
|
* Prevent remote code execution vulnerability with mirror repo URL settings (#6593) (#6594)
|
||||||
* Resolve 2FA bypass on API (#6676) (#6674)
|
* Resolve 2FA bypass on API (#6676) (#6674)
|
||||||
|
@ -4886,21 +4496,18 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Migrate database if app.ini found (#5290)
|
* Migrate database if app.ini found (#5290)
|
||||||
|
|
||||||
## [1.7.6](https://github.com/go-gitea/gitea/releases/tag/v1.7.6) - 2019-04-12
|
## [1.7.6](https://github.com/go-gitea/gitea/releases/tag/v1.7.6) - 2019-04-12
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Prevent remote code execution vulnerability with mirror repo URL settings (#6593) (#6595)
|
* Prevent remote code execution vulnerability with mirror repo URL settings (#6593) (#6595)
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Allow resend of confirmation email when logged in (#6482) (#6487)
|
* Allow resend of confirmation email when logged in (#6482) (#6487)
|
||||||
|
|
||||||
## [1.7.5](https://github.com/go-gitea/gitea/releases/tag/v1.7.5) - 2019-03-27
|
## [1.7.5](https://github.com/go-gitea/gitea/releases/tag/v1.7.5) - 2019-03-27
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix unitTypeCode not being used in accessLevelUnit (#6419) (#6423)
|
* Fix unitTypeCode not being used in accessLevelUnit (#6419) (#6423)
|
||||||
* Fix bug where manifest.json was being requested without cookies and continuously creating new sessions (#6372) (#6383)
|
* Fix bug where manifest.json was being requested without cookies and continuously creating new sessions (#6372) (#6383)
|
||||||
* Fix ParsePatch function to work with quoted diff --git strings (#6323) (#6332)
|
* Fix ParsePatch function to work with quoted diff --git strings (#6323) (#6332)
|
||||||
|
|
||||||
## [1.7.4](https://github.com/go-gitea/gitea/releases/tag/v1.7.4) - 2019-03-12
|
## [1.7.4](https://github.com/go-gitea/gitea/releases/tag/v1.7.4) - 2019-03-12
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Fix potential XSS vulnerability in repository description. (#6306) (#6308)
|
* Fix potential XSS vulnerability in repository description. (#6306) (#6308)
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
|
@ -4910,7 +4517,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix displaying dashboard even if required to change password (#6214) (#6215)
|
* Fix displaying dashboard even if required to change password (#6214) (#6215)
|
||||||
|
|
||||||
## [1.7.3](https://github.com/go-gitea/gitea/releases/tag/v1.7.3) - 2019-02-27
|
## [1.7.3](https://github.com/go-gitea/gitea/releases/tag/v1.7.3) - 2019-02-27
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix server 500 when trying to migrate to an already existing repository (#6188) (#6197)
|
* Fix server 500 when trying to migrate to an already existing repository (#6188) (#6197)
|
||||||
* Load Issue attributes for API /repos/{owner}/{repo}/issues/{index} (#6122) (#6185)
|
* Load Issue attributes for API /repos/{owner}/{repo}/issues/{index} (#6122) (#6185)
|
||||||
|
@ -4925,7 +4531,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) (#6097)
|
* Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) (#6097)
|
||||||
|
|
||||||
## [1.7.2](https://github.com/go-gitea/gitea/releases/tag/v1.7.2) - 2019-02-14
|
## [1.7.2](https://github.com/go-gitea/gitea/releases/tag/v1.7.2) - 2019-02-14
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Remove all CommitStatus when a repo is deleted (#5940) (#5941)
|
* Remove all CommitStatus when a repo is deleted (#5940) (#5941)
|
||||||
* Fix notifications on pushing with deploy keys by setting hook environment variables (#5935) (#5944)
|
* Fix notifications on pushing with deploy keys by setting hook environment variables (#5935) (#5944)
|
||||||
|
@ -4942,7 +4547,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* In basic auth check for tokens before call UserSignIn (#5725) (#6083)
|
* In basic auth check for tokens before call UserSignIn (#5725) (#6083)
|
||||||
|
|
||||||
## [1.7.1](https://github.com/go-gitea/gitea/releases/tag/v1.7.1) - 2019-01-31
|
## [1.7.1](https://github.com/go-gitea/gitea/releases/tag/v1.7.1) - 2019-01-31
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Disable redirect for i18n (#5910) (#5916)
|
* Disable redirect for i18n (#5910) (#5916)
|
||||||
* Only allow local login if password is non-empty (#5906) (#5908)
|
* Only allow local login if password is non-empty (#5906) (#5908)
|
||||||
|
@ -4964,7 +4568,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Include Go toolchain to --version (#5832) (#5830)
|
* Include Go toolchain to --version (#5832) (#5830)
|
||||||
|
|
||||||
## [1.7.0](https://github.com/go-gitea/gitea/releases/tag/v1.7.0) - 2019-01-22
|
## [1.7.0](https://github.com/go-gitea/gitea/releases/tag/v1.7.0) - 2019-01-22
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Do not display the raw OpenID error in the UI (#5705) (#5712)
|
* Do not display the raw OpenID error in the UI (#5705) (#5712)
|
||||||
* When redirecting clean the path to avoid redirecting to external site (#5669) (#5679)
|
* When redirecting clean the path to avoid redirecting to external site (#5669) (#5679)
|
||||||
|
@ -5121,21 +4724,18 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Only chown directories during docker setup if necessary. Fix #4425 (#5064)
|
* Only chown directories during docker setup if necessary. Fix #4425 (#5064)
|
||||||
|
|
||||||
## [1.6.4](https://github.com/go-gitea/gitea/releases/tag/v1.6.4) - 2019-01-15
|
## [1.6.4](https://github.com/go-gitea/gitea/releases/tag/v1.6.4) - 2019-01-15
|
||||||
|
|
||||||
* BUGFIX
|
* BUGFIX
|
||||||
* Fix SSH key now can be reused as public key after deleting as deploy key (#5671) (#5685)
|
* Fix SSH key now can be reused as public key after deleting as deploy key (#5671) (#5685)
|
||||||
* When redirecting clean the path to avoid redirecting to external site (#5669) (#5703)
|
* When redirecting clean the path to avoid redirecting to external site (#5669) (#5703)
|
||||||
* Fix to use correct value for "MSpan Structures Obtained" (#5706) (#5715)
|
* Fix to use correct value for "MSpan Structures Obtained" (#5706) (#5715)
|
||||||
|
|
||||||
## [1.6.3](https://github.com/go-gitea/gitea/releases/tag/v1.6.3) - 2019-01-04
|
## [1.6.3](https://github.com/go-gitea/gitea/releases/tag/v1.6.3) - 2019-01-04
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Prevent DeleteFilePost doing arbitrary deletion (#5631)
|
* Prevent DeleteFilePost doing arbitrary deletion (#5631)
|
||||||
* BUGFIX
|
* BUGFIX
|
||||||
* Fix wrong text getting saved on editing second comment on an issue (#5608)
|
* Fix wrong text getting saved on editing second comment on an issue (#5608)
|
||||||
|
|
||||||
## [1.6.2](https://github.com/go-gitea/gitea/releases/tag/v1.6.2) - 2018-12-21
|
## [1.6.2](https://github.com/go-gitea/gitea/releases/tag/v1.6.2) - 2018-12-21
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Sanitize uploaded file names (#5571) (#5573)
|
* Sanitize uploaded file names (#5571) (#5573)
|
||||||
* HTMLEncode user added text (#5570) (#5575)
|
* HTMLEncode user added text (#5570) (#5575)
|
||||||
|
@ -5150,7 +4750,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix empty wiki (#5504) (#5508)
|
* Fix empty wiki (#5504) (#5508)
|
||||||
|
|
||||||
## [1.6.1](https://github.com/go-gitea/gitea/releases/tag/v1.6.1) - 2018-12-08
|
## [1.6.1](https://github.com/go-gitea/gitea/releases/tag/v1.6.1) - 2018-12-08
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix dependent issue searching when gitea is run in subpath (#5392) (#5400)
|
* Fix dependent issue searching when gitea is run in subpath (#5392) (#5400)
|
||||||
* API: '/orgs/:org/repos': return private repos with read access (#5393)
|
* API: '/orgs/:org/repos': return private repos with read access (#5393)
|
||||||
|
@ -5161,7 +4760,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix topic name length on database (#5493) (#5495)
|
* Fix topic name length on database (#5493) (#5495)
|
||||||
|
|
||||||
## [1.6.0](https://github.com/go-gitea/gitea/releases/tag/v1.6.0) - 2018-11-22
|
## [1.6.0](https://github.com/go-gitea/gitea/releases/tag/v1.6.0) - 2018-11-22
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Respect email privacy option in user search via API (#4512)
|
* Respect email privacy option in user search via API (#4512)
|
||||||
* Simply remove tidb and deps (#3993)
|
* Simply remove tidb and deps (#3993)
|
||||||
|
@ -5315,12 +4913,10 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix translation (#4355)
|
* Fix translation (#4355)
|
||||||
|
|
||||||
## [1.5.3](https://github.com/go-gitea/gitea/releases/tag/v1.5.3) - 2018-10-31
|
## [1.5.3](https://github.com/go-gitea/gitea/releases/tag/v1.5.3) - 2018-10-31
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Fix remote command execution vulnerability in upstream library (#5177) (#5196)
|
* Fix remote command execution vulnerability in upstream library (#5177) (#5196)
|
||||||
|
|
||||||
## [1.5.2](https://github.com/go-gitea/gitea/releases/tag/v1.5.2) - 2018-10-09
|
## [1.5.2](https://github.com/go-gitea/gitea/releases/tag/v1.5.2) - 2018-10-09
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Enforce token on api routes (#4840) (#4905)
|
* Enforce token on api routes (#4840) (#4905)
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
|
@ -5337,7 +4933,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix trimming of markup section names (#4864)
|
* Fix trimming of markup section names (#4864)
|
||||||
|
|
||||||
## [1.5.1](https://github.com/go-gitea/gitea/releases/tag/v1.5.1) - 2018-09-03
|
## [1.5.1](https://github.com/go-gitea/gitea/releases/tag/v1.5.1) - 2018-09-03
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Don't disclose emails of all users when sending out emails (#4784)
|
* Don't disclose emails of all users when sending out emails (#4784)
|
||||||
* Improve URL validation for external wiki and external issues (#4710) (#4740)
|
* Improve URL validation for external wiki and external issues (#4710) (#4740)
|
||||||
|
@ -5352,7 +4947,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix incorrect caption of webhook setting (#4701) (#4718)
|
* Fix incorrect caption of webhook setting (#4701) (#4718)
|
||||||
|
|
||||||
## [1.5.0](https://github.com/go-gitea/gitea/releases/tag/v1.5.0) - 2018-08-10
|
## [1.5.0](https://github.com/go-gitea/gitea/releases/tag/v1.5.0) - 2018-08-10
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Check that repositories can only be migrated to own user or organizations (#4366) (#4370)
|
* Check that repositories can only be migrated to own user or organizations (#4366) (#4370)
|
||||||
* Limit uploaded avatar image-size to 4096px x 3072px by default (#4353)
|
* Limit uploaded avatar image-size to 4096px x 3072px by default (#4353)
|
||||||
|
@ -5416,7 +5010,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Sign release binaries (#4188)
|
* Sign release binaries (#4188)
|
||||||
|
|
||||||
## [1.4.3](https://github.com/go-gitea/gitea/releases/tag/v1.4.3) - 2018-06-26
|
## [1.4.3](https://github.com/go-gitea/gitea/releases/tag/v1.4.3) - 2018-06-26
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* HTML-escape plain-text READMEs (#4192) (#4214)
|
* HTML-escape plain-text READMEs (#4192) (#4214)
|
||||||
* Fix open redirect vulnerability on login screen (#4312) (#4312)
|
* Fix open redirect vulnerability on login screen (#4312) (#4312)
|
||||||
|
@ -5429,7 +5022,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix webhook type conflation (#4285) (#4285)
|
* Fix webhook type conflation (#4285) (#4285)
|
||||||
|
|
||||||
## [1.4.2](https://github.com/go-gitea/gitea/releases/tag/v1.4.2) - 2018-06-04
|
## [1.4.2](https://github.com/go-gitea/gitea/releases/tag/v1.4.2) - 2018-06-04
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Adjust z-index for floating labels (#3939) (#3950)
|
* Adjust z-index for floating labels (#3939) (#3950)
|
||||||
* Add missing token validation on application settings page (#3976) #3978
|
* Add missing token validation on application settings page (#3976) #3978
|
||||||
|
@ -5445,7 +5037,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Respository's home page not updated after first push (#4075)
|
* Respository's home page not updated after first push (#4075)
|
||||||
|
|
||||||
## [1.4.1](https://github.com/go-gitea/gitea/releases/tag/v1.4.1) - 2018-05-03
|
## [1.4.1](https://github.com/go-gitea/gitea/releases/tag/v1.4.1) - 2018-05-03
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Add "error" as reserved username (#3882) (#3886)
|
* Add "error" as reserved username (#3882) (#3886)
|
||||||
* SECURITY
|
* SECURITY
|
||||||
|
@ -5463,7 +5054,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Show clipboard button if disable HTTP of git protocol (#3773) (#3774)
|
* Show clipboard button if disable HTTP of git protocol (#3773) (#3774)
|
||||||
|
|
||||||
## [1.4.0](https://github.com/go-gitea/gitea/releases/tag/v1.4.0) - 2018-03-25
|
## [1.4.0](https://github.com/go-gitea/gitea/releases/tag/v1.4.0) - 2018-03-25
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Drop deprecated GOGS\_WORK\_DIR use (#2946)
|
* Drop deprecated GOGS\_WORK\_DIR use (#2946)
|
||||||
* Fix API status code for hook creation (#2814)
|
* Fix API status code for hook creation (#2814)
|
||||||
|
@ -5583,7 +5173,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Add owner to delete repo message (#2886)
|
* Add owner to delete repo message (#2886)
|
||||||
|
|
||||||
## [1.3.1](https://github.com/go-gitea/gitea/releases/tag/v1.3.1) - 2017-12-08
|
## [1.3.1](https://github.com/go-gitea/gitea/releases/tag/v1.3.1) - 2017-12-08
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Sanitize logs for mirror sync (#3057, #3082) (#3078)
|
* Sanitize logs for mirror sync (#3057, #3082) (#3078)
|
||||||
* Fix missing branch in release bug (#3108) (#3117)
|
* Fix missing branch in release bug (#3108) (#3117)
|
||||||
|
@ -5594,7 +5183,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix missing password length check when change password (#3039) (#3071)
|
* Fix missing password length check when change password (#3039) (#3071)
|
||||||
|
|
||||||
## [1.3.0](https://github.com/go-gitea/gitea/releases/tag/v1.3.0) - 2017-11-29
|
## [1.3.0](https://github.com/go-gitea/gitea/releases/tag/v1.3.0) - 2017-11-29
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
* Make URL scheme unambiguous (#2408)
|
* Make URL scheme unambiguous (#2408)
|
||||||
* FEATURES
|
* FEATURES
|
||||||
|
@ -5822,13 +5410,11 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Added vendor dir for js/css libs; Documented sources (#1484) (#2241)
|
* Added vendor dir for js/css libs; Documented sources (#1484) (#2241)
|
||||||
|
|
||||||
## [1.2.3](https://github.com/go-gitea/gitea/releases/tag/v1.2.3) - 2017-11-03
|
## [1.2.3](https://github.com/go-gitea/gitea/releases/tag/v1.2.3) - 2017-11-03
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Only require one email when validating GPG key (#2266, #2467, #2663) (#2788)
|
* Only require one email when validating GPG key (#2266, #2467, #2663) (#2788)
|
||||||
* Fix order of comments (#2835) (#2839)
|
* Fix order of comments (#2835) (#2839)
|
||||||
|
|
||||||
## [1.2.2](https://github.com/go-gitea/gitea/releases/tag/v1.2.2) - 2017-10-26
|
## [1.2.2](https://github.com/go-gitea/gitea/releases/tag/v1.2.2) - 2017-10-26
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Add checks for commits with missing author and time (#2771) (#2785)
|
* Add checks for commits with missing author and time (#2771) (#2785)
|
||||||
* Fix sending mail with a non-latin display name (#2559) (#2783)
|
* Fix sending mail with a non-latin display name (#2559) (#2783)
|
||||||
|
@ -5837,7 +5423,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix emojify image URL (#2769) (#2773)
|
* Fix emojify image URL (#2769) (#2773)
|
||||||
|
|
||||||
## [1.2.1](https://github.com/go-gitea/gitea/releases/tag/v1.2.1) - 2017-10-16
|
## [1.2.1](https://github.com/go-gitea/gitea/releases/tag/v1.2.1) - 2017-10-16
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
* Fix PR, milestone and label functionality if issue unit is disabled (#2710) (#2714)
|
* Fix PR, milestone and label functionality if issue unit is disabled (#2710) (#2714)
|
||||||
* Fix plain readme didn't render correctly on repo home page (#2705) (#2712)
|
* Fix plain readme didn't render correctly on repo home page (#2705) (#2712)
|
||||||
|
@ -5846,7 +5431,6 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
|
||||||
* Fix slice out of bounds error in mailer (#2479) (#2696)
|
* Fix slice out of bounds error in mailer (#2479) (#2696)
|
||||||
|
|
||||||
## [1.2.0](https://github.com/go-gitea/gitea/releases/tag/v1.2.0) - 2017-10-10
|
## [1.2.0](https://github.com/go-gitea/gitea/releases/tag/v1.2.0) - 2017-10-10
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
* Sanitation fix from Gogs (#1461)
|
* Sanitation fix from Gogs (#1461)
|
||||||
* BREAKING
|
* BREAKING
|
||||||
|
|
156
CONTRIBUTING.md
156
CONTRIBUTING.md
|
@ -86,10 +86,8 @@ Here's how to run the test suite:
|
||||||
| | |
|
| | |
|
||||||
| :------------------------------------- | :----------------------------------------------- |
|
| :------------------------------------- | :----------------------------------------------- |
|
||||||
|``make test[\#TestSpecificName]`` | run unit test |
|
|``make test[\#TestSpecificName]`` | run unit test |
|
||||||
|``make test-sqlite[\#TestSpecificName]``| run [integration](tests/integration) test for SQLite |
|
|``make test-sqlite[\#TestSpecificName]``| run [integration](integrations) test for SQLite |
|
||||||
|[More details about integration tests](tests/integration/README.md) |
|
|[More details about integrations](integrations/README.md) |
|
||||||
|``make test-e2e-sqlite[\#TestSpecificFileName]``| run [end-to-end](tests/e2e) test for SQLite |
|
|
||||||
|[More details about e2e tests](tests/e2e/README.md) |
|
|
||||||
|
|
||||||
## Vendoring
|
## Vendoring
|
||||||
|
|
||||||
|
@ -129,14 +127,14 @@ the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob
|
||||||
it has lots of useful tips for any project you may want to contribute.
|
it has lots of useful tips for any project you may want to contribute.
|
||||||
Some of the key points:
|
Some of the key points:
|
||||||
|
|
||||||
- Make small pull requests. The smaller, the faster to review and the
|
* Make small pull requests. The smaller, the faster to review and the
|
||||||
more likely it will be merged soon.
|
more likely it will be merged soon.
|
||||||
- Don't make changes unrelated to your PR. Maybe there are typos on
|
* Don't make changes unrelated to your PR. Maybe there are typos on
|
||||||
some comments, maybe refactoring would be welcome on a function... but
|
some comments, maybe refactoring would be welcome on a function... but
|
||||||
if that is not related to your PR, please make *another* PR for that.
|
if that is not related to your PR, please make *another* PR for that.
|
||||||
- Split big pull requests into multiple small ones. An incremental change
|
* Split big pull requests into multiple small ones. An incremental change
|
||||||
will be faster to review than a huge PR.
|
will be faster to review than a huge PR.
|
||||||
- Use the first comment as a summary explainer of your PR and you should keep this up-to-date as the PR evolves.
|
* Use the first comment as a summary explainer of your PR and you should keep this up-to-date as the PR evolves.
|
||||||
|
|
||||||
If your PR could cause a breaking change you must add a BREAKING section to this comment e.g.:
|
If your PR could cause a breaking change you must add a BREAKING section to this comment e.g.:
|
||||||
|
|
||||||
|
@ -146,20 +144,9 @@ If your PR could cause a breaking change you must add a BREAKING section to this
|
||||||
|
|
||||||
To explain how this could affect users and how to mitigate these changes.
|
To explain how this could affect users and how to mitigate these changes.
|
||||||
|
|
||||||
Once code review starts on your PR, do not rebase nor squash your branch as it makes it
|
|
||||||
difficult to review the new changes. Only if there is a need, sync your branch by merging
|
|
||||||
the base branch into yours. Don't worry about merge commits messing up your tree as
|
|
||||||
the final merge process squashes all commits into one, with the visible commit message (first
|
|
||||||
line) being the PR title + PR index and description being the PR's first comment.
|
|
||||||
|
|
||||||
Once your PR gets the `lgtm/done` label, don't worry about keeping it up-to-date or breaking
|
|
||||||
builds (unless there's a merge conflict or a request is made by a maintainer to make
|
|
||||||
modifications). It is the maintainer team's responsibility from this point to get it merged.
|
|
||||||
|
|
||||||
## Styleguide
|
## Styleguide
|
||||||
|
|
||||||
For imports you should use the following format (*without* the comments)
|
For imports you should use the following format (_without_ the comments)
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
// stdlib
|
// stdlib
|
||||||
|
@ -180,34 +167,25 @@ import (
|
||||||
|
|
||||||
To maintain understandable code and avoid circular dependencies it is important to have a good structure of the code. The Gitea code is divided into the following parts:
|
To maintain understandable code and avoid circular dependencies it is important to have a good structure of the code. The Gitea code is divided into the following parts:
|
||||||
|
|
||||||
|
- **integration:** Integrations tests
|
||||||
- **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependencies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
|
- **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependencies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
|
||||||
- **models/fixtures:** Sample model data used in integration tests.
|
- **models/fixtures:** Sample model data used in integration tests.
|
||||||
- **models/migrations:** Handling of database migrations between versions. PRs that changes a database structure shall also have a migration step.
|
- **models/migrations:** Handling of database migrations between versions. PRs that changes a database structure shall also have a migration step.
|
||||||
- **modules:** Different modules to handle specific functionality in Gitea. Shall only depend on other modules but not other packages (models, services).
|
- **modules:** Different modules to handle specific functionality in Gitea.
|
||||||
- **public:** Frontend files (javascript, images, css, etc.)
|
- **public:** Frontend files (javascript, images, css, etc.)
|
||||||
- **routers:** Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) shall not depend on routers.
|
- **routers:** Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) shall not depend on routers
|
||||||
- **services:** Support functions for common routing operations. Uses models and modules to handle the request.
|
- **services:** Support functions for common routing operations. Uses models and modules to handle the request.
|
||||||
- **templates:** Golang templates for generating the html output.
|
- **templates:** Golang templates for generating the html output.
|
||||||
- **tests/e2e:** End to end tests
|
|
||||||
- **tests/integration:** Integration tests
|
|
||||||
- **vendor:** External code that Gitea depends on.
|
- **vendor:** External code that Gitea depends on.
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
If you add a new feature or change an existing aspect of Gitea, the documentation for that feature must be created or updated.
|
|
||||||
|
|
||||||
## API v1
|
## API v1
|
||||||
|
|
||||||
The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [GitHub API v3](https://developer.github.com/v3/).
|
The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [GitHub API v3](https://developer.github.com/v3/).
|
||||||
|
|
||||||
Thus, Gitea´s API should use the same endpoints and fields as GitHub´s API as far as possible, unless there are good reasons to deviate.
|
Thus, Gitea´s API should use the same endpoints and fields as GitHub´s API as far as possible, unless there are good reasons to deviate.
|
||||||
|
|
||||||
If Gitea provides functionality that GitHub does not, a new endpoint can be created.
|
If Gitea provides functionality that GitHub does not, a new endpoint can be created.
|
||||||
|
|
||||||
If information is provided by Gitea that is not provided by the GitHub API, a new field can be used that doesn't collide with any GitHub fields.
|
If information is provided by Gitea that is not provided by the GitHub API, a new field can be used that doesn't collide with any GitHub fields.
|
||||||
|
|
||||||
Updating an existing API should not remove existing fields unless there is a really good reason to do so.
|
Updating an existing API should not remove existing fields unless there is a really good reason to do so.
|
||||||
|
|
||||||
The same applies to status responses. If you notice a problem, feel free to leave a comment in the code for future refactoring to APIv2 (which is currently not planned).
|
The same applies to status responses. If you notice a problem, feel free to leave a comment in the code for future refactoring to APIv2 (which is currently not planned).
|
||||||
|
|
||||||
All expected results (errors, success, fail messages) should be documented
|
All expected results (errors, success, fail messages) should be documented
|
||||||
|
@ -217,7 +195,6 @@ All JSON input types must be defined as a struct in [modules/structs/](modules/s
|
||||||
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L76-L91))
|
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L76-L91))
|
||||||
and referenced in
|
and referenced in
|
||||||
[routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/options.go).
|
[routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/options.go).
|
||||||
|
|
||||||
They can then be used like the following:
|
They can then be used like the following:
|
||||||
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L318)).
|
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L318)).
|
||||||
|
|
||||||
|
@ -225,24 +202,41 @@ All JSON responses must be defined as a struct in [modules/structs/](modules/str
|
||||||
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L36-L68))
|
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L36-L68))
|
||||||
and referenced in its category in [routers/api/v1/swagger/](routers/api/v1/swagger/)
|
and referenced in its category in [routers/api/v1/swagger/](routers/api/v1/swagger/)
|
||||||
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/issue.go#L11-L16))
|
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/issue.go#L11-L16))
|
||||||
|
|
||||||
They can be used like the following:
|
They can be used like the following:
|
||||||
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L277-L279))
|
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L277-L279))
|
||||||
|
|
||||||
In general, HTTP methods are chosen as follows:
|
In general, HTTP methods are chosen as follows:
|
||||||
|
* **GET** endpoints return requested object and status **OK (200)**
|
||||||
- **GET** endpoints return requested object and status **OK (200)**
|
* **DELETE** endpoints return status **No Content (204)**
|
||||||
- **DELETE** endpoints return status **No Content (204)**
|
* **POST** endpoints return status **Created (201)**, used to **create** new objects (e.g. a User)
|
||||||
- **POST** endpoints return status **Created (201)**, used to **create** new objects (e.g. a User)
|
* **PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Objects (e.g. User) to something (e.g. Org-Team)
|
||||||
- **PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Objects (e.g. User) to something (e.g. Org-Team)
|
* **PATCH** endpoints return changed object and status **OK (200)**, used to **edit/change** an existing object
|
||||||
- **PATCH** endpoints return changed object and status **OK (200)**, used to **edit/change** an existing object
|
|
||||||
|
|
||||||
An endpoint which changes/edits an object expects all fields to be optional (except ones to identify the object, which are required).
|
An endpoint which changes/edits an object expects all fields to be optional (except ones to identify the object, which are required).
|
||||||
|
|
||||||
### Endpoints returning lists should
|
### Endpoints returning lists should
|
||||||
|
* support pagination (`page` & `limit` options in query)
|
||||||
|
* set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444))
|
||||||
|
|
||||||
- support pagination (`page` & `limit` options in query)
|
## Large Character Comments
|
||||||
- set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444))
|
|
||||||
|
Throughout the codebase there are large-text comments for sections of code, e.g.:
|
||||||
|
|
||||||
|
```go
|
||||||
|
// __________ .__
|
||||||
|
// \______ \ _______ _|__| ______ _ __
|
||||||
|
// | _// __ \ \/ / |/ __ \ \/ \/ /
|
||||||
|
// | | \ ___/\ /| \ ___/\ /
|
||||||
|
// |____|_ /\___ >\_/ |__|\___ >\/\_/
|
||||||
|
// \/ \/ \/
|
||||||
|
```
|
||||||
|
|
||||||
|
These were created using the `figlet` tool with the `graffiti` font.
|
||||||
|
|
||||||
|
A simple way of creating these is to use the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
figlet -f graffiti Review | sed -e's+^+// +' - | xclip -sel clip -in
|
||||||
|
```
|
||||||
|
|
||||||
## Backports and Frontports
|
## Backports and Frontports
|
||||||
|
|
||||||
|
@ -374,35 +368,35 @@ and lead the development of Gitea.
|
||||||
To honor the past owners, here's the history of the owners and the time
|
To honor the past owners, here's the history of the owners and the time
|
||||||
they served:
|
they served:
|
||||||
|
|
||||||
- 2022-01-01 ~ 2022-12-31 - https://github.com/go-gitea/gitea/issues/17872
|
* 2022-01-01 ~ 2022-12-31 - https://github.com/go-gitea/gitea/issues/17872
|
||||||
- [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
|
* [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
|
||||||
- [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
|
* [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
|
||||||
- [Andrew Thornton](https://gitea.com/zeripath) <art27@cantab.net>
|
* [Andrew Thornton](https://gitea.com/zeripath) <art27@cantab.net>
|
||||||
|
|
||||||
- 2021-01-01 ~ 2021-12-31 - https://github.com/go-gitea/gitea/issues/13801
|
* 2021-01-01 ~ 2021-12-31 - https://github.com/go-gitea/gitea/issues/13801
|
||||||
- [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
|
* [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
|
||||||
- [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <lauris@nix.lv>
|
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <lauris@nix.lv>
|
||||||
- [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
|
* [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
|
||||||
|
|
||||||
- 2020-01-01 ~ 2020-12-31 - https://github.com/go-gitea/gitea/issues/9230
|
* 2020-01-01 ~ 2020-12-31 - https://github.com/go-gitea/gitea/issues/9230
|
||||||
- [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
|
* [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
|
||||||
- [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <lauris@nix.lv>
|
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <lauris@nix.lv>
|
||||||
- [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
|
* [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
|
||||||
|
|
||||||
- 2019-01-01 ~ 2019-12-31 - https://github.com/go-gitea/gitea/issues/5572
|
* 2019-01-01 ~ 2019-12-31 - https://github.com/go-gitea/gitea/issues/5572
|
||||||
- [Lunny Xiao](https://github.com/lunny) <xiaolunwen@gmail.com>
|
* [Lunny Xiao](https://github.com/lunny) <xiaolunwen@gmail.com>
|
||||||
- [Lauris Bukšis-Haberkorns](https://github.com/lafriks) <lauris@nix.lv>
|
* [Lauris Bukšis-Haberkorns](https://github.com/lafriks) <lauris@nix.lv>
|
||||||
- [Matti Ranta](https://github.com/techknowlogick) <techknowlogick@gitea.io>
|
* [Matti Ranta](https://github.com/techknowlogick) <techknowlogick@gitea.io>
|
||||||
|
|
||||||
- 2018-01-01 ~ 2018-12-31 - https://github.com/go-gitea/gitea/issues/3255
|
* 2018-01-01 ~ 2018-12-31 - https://github.com/go-gitea/gitea/issues/3255
|
||||||
- [Lunny Xiao](https://github.com/lunny) <xiaolunwen@gmail.com>
|
* [Lunny Xiao](https://github.com/lunny) <xiaolunwen@gmail.com>
|
||||||
- [Lauris Bukšis-Haberkorns](https://github.com/lafriks) <lauris@nix.lv>
|
* [Lauris Bukšis-Haberkorns](https://github.com/lafriks) <lauris@nix.lv>
|
||||||
- [Kim Carlbäcker](https://github.com/bkcsoft) <kim.carlbacker@gmail.com>
|
* [Kim Carlbäcker](https://github.com/bkcsoft) <kim.carlbacker@gmail.com>
|
||||||
|
|
||||||
- 2016-11-04 ~ 2017-12-31
|
* 2016-11-04 ~ 2017-12-31
|
||||||
- [Lunny Xiao](https://github.com/lunny) <xiaolunwen@gmail.com>
|
* [Lunny Xiao](https://github.com/lunny) <xiaolunwen@gmail.com>
|
||||||
- [Thomas Boerger](https://github.com/tboerger) <thomas@webhippie.de>
|
* [Thomas Boerger](https://github.com/tboerger) <thomas@webhippie.de>
|
||||||
- [Kim Carlbäcker](https://github.com/bkcsoft) <kim.carlbacker@gmail.com>
|
* [Kim Carlbäcker](https://github.com/bkcsoft) <kim.carlbacker@gmail.com>
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
@ -419,20 +413,20 @@ be reviewed by two maintainers and must pass the automatic tests.
|
||||||
|
|
||||||
## Releasing Gitea
|
## Releasing Gitea
|
||||||
|
|
||||||
- Let $vmaj, $vmin and $vpat be Major, Minor and Patch version numbers, $vpat should be rc1, rc2, 0, 1, ...... $vmaj.$vmin will be kept the same as milestones on github or gitea in future.
|
* Let $vmaj, $vmin and $vpat be Major, Minor and Patch version numbers, $vpat should be rc1, rc2, 0, 1, ...... $vmaj.$vmin will be kept the same as milestones on github or gitea in future.
|
||||||
- Before releasing, confirm all the version's milestone issues or PRs has been resolved. Then discuss the release on Discord channel #maintainers and get agreed with almost all the owners and mergers. Or you can declare the version and if nobody against in about serval hours.
|
* Before releasing, confirm all the version's milestone issues or PRs has been resolved. Then discuss the release on Discord channel #maintainers and get agreed with almost all the owners and mergers. Or you can declare the version and if nobody against in about serval hours.
|
||||||
- If this is a big version first you have to create PR for changelog on branch `main` with PRs with label `changelog` and after it has been merged do following steps:
|
* If this is a big version first you have to create PR for changelog on branch `main` with PRs with label `changelog` and after it has been merged do following steps:
|
||||||
- Create `-dev` tag as `git tag -s -F release.notes v$vmaj.$vmin.0-dev` and push the tag as `git push origin v$vmaj.$vmin.0-dev`.
|
* Create `-dev` tag as `git tag -s -F release.notes v$vmaj.$vmin.0-dev` and push the tag as `git push origin v$vmaj.$vmin.0-dev`.
|
||||||
- When CI has finished building tag then you have to create a new branch named `release/v$vmaj.$vmin`
|
* When CI has finished building tag then you have to create a new branch named `release/v$vmaj.$vmin`
|
||||||
- If it is bugfix version create PR for changelog on branch `release/v$vmaj.$vmin` and wait till it is reviewed and merged.
|
* If it is bugfix version create PR for changelog on branch `release/v$vmaj.$vmin` and wait till it is reviewed and merged.
|
||||||
- Add a tag as `git tag -s -F release.notes v$vmaj.$vmin.$`, release.notes file could be a temporary file to only include the changelog this version which you added to `CHANGELOG.md`.
|
* Add a tag as `git tag -s -F release.notes v$vmaj.$vmin.$`, release.notes file could be a temporary file to only include the changelog this version which you added to `CHANGELOG.md`.
|
||||||
- And then push the tag as `git push origin v$vmaj.$vmin.$`. Drone CI will automatically create a release and upload all the compiled binary. (But currently it doesn't add the release notes automatically. Maybe we should fix that.)
|
* And then push the tag as `git push origin v$vmaj.$vmin.$`. Drone CI will automatically create a release and upload all the compiled binary. (But currently it doesn't add the release notes automatically. Maybe we should fix that.)
|
||||||
- If needed send a frontport PR for the changelog to branch `main` and update the version in `docs/config.yaml` to refer to the new version.
|
* If needed send a frontport PR for the changelog to branch `main` and update the version in `docs/config.yaml` to refer to the new version.
|
||||||
- Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release.
|
* Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release.
|
||||||
- Verify all release assets were correctly published through CI on dl.gitea.io and GitHub releases. Once ACKed:
|
* Verify all release assets were correctly published through CI on dl.gitea.io and GitHub releases. Once ACKed:
|
||||||
- bump the version of https://dl.gitea.io/gitea/version.json
|
* bump the version of https://dl.gitea.io/gitea/version.json
|
||||||
- merge the blog post PR
|
* merge the blog post PR
|
||||||
- announce the release in discord `#announcements`
|
* announce the release in discord `#announcements`
|
||||||
|
|
||||||
## Copyright
|
## Copyright
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#Build stage
|
#Build stage
|
||||||
FROM golang:1.19-alpine3.16 AS build-env
|
FROM golang:1.18-alpine3.16 AS build-env
|
||||||
|
|
||||||
ARG GOPROXY
|
ARG GOPROXY
|
||||||
ENV GOPROXY ${GOPROXY:-direct}
|
ENV GOPROXY ${GOPROXY:-direct}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#Build stage
|
#Build stage
|
||||||
FROM golang:1.19-alpine3.16 AS build-env
|
FROM golang:1.18-alpine3.16 AS build-env
|
||||||
|
|
||||||
ARG GOPROXY
|
ARG GOPROXY
|
||||||
ENV GOPROXY ${GOPROXY:-direct}
|
ENV GOPROXY ${GOPROXY:-direct}
|
||||||
|
@ -31,7 +31,6 @@ EXPOSE 2222 3000
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
bash \
|
bash \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
dumb-init \
|
|
||||||
gettext \
|
gettext \
|
||||||
git \
|
git \
|
||||||
curl \
|
curl \
|
||||||
|
@ -63,12 +62,12 @@ ENV GITEA_CUSTOM /var/lib/gitea/custom
|
||||||
ENV GITEA_TEMP /tmp/gitea
|
ENV GITEA_TEMP /tmp/gitea
|
||||||
ENV TMPDIR /tmp/gitea
|
ENV TMPDIR /tmp/gitea
|
||||||
|
|
||||||
#TODO add to docs the ability to define the ini to load (useful to test and revert a config)
|
#TODO add to docs the ability to define the ini to load (usefull to test and revert a config)
|
||||||
ENV GITEA_APP_INI /etc/gitea/app.ini
|
ENV GITEA_APP_INI /etc/gitea/app.ini
|
||||||
ENV HOME "/var/lib/gitea/git"
|
ENV HOME "/var/lib/gitea/git"
|
||||||
VOLUME ["/var/lib/gitea", "/etc/gitea"]
|
VOLUME ["/var/lib/gitea", "/etc/gitea"]
|
||||||
WORKDIR /var/lib/gitea
|
WORKDIR /var/lib/gitea
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/docker-entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||||
CMD []
|
CMD []
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,3 @@ Leon Hofmeister <dev.lh@web.de> (@delvh)
|
||||||
Gusted <williamzijl7@hotmail.com) (@Gusted)
|
Gusted <williamzijl7@hotmail.com) (@Gusted)
|
||||||
silentcode <silentcode@senga.org> (@silentcodeg)
|
silentcode <silentcode@senga.org> (@silentcodeg)
|
||||||
Wim <wim@42.be> (@42wim)
|
Wim <wim@42.be> (@42wim)
|
||||||
xinyu <xinyu@nerv.org.cn> (@penlinux)
|
|
||||||
Jason Song <i@wolfogre.com> (@wolfogre)
|
|
||||||
Yarden Shoham <hrsi88@gmail.com> (@yardenshoham)
|
|
||||||
|
|
319
Makefile
319
Makefile
|
@ -17,25 +17,24 @@ else
|
||||||
DIST := dist
|
DIST := dist
|
||||||
DIST_DIRS := $(DIST)/binaries $(DIST)/release
|
DIST_DIRS := $(DIST)/binaries $(DIST)/release
|
||||||
IMPORT := code.gitea.io/gitea
|
IMPORT := code.gitea.io/gitea
|
||||||
|
export GO111MODULE=on
|
||||||
|
|
||||||
GO ?= go
|
GO ?= go
|
||||||
SHASUM ?= shasum -a 256
|
SHASUM ?= shasum -a 256
|
||||||
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
|
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
|
||||||
COMMA := ,
|
COMMA := ,
|
||||||
|
|
||||||
XGO_VERSION := go-1.19.x
|
XGO_VERSION := go-1.18.x
|
||||||
|
|
||||||
AIR_PACKAGE ?= github.com/cosmtrek/air@v1.40.4
|
AIR_PACKAGE ?= github.com/cosmtrek/air@v1.29.0
|
||||||
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.5.0
|
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.4.0
|
||||||
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.1
|
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.0
|
||||||
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.3.1
|
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.3.1
|
||||||
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0
|
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.0
|
||||||
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10
|
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10
|
||||||
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
|
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
|
||||||
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.0
|
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.29.0
|
||||||
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
||||||
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.3.0
|
|
||||||
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest
|
|
||||||
|
|
||||||
DOCKER_IMAGE ?= gitea/gitea
|
DOCKER_IMAGE ?= gitea/gitea
|
||||||
DOCKER_TAG ?= latest
|
DOCKER_TAG ?= latest
|
||||||
|
@ -100,7 +99,7 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
|
||||||
|
|
||||||
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
|
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
|
||||||
|
|
||||||
GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
|
GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/integrations/migration-test code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/))
|
||||||
|
|
||||||
FOMANTIC_WORK_DIR := web_src/fomantic
|
FOMANTIC_WORK_DIR := web_src/fomantic
|
||||||
|
|
||||||
|
@ -112,39 +111,25 @@ WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack pub
|
||||||
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
|
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
|
||||||
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
|
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
|
||||||
|
|
||||||
GENERATED_GO_DEST := modules/charset/invisible_gen.go modules/charset/ambiguous_gen.go
|
|
||||||
|
|
||||||
SVG_DEST_DIR := public/img/svg
|
SVG_DEST_DIR := public/img/svg
|
||||||
|
|
||||||
AIR_TMP_DIR := .air
|
AIR_TMP_DIR := .air
|
||||||
|
|
||||||
GO_LICENSE_TMP_DIR := .go-licenses
|
|
||||||
GO_LICENSE_FILE := assets/go-licenses.json
|
|
||||||
|
|
||||||
TAGS ?=
|
TAGS ?=
|
||||||
TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS))
|
TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS))
|
||||||
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
|
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
|
||||||
|
|
||||||
TEST_TAGS ?= sqlite sqlite_unlock_notify
|
TEST_TAGS ?= sqlite sqlite_unlock_notify
|
||||||
|
|
||||||
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
|
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR)
|
||||||
|
|
||||||
GO_DIRS := cmd tests models modules routers build services tools
|
GO_DIRS := cmd integrations models modules routers build services tools
|
||||||
WEB_DIRS := web_src/js web_src/less
|
|
||||||
|
|
||||||
GO_SOURCES := $(wildcard *.go)
|
GO_SOURCES := $(wildcard *.go)
|
||||||
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
|
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
|
||||||
GO_SOURCES += $(GENERATED_GO_DEST)
|
|
||||||
GO_SOURCES_NO_BINDATA := $(GO_SOURCES)
|
|
||||||
|
|
||||||
ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
|
ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
|
||||||
GO_SOURCES += $(BINDATA_DEST)
|
GO_SOURCES += $(BINDATA_DEST)
|
||||||
GENERATED_GO_DEST += $(BINDATA_DEST)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Force installation of playwright dependencies by setting this flag
|
|
||||||
ifdef DEPS_PLAYWRIGHT
|
|
||||||
PLAYWRIGHT_FLAGS += --with-deps
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
|
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
|
||||||
|
@ -198,7 +183,6 @@ help:
|
||||||
@echo " - test test everything"
|
@echo " - test test everything"
|
||||||
@echo " - test-frontend test frontend files"
|
@echo " - test-frontend test frontend files"
|
||||||
@echo " - test-backend test backend files"
|
@echo " - test-backend test backend files"
|
||||||
@echo " - test-e2e[\#TestSpecificName] test end to end using playwright"
|
|
||||||
@echo " - webpack build webpack files"
|
@echo " - webpack build webpack files"
|
||||||
@echo " - svg build svg files"
|
@echo " - svg build svg files"
|
||||||
@echo " - fomantic build fomantic files"
|
@echo " - fomantic build fomantic files"
|
||||||
|
@ -210,7 +194,6 @@ help:
|
||||||
@echo " - generate-swagger generate the swagger spec from code comments"
|
@echo " - generate-swagger generate the swagger spec from code comments"
|
||||||
@echo " - swagger-validate check if the swagger spec is valid"
|
@echo " - swagger-validate check if the swagger spec is valid"
|
||||||
@echo " - golangci-lint run golangci-lint linter"
|
@echo " - golangci-lint run golangci-lint linter"
|
||||||
@echo " - go-licenses regenerate go licenses"
|
|
||||||
@echo " - vet examines Go source code and reports suspicious constructs"
|
@echo " - vet examines Go source code and reports suspicious constructs"
|
||||||
@echo " - tidy run go mod tidy"
|
@echo " - tidy run go mod tidy"
|
||||||
@echo " - test[\#TestSpecificName] run unit test"
|
@echo " - test[\#TestSpecificName] run unit test"
|
||||||
|
@ -219,9 +202,9 @@ help:
|
||||||
|
|
||||||
.PHONY: go-check
|
.PHONY: go-check
|
||||||
go-check:
|
go-check:
|
||||||
$(eval MIN_GO_VERSION_STR := $(shell grep -Eo '^go\s+[0-9]+\.[0-9]+' go.mod | cut -d' ' -f2))
|
$(eval MIN_GO_VERSION_STR := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
|
||||||
$(eval MIN_GO_VERSION := $(shell printf "%03d%03d" $(shell echo '$(MIN_GO_VERSION_STR)' | tr '.' ' ')))
|
$(eval MIN_GO_VERSION := $(shell printf "%03d%03d%03d" $(shell echo '$(MIN_GO_VERSION_STR)' | tr '.' ' ')))
|
||||||
$(eval GO_VERSION := $(shell printf "%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9]+' | tr '.' ' ');))
|
$(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9.]+' | tr '.' ' ');))
|
||||||
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
|
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
|
||||||
echo "Gitea requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
|
echo "Gitea requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
|
@ -254,33 +237,14 @@ clean:
|
||||||
$(GO) clean -i ./...
|
$(GO) clean -i ./...
|
||||||
rm -rf $(EXECUTABLE) $(DIST) $(BINDATA_DEST) $(BINDATA_HASH) \
|
rm -rf $(EXECUTABLE) $(DIST) $(BINDATA_DEST) $(BINDATA_HASH) \
|
||||||
integrations*.test \
|
integrations*.test \
|
||||||
e2e*.test \
|
integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-mysql8/ integrations/gitea-integration-sqlite/ \
|
||||||
tests/integration/gitea-integration-pgsql/ tests/integration/gitea-integration-mysql/ tests/integration/gitea-integration-mysql8/ tests/integration/gitea-integration-sqlite/ \
|
integrations/gitea-integration-mssql/ integrations/indexers-mysql/ integrations/indexers-mysql8/ integrations/indexers-pgsql integrations/indexers-sqlite \
|
||||||
tests/integration/gitea-integration-mssql/ tests/integration/indexers-mysql/ tests/integration/indexers-mysql8/ tests/integration/indexers-pgsql tests/integration/indexers-sqlite \
|
integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini man/
|
||||||
tests/integration/indexers-mssql tests/mysql.ini tests/mysql8.ini tests/pgsql.ini tests/mssql.ini man/ \
|
|
||||||
tests/e2e/gitea-e2e-pgsql/ tests/e2e/gitea-e2e-mysql/ tests/e2e/gitea-e2e-mysql8/ tests/e2e/gitea-e2e-sqlite/ \
|
|
||||||
tests/e2e/gitea-e2e-mssql/ tests/e2e/indexers-mysql/ tests/e2e/indexers-mysql8/ tests/e2e/indexers-pgsql/ tests/e2e/indexers-sqlite/ \
|
|
||||||
tests/e2e/indexers-mssql/ tests/e2e/reports/ tests/e2e/test-artifacts/ tests/e2e/test-snapshots/
|
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
|
@echo "Running gitea-fmt (with gofumpt)..."
|
||||||
$(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
|
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
|
||||||
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
|
|
||||||
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)
|
|
||||||
|
|
||||||
.PHONY: fmt-check
|
|
||||||
fmt-check: fmt
|
|
||||||
@diff=$$(git diff $(GO_SOURCES) templates $(WEB_DIRS)); \
|
|
||||||
if [ -n "$$diff" ]; then \
|
|
||||||
echo "Please run 'make fmt' and commit the result:"; \
|
|
||||||
echo "$${diff}"; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
.PHONY: misspell-check
|
|
||||||
misspell-check:
|
|
||||||
go run $(MISSPELL_PACKAGE) -error $(GO_DIRS) $(WEB_DIRS)
|
|
||||||
|
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
vet:
|
vet:
|
||||||
|
@ -298,9 +262,7 @@ TAGS_PREREQ := $(TAGS_EVIDENCE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: generate-swagger
|
.PHONY: generate-swagger
|
||||||
generate-swagger: $(SWAGGER_SPEC)
|
generate-swagger:
|
||||||
|
|
||||||
$(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA)
|
|
||||||
$(GO) run $(SWAGGER_PACKAGE) generate spec -x "$(SWAGGER_EXCLUDE)" -o './$(SWAGGER_SPEC)'
|
$(GO) run $(SWAGGER_PACKAGE) generate spec -x "$(SWAGGER_EXCLUDE)" -o './$(SWAGGER_SPEC)'
|
||||||
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
|
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
|
||||||
$(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)'
|
$(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)'
|
||||||
|
@ -325,6 +287,16 @@ errcheck:
|
||||||
@echo "Running errcheck..."
|
@echo "Running errcheck..."
|
||||||
$(GO) run $(ERRCHECK_PACKAGE) $(GO_PACKAGES)
|
$(GO) run $(ERRCHECK_PACKAGE) $(GO_PACKAGES)
|
||||||
|
|
||||||
|
.PHONY: fmt-check
|
||||||
|
fmt-check:
|
||||||
|
# get all go files and run gitea-fmt (with gofmt) on them
|
||||||
|
@diff=$$(MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -l '{file-list}'); \
|
||||||
|
if [ -n "$$diff" ]; then \
|
||||||
|
echo "Please run 'make fmt' and commit the result:"; \
|
||||||
|
echo "$${diff}"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
.PHONY: checks
|
.PHONY: checks
|
||||||
checks: checks-frontend checks-backend
|
checks: checks-frontend checks-backend
|
||||||
|
|
||||||
|
@ -332,17 +304,15 @@ checks: checks-frontend checks-backend
|
||||||
checks-frontend: lockfile-check svg-check
|
checks-frontend: lockfile-check svg-check
|
||||||
|
|
||||||
.PHONY: checks-backend
|
.PHONY: checks-backend
|
||||||
checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-validate
|
checks-backend: gomod-check swagger-check swagger-validate
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: lint-frontend lint-backend
|
lint: lint-frontend lint-backend
|
||||||
|
|
||||||
.PHONY: lint-frontend
|
.PHONY: lint-frontend
|
||||||
lint-frontend: node_modules
|
lint-frontend: node_modules
|
||||||
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e
|
npx eslint --color --max-warnings=0 web_src/js build templates *.config.js docs/assets/js
|
||||||
npx stylelint --color --max-warnings=0 web_src/less
|
npx stylelint --color --max-warnings=0 web_src/less
|
||||||
npx spectral lint -q -F hint $(SWAGGER_SPEC)
|
|
||||||
npx markdownlint docs *.md
|
|
||||||
|
|
||||||
.PHONY: lint-backend
|
.PHONY: lint-backend
|
||||||
lint-backend: golangci-lint vet editorconfig-checker
|
lint-backend: golangci-lint vet editorconfig-checker
|
||||||
|
@ -358,7 +328,7 @@ watch-frontend: node-check node_modules
|
||||||
|
|
||||||
.PHONY: watch-backend
|
.PHONY: watch-backend
|
||||||
watch-backend: go-check
|
watch-backend: go-check
|
||||||
GITEA_RUN_MODE=dev $(GO) run $(AIR_PACKAGE) -c .air.toml
|
$(GO) run $(AIR_PACKAGE) -c .air.toml
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: test-frontend test-backend
|
test: test-frontend test-backend
|
||||||
|
@ -370,7 +340,7 @@ test-backend:
|
||||||
|
|
||||||
.PHONY: test-frontend
|
.PHONY: test-frontend
|
||||||
test-frontend: node_modules
|
test-frontend: node_modules
|
||||||
npx vitest
|
@NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color
|
||||||
|
|
||||||
.PHONY: test-check
|
.PHONY: test-check
|
||||||
test-check:
|
test-check:
|
||||||
|
@ -393,7 +363,7 @@ test\#%:
|
||||||
coverage:
|
coverage:
|
||||||
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
|
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
|
||||||
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out
|
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out
|
||||||
$(GO) run build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all
|
GO111MODULE=on $(GO) run build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo "gocovmerge failed"; echo "integration.coverage.out"; cat integration.coverage.out; echo "coverage.out"; cat coverage.out; exit 1)
|
||||||
|
|
||||||
.PHONY: unit-test-coverage
|
.PHONY: unit-test-coverage
|
||||||
unit-test-coverage:
|
unit-test-coverage:
|
||||||
|
@ -404,51 +374,40 @@ unit-test-coverage:
|
||||||
tidy:
|
tidy:
|
||||||
$(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
|
$(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
|
||||||
$(GO) mod tidy -compat=$(MIN_GO_VERSION)
|
$(GO) mod tidy -compat=$(MIN_GO_VERSION)
|
||||||
@$(MAKE) --no-print-directory $(GO_LICENSE_FILE)
|
|
||||||
|
|
||||||
vendor: go.mod go.sum
|
.PHONY: vendor
|
||||||
|
vendor: tidy
|
||||||
$(GO) mod vendor
|
$(GO) mod vendor
|
||||||
@touch vendor
|
|
||||||
|
|
||||||
.PHONY: tidy-check
|
.PHONY: gomod-check
|
||||||
tidy-check: tidy
|
gomod-check: tidy
|
||||||
@diff=$$(git diff go.mod go.sum $(GO_LICENSE_FILE)); \
|
@diff=$$(git diff go.sum); \
|
||||||
if [ -n "$$diff" ]; then \
|
if [ -n "$$diff" ]; then \
|
||||||
echo "Please run 'make tidy' and commit the result:"; \
|
echo "Please run 'make tidy' and commit the result:"; \
|
||||||
echo "$${diff}"; \
|
echo "$${diff}"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: go-licenses
|
|
||||||
go-licenses: $(GO_LICENSE_FILE)
|
|
||||||
|
|
||||||
$(GO_LICENSE_FILE): go.mod go.sum
|
|
||||||
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
|
|
||||||
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
|
|
||||||
@rm -rf $(GO_LICENSE_TMP_DIR)
|
|
||||||
|
|
||||||
generate-ini-sqlite:
|
generate-ini-sqlite:
|
||||||
sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
||||||
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
integrations/sqlite.ini.tmpl > integrations/sqlite.ini
|
||||||
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
||||||
tests/sqlite.ini.tmpl > tests/sqlite.ini
|
|
||||||
|
|
||||||
.PHONY: test-sqlite
|
.PHONY: test-sqlite
|
||||||
test-sqlite: integrations.sqlite.test generate-ini-sqlite
|
test-sqlite: integrations.sqlite.test generate-ini-sqlite
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test
|
||||||
|
|
||||||
.PHONY: test-sqlite\#%
|
.PHONY: test-sqlite\#%
|
||||||
test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite
|
test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
|
||||||
|
|
||||||
.PHONY: test-sqlite-migration
|
.PHONY: test-sqlite-migration
|
||||||
test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
|
test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.sqlite.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.sqlite.test
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.individual.sqlite.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.individual.sqlite.test
|
||||||
|
|
||||||
.PHONY: test-sqlite-migration\#%
|
.PHONY: test-sqlite-migration\#%
|
||||||
test-sqlite-migration\#%: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
|
test-sqlite-migration\#%: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.individual.sqlite.test -test.run $(subst .,/,$*)
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.individual.sqlite.test -test.run $(subst .,/,$*)
|
||||||
|
|
||||||
|
|
||||||
generate-ini-mysql:
|
generate-ini-mysql:
|
||||||
|
@ -457,22 +416,20 @@ generate-ini-mysql:
|
||||||
-e 's|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
|
-e 's|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
|
||||||
-e 's|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
|
-e 's|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
|
||||||
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
||||||
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
integrations/mysql.ini.tmpl > integrations/mysql.ini
|
||||||
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
||||||
tests/mysql.ini.tmpl > tests/mysql.ini
|
|
||||||
|
|
||||||
.PHONY: test-mysql
|
.PHONY: test-mysql
|
||||||
test-mysql: integrations.mysql.test generate-ini-mysql
|
test-mysql: integrations.mysql.test generate-ini-mysql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test
|
||||||
|
|
||||||
.PHONY: test-mysql\#%
|
.PHONY: test-mysql\#%
|
||||||
test-mysql\#%: integrations.mysql.test generate-ini-mysql
|
test-mysql\#%: integrations.mysql.test generate-ini-mysql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
|
||||||
|
|
||||||
.PHONY: test-mysql-migration
|
.PHONY: test-mysql-migration
|
||||||
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test generate-ini-mysql
|
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test generate-ini-mysql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.mysql.test
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.individual.mysql.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.individual.mysql.test
|
||||||
|
|
||||||
generate-ini-mysql8:
|
generate-ini-mysql8:
|
||||||
sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
|
sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
|
||||||
|
@ -480,22 +437,20 @@ generate-ini-mysql8:
|
||||||
-e 's|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
|
-e 's|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
|
||||||
-e 's|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
|
-e 's|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
|
||||||
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
||||||
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
integrations/mysql8.ini.tmpl > integrations/mysql8.ini
|
||||||
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
||||||
tests/mysql8.ini.tmpl > tests/mysql8.ini
|
|
||||||
|
|
||||||
.PHONY: test-mysql8
|
.PHONY: test-mysql8
|
||||||
test-mysql8: integrations.mysql8.test generate-ini-mysql8
|
test-mysql8: integrations.mysql8.test generate-ini-mysql8
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test
|
||||||
|
|
||||||
.PHONY: test-mysql8\#%
|
.PHONY: test-mysql8\#%
|
||||||
test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8
|
test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*)
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*)
|
||||||
|
|
||||||
.PHONY: test-mysql8-migration
|
.PHONY: test-mysql8-migration
|
||||||
test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test generate-ini-mysql8
|
test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test generate-ini-mysql8
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.mysql8.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.mysql8.test
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.individual.mysql8.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.individual.mysql8.test
|
||||||
|
|
||||||
generate-ini-pgsql:
|
generate-ini-pgsql:
|
||||||
sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
|
sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
|
||||||
|
@ -504,22 +459,20 @@ generate-ini-pgsql:
|
||||||
-e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
|
-e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
|
||||||
-e 's|{{TEST_PGSQL_SCHEMA}}|${TEST_PGSQL_SCHEMA}|g' \
|
-e 's|{{TEST_PGSQL_SCHEMA}}|${TEST_PGSQL_SCHEMA}|g' \
|
||||||
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
||||||
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
integrations/pgsql.ini.tmpl > integrations/pgsql.ini
|
||||||
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
||||||
tests/pgsql.ini.tmpl > tests/pgsql.ini
|
|
||||||
|
|
||||||
.PHONY: test-pgsql
|
.PHONY: test-pgsql
|
||||||
test-pgsql: integrations.pgsql.test generate-ini-pgsql
|
test-pgsql: integrations.pgsql.test generate-ini-pgsql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test
|
||||||
|
|
||||||
.PHONY: test-pgsql\#%
|
.PHONY: test-pgsql\#%
|
||||||
test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
|
test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
|
||||||
|
|
||||||
.PHONY: test-pgsql-migration
|
.PHONY: test-pgsql-migration
|
||||||
test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test generate-ini-pgsql
|
test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test generate-ini-pgsql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.pgsql.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.pgsql.test
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.individual.pgsql.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.individual.pgsql.test
|
||||||
|
|
||||||
generate-ini-mssql:
|
generate-ini-mssql:
|
||||||
sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
|
sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
|
||||||
|
@ -527,140 +480,85 @@ generate-ini-mssql:
|
||||||
-e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
|
-e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
|
||||||
-e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
|
-e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
|
||||||
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
||||||
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
integrations/mssql.ini.tmpl > integrations/mssql.ini
|
||||||
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
||||||
tests/mssql.ini.tmpl > tests/mssql.ini
|
|
||||||
|
|
||||||
.PHONY: test-mssql
|
.PHONY: test-mssql
|
||||||
test-mssql: integrations.mssql.test generate-ini-mssql
|
test-mssql: integrations.mssql.test generate-ini-mssql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test
|
||||||
|
|
||||||
.PHONY: test-mssql\#%
|
.PHONY: test-mssql\#%
|
||||||
test-mssql\#%: integrations.mssql.test generate-ini-mssql
|
test-mssql\#%: integrations.mssql.test generate-ini-mssql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
|
||||||
|
|
||||||
.PHONY: test-mssql-migration
|
.PHONY: test-mssql-migration
|
||||||
test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test generate-ini-mssql
|
test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test generate-ini-mssql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.mssql.test -test.failfast
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.mssql.test -test.failfast
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.individual.mssql.test -test.failfast
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.individual.mssql.test -test.failfast
|
||||||
|
|
||||||
.PHONY: playwright
|
|
||||||
playwright: $(PLAYWRIGHT_DIR)
|
|
||||||
npm install --no-save @playwright/test
|
|
||||||
npx playwright install $(PLAYWRIGHT_FLAGS)
|
|
||||||
|
|
||||||
.PHONY: test-e2e%
|
|
||||||
test-e2e%: TEST_TYPE ?= e2e
|
|
||||||
# Clear display env variable. Otherwise, chromium tests can fail.
|
|
||||||
DISPLAY=
|
|
||||||
|
|
||||||
.PHONY: test-e2e
|
|
||||||
test-e2e: test-e2e-sqlite
|
|
||||||
|
|
||||||
.PHONY: test-e2e-sqlite
|
|
||||||
test-e2e-sqlite: playwright e2e.sqlite.test generate-ini-sqlite
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test
|
|
||||||
|
|
||||||
.PHONY: test-e2e-sqlite\#%
|
|
||||||
test-e2e-sqlite\#%: playwright e2e.sqlite.test generate-ini-sqlite
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$*
|
|
||||||
|
|
||||||
.PHONY: test-e2e-mysql
|
|
||||||
test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test
|
|
||||||
|
|
||||||
.PHONY: test-e2e-mysql\#%
|
|
||||||
test-e2e-mysql\#%: playwright e2e.mysql.test generate-ini-mysql
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
|
|
||||||
|
|
||||||
.PHONY: test-e2e-mysql8
|
|
||||||
test-e2e-mysql8: playwright e2e.mysql8.test generate-ini-mysql8
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test
|
|
||||||
|
|
||||||
.PHONY: test-e2e-mysql8\#%
|
|
||||||
test-e2e-mysql8\#%: playwright e2e.mysql8.test generate-ini-mysql8
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test -test.run TestE2e/$*
|
|
||||||
|
|
||||||
.PHONY: test-e2e-pgsql
|
|
||||||
test-e2e-pgsql: playwright e2e.pgsql.test generate-ini-pgsql
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test
|
|
||||||
|
|
||||||
.PHONY: test-e2e-pgsql\#%
|
|
||||||
test-e2e-pgsql\#%: playwright e2e.pgsql.test generate-ini-pgsql
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e/$*
|
|
||||||
|
|
||||||
.PHONY: test-e2e-mssql
|
|
||||||
test-e2e-mssql: playwright e2e.mssql.test generate-ini-mssql
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test
|
|
||||||
|
|
||||||
.PHONY: test-e2e-mssql\#%
|
|
||||||
test-e2e-mssql\#%: playwright e2e.mssql.test generate-ini-mssql
|
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test -test.run TestE2e/$*
|
|
||||||
|
|
||||||
.PHONY: bench-sqlite
|
.PHONY: bench-sqlite
|
||||||
bench-sqlite: integrations.sqlite.test generate-ini-sqlite
|
bench-sqlite: integrations.sqlite.test generate-ini-sqlite
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
||||||
|
|
||||||
.PHONY: bench-mysql
|
.PHONY: bench-mysql
|
||||||
bench-mysql: integrations.mysql.test generate-ini-mysql
|
bench-mysql: integrations.mysql.test generate-ini-mysql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
||||||
|
|
||||||
.PHONY: bench-mssql
|
.PHONY: bench-mssql
|
||||||
bench-mssql: integrations.mssql.test generate-ini-mssql
|
bench-mssql: integrations.mssql.test generate-ini-mssql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
||||||
|
|
||||||
.PHONY: bench-pgsql
|
.PHONY: bench-pgsql
|
||||||
bench-pgsql: integrations.pgsql.test generate-ini-pgsql
|
bench-pgsql: integrations.pgsql.test generate-ini-pgsql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
||||||
|
|
||||||
.PHONY: integration-test-coverage
|
.PHONY: integration-test-coverage
|
||||||
integration-test-coverage: integrations.cover.test generate-ini-mysql
|
integration-test-coverage: integrations.cover.test generate-ini-mysql
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
|
||||||
|
|
||||||
.PHONY: integration-test-coverage-sqlite
|
.PHONY: integration-test-coverage-sqlite
|
||||||
integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sqlite
|
integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sqlite
|
||||||
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
|
||||||
|
|
||||||
integrations.mysql.test: git-check $(GO_SOURCES)
|
integrations.mysql.test: git-check $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mysql.test
|
||||||
|
|
||||||
integrations.mysql8.test: git-check $(GO_SOURCES)
|
integrations.mysql8.test: git-check $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql8.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
|
||||||
|
|
||||||
integrations.pgsql.test: git-check $(GO_SOURCES)
|
integrations.pgsql.test: git-check $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
|
||||||
|
|
||||||
integrations.mssql.test: git-check $(GO_SOURCES)
|
integrations.mssql.test: git-check $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mssql.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mssql.test
|
||||||
|
|
||||||
integrations.sqlite.test: git-check $(GO_SOURCES)
|
integrations.sqlite.test: git-check $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)'
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags '$(TEST_TAGS)'
|
||||||
|
|
||||||
integrations.cover.test: git-check $(GO_SOURCES)
|
integrations.cover.test: git-check $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test
|
||||||
|
|
||||||
integrations.cover.sqlite.test: git-check $(GO_SOURCES)
|
integrations.cover.sqlite.test: git-check $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
|
||||||
|
|
||||||
.PHONY: migrations.mysql.test
|
.PHONY: migrations.mysql.test
|
||||||
migrations.mysql.test: $(GO_SOURCES)
|
migrations.mysql.test: $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql.test
|
||||||
|
|
||||||
.PHONY: migrations.mysql8.test
|
.PHONY: migrations.mysql8.test
|
||||||
migrations.mysql8.test: $(GO_SOURCES)
|
migrations.mysql8.test: $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql8.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql8.test
|
||||||
|
|
||||||
.PHONY: migrations.pgsql.test
|
.PHONY: migrations.pgsql.test
|
||||||
migrations.pgsql.test: $(GO_SOURCES)
|
migrations.pgsql.test: $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.pgsql.test
|
||||||
|
|
||||||
.PHONY: migrations.mssql.test
|
.PHONY: migrations.mssql.test
|
||||||
migrations.mssql.test: $(GO_SOURCES)
|
migrations.mssql.test: $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mssql.test
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mssql.test
|
||||||
|
|
||||||
.PHONY: migrations.sqlite.test
|
.PHONY: migrations.sqlite.test
|
||||||
migrations.sqlite.test: $(GO_SOURCES)
|
migrations.sqlite.test: $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
|
||||||
|
|
||||||
.PHONY: migrations.individual.mysql.test
|
.PHONY: migrations.individual.mysql.test
|
||||||
migrations.individual.mysql.test: $(GO_SOURCES)
|
migrations.individual.mysql.test: $(GO_SOURCES)
|
||||||
|
@ -682,21 +580,6 @@ migrations.individual.mssql.test: $(GO_SOURCES)
|
||||||
migrations.individual.sqlite.test: $(GO_SOURCES)
|
migrations.individual.sqlite.test: $(GO_SOURCES)
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags '$(TEST_TAGS)'
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags '$(TEST_TAGS)'
|
||||||
|
|
||||||
e2e.mysql.test: $(GO_SOURCES)
|
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
|
|
||||||
|
|
||||||
e2e.mysql8.test: $(GO_SOURCES)
|
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql8.test
|
|
||||||
|
|
||||||
e2e.pgsql.test: $(GO_SOURCES)
|
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
|
|
||||||
|
|
||||||
e2e.mssql.test: $(GO_SOURCES)
|
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mssql.test
|
|
||||||
|
|
||||||
e2e.sqlite.test: $(GO_SOURCES)
|
|
||||||
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags '$(TEST_TAGS)'
|
|
||||||
|
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check: test
|
check: test
|
||||||
|
|
||||||
|
@ -711,38 +594,27 @@ build: frontend backend
|
||||||
frontend: $(WEBPACK_DEST)
|
frontend: $(WEBPACK_DEST)
|
||||||
|
|
||||||
.PHONY: backend
|
.PHONY: backend
|
||||||
backend: go-check generate-backend $(EXECUTABLE)
|
backend: go-check generate $(EXECUTABLE)
|
||||||
|
|
||||||
# We generate the backend before the frontend in case we in future we want to generate things in the frontend from generated files in backend
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate: generate-backend
|
generate: $(TAGS_PREREQ)
|
||||||
|
|
||||||
.PHONY: generate-backend
|
|
||||||
generate-backend: $(TAGS_PREREQ) generate-go
|
|
||||||
|
|
||||||
.PHONY: generate-go
|
|
||||||
generate-go: $(TAGS_PREREQ)
|
|
||||||
@echo "Running go generate..."
|
@echo "Running go generate..."
|
||||||
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)
|
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)
|
||||||
|
|
||||||
.PHONY: security-check
|
|
||||||
security-check:
|
|
||||||
govulncheck -v ./...
|
|
||||||
|
|
||||||
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
|
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
|
||||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-docs release-check
|
release: frontend generate release-windows release-linux release-darwin release-copy release-compress vendor release-sources release-docs release-check
|
||||||
|
|
||||||
$(DIST_DIRS):
|
$(DIST_DIRS):
|
||||||
mkdir -p $(DIST_DIRS)
|
mkdir -p $(DIST_DIRS)
|
||||||
|
|
||||||
.PHONY: release-windows
|
.PHONY: release-windows
|
||||||
release-windows: | $(DIST_DIRS)
|
release-windows: | $(DIST_DIRS)
|
||||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
|
||||||
ifeq (,$(findstring gogit,$(TAGS)))
|
ifeq (,$(findstring gogit,$(TAGS)))
|
||||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
|
||||||
endif
|
endif
|
||||||
ifeq ($(CI),true)
|
ifeq ($(CI),true)
|
||||||
cp /build/* $(DIST)/binaries
|
cp /build/* $(DIST)/binaries
|
||||||
|
@ -762,13 +634,6 @@ ifeq ($(CI),true)
|
||||||
cp /build/* $(DIST)/binaries
|
cp /build/* $(DIST)/binaries
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: release-freebsd
|
|
||||||
release-freebsd: | $(DIST_DIRS)
|
|
||||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) .
|
|
||||||
ifeq ($(CI),true)
|
|
||||||
cp /build/* $(DIST)/binaries
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: release-copy
|
.PHONY: release-copy
|
||||||
release-copy: | $(DIST_DIRS)
|
release-copy: | $(DIST_DIRS)
|
||||||
cd $(DIST); for file in `find . -type f -name "*"`; do cp $${file} ./release/; done;
|
cd $(DIST); for file in `find . -type f -name "*"`; do cp $${file} ./release/; done;
|
||||||
|
@ -820,8 +685,6 @@ deps-backend:
|
||||||
$(GO) install $(MISSPELL_PACKAGE)
|
$(GO) install $(MISSPELL_PACKAGE)
|
||||||
$(GO) install $(SWAGGER_PACKAGE)
|
$(GO) install $(SWAGGER_PACKAGE)
|
||||||
$(GO) install $(XGO_PACKAGE)
|
$(GO) install $(XGO_PACKAGE)
|
||||||
$(GO) install $(GO_LICENSES_PACKAGE)
|
|
||||||
$(GO) install $(GOVULNCHECK_PACKAGE)
|
|
||||||
|
|
||||||
node_modules: package-lock.json
|
node_modules: package-lock.json
|
||||||
npm install --no-save
|
npm install --no-save
|
||||||
|
@ -891,11 +754,11 @@ update-translations:
|
||||||
|
|
||||||
.PHONY: generate-license
|
.PHONY: generate-license
|
||||||
generate-license:
|
generate-license:
|
||||||
$(GO) run build/generate-licenses.go
|
GO111MODULE=on $(GO) run build/generate-licenses.go
|
||||||
|
|
||||||
.PHONY: generate-gitignore
|
.PHONY: generate-gitignore
|
||||||
generate-gitignore:
|
generate-gitignore:
|
||||||
$(GO) run build/generate-gitignores.go
|
GO111MODULE=on $(GO) run build/generate-gitignores.go
|
||||||
|
|
||||||
.PHONY: generate-images
|
.PHONY: generate-images
|
||||||
generate-images: | node_modules
|
generate-images: | node_modules
|
||||||
|
@ -908,7 +771,7 @@ generate-manpage:
|
||||||
@mkdir -p man/man1/ man/man5
|
@mkdir -p man/man1/ man/man5
|
||||||
@./gitea docs --man > man/man1/gitea.1
|
@./gitea docs --man > man/man1/gitea.1
|
||||||
@gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
|
@gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
|
||||||
@#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page
|
@#TODO A smal script witch format config-cheat-sheet.en-us.md nicely to suit as config man page
|
||||||
|
|
||||||
.PHONY: pr\#%
|
.PHONY: pr\#%
|
||||||
pr\#%: clean-all
|
pr\#%: clean-all
|
||||||
|
|
34
README.md
34
README.md
|
@ -33,12 +33,6 @@
|
||||||
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
|
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
|
||||||
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
|
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://gitpod.io/#https://github.com/go-gitea/gitea">
|
|
||||||
<img
|
|
||||||
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
|
|
||||||
alt="Contribute with Gitpod"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
<a href="https://crowdin.com/project/gitea" title="Crowdin">
|
<a href="https://crowdin.com/project/gitea" title="Crowdin">
|
||||||
<img src="https://badges.crowdin.net/gitea/localized.svg">
|
<img src="https://badges.crowdin.net/gitea/localized.svg">
|
||||||
</a>
|
</a>
|
||||||
|
@ -51,21 +45,21 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="README_ZH.md">View this document in Chinese</a>
|
<a href="README_ZH.md">View the chinese version of this document</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
The goal of this project is to make the easiest, fastest, and most
|
The goal of this project is to make the easiest, fastest, and most
|
||||||
painless way of setting up a self-hosted Git service.
|
painless way of setting up a self-hosted Git service.
|
||||||
|
Using Go, this can be done with an independent binary distribution across
|
||||||
As Gitea is written in Go, it works across **all** the platforms and
|
**all platforms** which Go supports, including Linux, macOS, and Windows
|
||||||
architectures that are supported by Go, including Linux, macOS, and
|
on x86, amd64, ARM and PowerPC architectures.
|
||||||
Windows on x86, amd64, ARM and PowerPC architectures.
|
Want to try it before doing anything else?
|
||||||
You can try it out using [the online demo](https://try.gitea.io/).
|
Do it [with the online demo](https://try.gitea.io/)!
|
||||||
This project has been
|
This project has been
|
||||||
[forked](https://blog.gitea.io/2016/12/welcome-to-gitea/) from
|
[forked](https://blog.gitea.io/2016/12/welcome-to-gitea/) from
|
||||||
[Gogs](https://gogs.io) since November of 2016, but a lot has changed.
|
[Gogs](https://gogs.io) since 2016.11 but changed a lot.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
@ -108,7 +102,7 @@ NOTES:
|
||||||
|
|
||||||
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
|
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
|
||||||
|
|
||||||
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up.
|
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope fo fill it as questions pop up.
|
||||||
|
|
||||||
https://docs.gitea.io/en-us/translation-guidelines/
|
https://docs.gitea.io/en-us/translation-guidelines/
|
||||||
|
|
||||||
|
@ -120,16 +114,14 @@ For more information and instructions about how to install Gitea, please look at
|
||||||
If you have questions that are not covered by the documentation, you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://discourse.gitea.io/).
|
If you have questions that are not covered by the documentation, you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://discourse.gitea.io/).
|
||||||
|
|
||||||
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
|
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
|
||||||
|
The hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
|
||||||
The Hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
|
|
||||||
|
|
||||||
The official Gitea CLI is developed at [gitea/tea](https://gitea.com/gitea/tea).
|
The official Gitea CLI is developed at [gitea/tea](https://gitea.com/gitea/tea).
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
- [Maintainers](https://github.com/orgs/go-gitea/people)
|
* [Maintainers](https://github.com/orgs/go-gitea/people)
|
||||||
- [Contributors](https://github.com/go-gitea/gitea/graphs/contributors)
|
* [Contributors](https://github.com/go-gitea/gitea/graphs/contributors)
|
||||||
- [Translators](options/locale/TRANSLATORS)
|
* [Translators](options/locale/TRANSLATORS)
|
||||||
|
|
||||||
## Backers
|
## Backers
|
||||||
|
|
||||||
|
@ -151,7 +143,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
||||||
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
|
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
|
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
|
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
|
||||||
<a href="https://cynkra.com/" target="_blank"><img src="https://images.opencollective.com/cynkra/logo/square/64/192.png"></a>
|
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
|
@ -170,7 +161,6 @@ See the [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) file
|
||||||
for the full license text.
|
for the full license text.
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
Looking for an overview of the interface? Check it out!
|
Looking for an overview of the interface? Check it out!
|
||||||
|
|
||||||
|![Dashboard](https://dl.gitea.io/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.io/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.io/screenshots/global_issues.png)|
|
|![Dashboard](https://dl.gitea.io/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.io/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.io/screenshots/global_issues.png)|
|
||||||
|
|
|
@ -33,12 +33,6 @@
|
||||||
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
|
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
|
||||||
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
|
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://gitpod.io/#https://github.com/go-gitea/gitea">
|
|
||||||
<img
|
|
||||||
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
|
|
||||||
alt="Contribute with Gitpod"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
<a href="https://crowdin.com/project/gitea" title="Crowdin">
|
<a href="https://crowdin.com/project/gitea" title="Crowdin">
|
||||||
<img src="https://badges.crowdin.net/gitea/localized.svg">
|
<img src="https://badges.crowdin.net/gitea/localized.svg">
|
||||||
</a>
|
</a>
|
||||||
|
@ -51,7 +45,7 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="README.md">View this document in English</a>
|
<a href="README.md">View the english version of this document</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## 目标
|
## 目标
|
||||||
|
|
75
SECURITY.md
75
SECURITY.md
|
@ -1,83 +1,10 @@
|
||||||
# Reporting security issues
|
# Reporting security issues
|
||||||
|
|
||||||
The Gitea maintainers take security seriously.
|
The Gitea maintainers take security seriously.
|
||||||
|
|
||||||
If you discover a security issue, please bring it to their attention right away!
|
If you discover a security issue, please bring it to their attention right away!
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
### Reporting a Vulnerability
|
||||||
|
|
||||||
Please **DO NOT** file a public issue, instead send your report privately to `security@gitea.io`.
|
Please **DO NOT** file a public issue, instead send your report privately to `security@gitea.io`.
|
||||||
|
|
||||||
## Protecting Security Information
|
|
||||||
|
|
||||||
Due to the sensitive nature of security information, you can use below GPG public key encrypt your mail body.
|
|
||||||
|
|
||||||
The PGP key is valid until June 24, 2024.
|
|
||||||
|
|
||||||
```
|
|
||||||
Key ID: 6FCD2D5B
|
|
||||||
Key Type: RSA
|
|
||||||
Expires: 6/24/2024
|
|
||||||
Key Size: 4096/4096
|
|
||||||
Fingerprint: 3DE0 3D1E 144A 7F06 9359 99DC AAFD 2381 6FCD 2D5B
|
|
||||||
```
|
|
||||||
|
|
||||||
UserID: Gitea Security <security@gitea.io>
|
|
||||||
|
|
||||||
```
|
|
||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
|
|
||||||
mQINBGK1Z/4BEADFMqXA9DeeChmSxUjF0Be5sq99ZUhgrZjcN/wOzz0wuCJZC0l8
|
|
||||||
4uC+d6mfv7JpJYlzYzOK97/x5UguKHkYNZ6mm1G9KHaXmoIBDLKDzfPdJopVNv2r
|
|
||||||
OajijaE0uMCnMjadlg5pbhMLRQG8a9J32yyaz7ZEAw72Ab31fvvcA53NkuqO4j2w
|
|
||||||
k7dtFQzhbNOYV0VffQT90WDZdalYHB1JHyEQ+70U9OjVD5ggNYSzX98Eu3Hjn7V7
|
|
||||||
kqFrcAxr5TE1elf0IXJcuBJtFzQSTUGlQldKOHtGTGgGjj9r/FFAE5ioBgVD05bV
|
|
||||||
rEEgIMM/GqYaG/nbNpWE6P3mEc2Mnn3pZaRJL0LuF26TLjnqEcMMDp5iIhLdFzXR
|
|
||||||
3tMdtKgQFu+Mtzs3ipwWARYgHyU09RJsI2HeBx7RmZO/Xqrec763Z7zdJ7SpCn0Z
|
|
||||||
q+pHZl24JYR0Kf3T/ZiOC0cGd2QJqpJtg5J6S/OqfX9NH6MsCczO8pUC1N/aHH2X
|
|
||||||
CTme2nF56izORqDWKoiICteL3GpYsCV9nyCidcCmoQsS+DKvE86YhIhVIVWGRY2F
|
|
||||||
lzpAjnN9/KLtQroutrm+Ft0mdjDiJUeFVl1cOHDhoyfCsQh62HumoyZoZvqzQd6e
|
|
||||||
AbN11nq6aViMe2Q3je1AbiBnRnQSHxt1Tc8X4IshO3MQK1Sk7oPI6LA5oQARAQAB
|
|
||||||
tCJHaXRlYSBTZWN1cml0eSA8c2VjdXJpdHlAZ2l0ZWEuaW8+iQJXBBMBCABBFiEE
|
|
||||||
PeA9HhRKfwaTWZncqv0jgW/NLVsFAmK1Z/4CGwMFCQPCZwAFCwkIBwICIgIGFQoJ
|
|
||||||
CAsCBBYCAwECHgcCF4AACgkQqv0jgW/NLVvnyxAAhxyNnWzw/rQO2qhzqicmZM94
|
|
||||||
njSbOg+U2qMBvCdaqCQQeC+uaMmMzkDPanUUmLcyCkWqfCjPNjeSXAkE9npepVJI
|
|
||||||
4HtmgxZQ94OU/h3CLbft+9GVRzUkVI29TSYGdvNtV2/BkNGoFFnKWQr119um0o6A
|
|
||||||
bgha2Uy5uY8o3ZIoiKkiHRaEoWIjjeBxJxYAojsZY4YElUmsQ3ik2joG6rhFesTa
|
|
||||||
ofVt/bL8G2xzpOG26WGIxBbqf2qjV6OtZ0hu/vtTPHeIWMLq0Mz0V3PEDQWfkGPE
|
|
||||||
i2RYxxYDs2xzJhSQWqTNVLSq0m5xTJnbHhQPfdCX4C2jvFKgLdfmytQq49S7jiJb
|
|
||||||
Z03HVOZ/PsyBlQfH9xJi06R5yQCMEA8h8Z5r3/NXW09kQ6OFRe6xshoTcxZGRPTo
|
|
||||||
srhwr3uPbmCRh+YEl7qBLU6+BC5k8IRTZXqhrj/aPJu3MxgbgwV8u3vLoFSXM2lb
|
|
||||||
a61FgeCQ0O7lkgVswwF0RppCaH9Ul3ZDapet/vCRg4NVwm9zOI/8q/Vj0FKA1GDR
|
|
||||||
JhRu8+Ce8zlFL65D34t+PprAzSeTlbv9um3x/ZIjCco7EEKSBylt+AZj/VyA6+e5
|
|
||||||
kjOQwRRc6dFJWBcorsSI2dG+H+QMF7ZabzmeCcz1v9HjLOPzYHoZAHhCmSppWTvX
|
|
||||||
AJy6+lhfW2OUTqQeYSi5Ag0EYrVn/gEQALrFLQjCR3GjuHSindz0rd3Fnx/t7Sen
|
|
||||||
T+p07yCSSoSlmnJHCQmwh4vfg1blyz0zZ4vkIhtpHsEgc+ZAG+WQXSsJ2iRz+eSN
|
|
||||||
GwoOQl4XC3n+QWkc1ws+btr48+6UqXIQU+F8TPQyx/PIgi2nZXJB7f5+mjCqsk46
|
|
||||||
XvH4nTr4kJjuqMSR/++wvre2qNQRa/q/dTsK0OaN/mJsdX6Oi+aGNaQJUhIG7F+E
|
|
||||||
ZDMkn/O6xnwWNzy/+bpg43qH/Gk0eakOmz5NmQLRkV58SZLiJvuCUtkttf6CyhnX
|
|
||||||
03OcWaajv5W8qA39dBYQgDrrPbBWUnwfO3yMveqhwV4JjDoe8sPAyn1NwzakNYqP
|
|
||||||
RzsWyLrLS7R7J9s3FkZXhQw/QQcsaSMcGNQO047dm1P83N8JY5aEpiRo9zSWjoiw
|
|
||||||
qoExANj5lUTZPe8M50lI182FrcjAN7dClO3QI6pg7wy0erMxfFly3j8UQ91ysS9T
|
|
||||||
s+GsP9I3cmWWQcKYxWHtE8xTXnNCVPFZQj2nwhJzae8ypfOtulBRA3dUKWGKuDH/
|
|
||||||
axFENhUsT397aOU3qkP/od4a64JyNIEo4CTTSPVeWd7njsGqli2U3A4xL2CcyYvt
|
|
||||||
D/MWcMBGEoLSNTswwKdom4FaJpn5KThnK/T0bQcmJblJhoCtppXisbexZnCpuS0x
|
|
||||||
Zdlm2T14KJ3LABEBAAGJAjwEGAEIACYWIQQ94D0eFEp/BpNZmdyq/SOBb80tWwUC
|
|
||||||
YrVn/gIbDAUJA8JnAAAKCRCq/SOBb80tWyTBD/9AGpW6QoDF7zYjHAozH9S5RGCA
|
|
||||||
Y7E82dG/0xmFUwPprAG0BKmmgU6TiipyVGmKIXGYYYU92pMnbvXkYQMoa+WJNncN
|
|
||||||
D3fY52UeXeffTf4cFpStlzi9xgYtOLhFamzYu/4xhkjOX+xhOSXscCiFRyT8cF3B
|
|
||||||
O6c5BHU+Zj0/rGPgOyPUbx7l7B9MubB/41nNX35k08e+8T3wtWDb4XF+15HnRfva
|
|
||||||
6fblO8wgU25Orv2Rm1jnKGa9DxJ8nE40IMrqDapENtDuL+zKJsvR0+ptWvEyL56U
|
|
||||||
GtJJG5un6mXiLKuRQT0DEv4MdZRHDgDstDnqcbEiazVEbUuvhZZob6lRY2A19m1+
|
|
||||||
7zfnDxkhqCA1RCnv4fdvcPdCMMFHwLpdhjgW0aI/uwgwrvsEz5+JRlnLvdQHlPAg
|
|
||||||
q7l2fGcBSpz9U0ayyfRPjPntsNCtZl1UDxGLeciPkZhyG84zEWQbk/j52ZpRN+Ik
|
|
||||||
ALpRLa8RBFmFSmXDUmwQrmm1EmARyQXwweKU31hf8ZGbCp2lPuRYm1LuGiirXSVP
|
|
||||||
GysjRAJgW+VRpBKOzFQoUAUbReVWSaCwT8s17THzf71DdDb6CTj31jMLLYWwBpA/
|
|
||||||
i73DgobDZMIGEZZC1EKqza8eh11xfyHFzGec03tbh+lIen+5IiRtWiEWkDS9ll0G
|
|
||||||
zgS/ZdziCvdAutqnGA==
|
|
||||||
=gZWO
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Security reports are greatly appreciated and we will publicly thank you for it, although we keep your name confidential if you request it.
|
Security reports are greatly appreciated and we will publicly thank you for it, although we keep your name confidential if you request it.
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Windows has a limitation for command line arguments, the size can not exceed 32KB.
|
// Windows has a limitation for command line arguments, the size can not exceed 32KB.
|
||||||
// So we have to feed the files to some tools (like gofmt) batch by batch
|
// So we have to feed the files to some tools (like gofmt/misspell) batch by batch
|
||||||
|
|
||||||
// We also introduce a `gitea-fmt` command, it does better import formatting than gofmt/goimports. `gitea-fmt` calls `gofmt` internally.
|
// We also introduce a `gitea-fmt` command, it does better import formatting than gofmt/goimports. `gitea-fmt` calls `gofmt` internally.
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error)
|
||||||
"build",
|
"build",
|
||||||
"cmd",
|
"cmd",
|
||||||
"contrib",
|
"contrib",
|
||||||
"tests",
|
"integrations",
|
||||||
"models",
|
"models",
|
||||||
"modules",
|
"modules",
|
||||||
"routers",
|
"routers",
|
||||||
|
@ -71,8 +71,8 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error)
|
||||||
co.includePatterns = append(co.includePatterns, regexp.MustCompile(`.*\.go$`))
|
co.includePatterns = append(co.includePatterns, regexp.MustCompile(`.*\.go$`))
|
||||||
|
|
||||||
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`.*\bbindata\.go$`))
|
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`.*\bbindata\.go$`))
|
||||||
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`tests/gitea-repositories-meta`))
|
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`integrations/gitea-repositories-meta`))
|
||||||
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`tests/integration/migration-test`))
|
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`integrations/migration-test`))
|
||||||
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`modules/git/tests`))
|
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`modules/git/tests`))
|
||||||
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`models/fixtures`))
|
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`models/fixtures`))
|
||||||
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`models/migrations/fixtures`))
|
co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`models/migrations/fixtures`))
|
||||||
|
@ -195,6 +195,7 @@ Options:
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
%[1]s gofmt ...
|
%[1]s gofmt ...
|
||||||
|
%[1]s misspell ...
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
{file-list} the file list
|
{file-list} the file list
|
||||||
|
@ -205,17 +206,6 @@ Example:
|
||||||
`, "file-batch-exec")
|
`, "file-batch-exec")
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGoVersion() string {
|
|
||||||
goModFile, err := os.ReadFile("go.mod")
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf(`Faild to read "go.mod": %v`, err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
goModVersionRegex := regexp.MustCompile(`go \d+\.\d+`)
|
|
||||||
goModVersionLine := goModVersionRegex.Find(goModFile)
|
|
||||||
return string(goModVersionLine[3:])
|
|
||||||
}
|
|
||||||
|
|
||||||
func newFileCollectorFromMainOptions(mainOptions map[string]string) (fc *fileCollector, err error) {
|
func newFileCollectorFromMainOptions(mainOptions map[string]string) (fc *fileCollector, err error) {
|
||||||
fileFilter := mainOptions["file-filter"]
|
fileFilter := mainOptions["file-filter"]
|
||||||
if fileFilter == "" {
|
if fileFilter == "" {
|
||||||
|
@ -238,9 +228,9 @@ func containsString(a []string, s string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func giteaFormatGoImports(files []string, doWriteFile bool) error {
|
func giteaFormatGoImports(files []string, hasChangedFiles, doWriteFile bool) error {
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if err := codeformat.FormatGoImports(file, doWriteFile); err != nil {
|
if err := codeformat.FormatGoImports(file, hasChangedFiles, doWriteFile); err != nil {
|
||||||
log.Printf("failed to format go imports: %s, err=%v", file, err)
|
log.Printf("failed to format go imports: %s, err=%v", file, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -279,8 +269,10 @@ func main() {
|
||||||
if containsString(subArgs, "-d") {
|
if containsString(subArgs, "-d") {
|
||||||
log.Print("the -d option is not supported by gitea-fmt")
|
log.Print("the -d option is not supported by gitea-fmt")
|
||||||
}
|
}
|
||||||
cmdErrors = append(cmdErrors, giteaFormatGoImports(files, containsString(subArgs, "-w")))
|
cmdErrors = append(cmdErrors, giteaFormatGoImports(files, containsString(subArgs, "-l"), containsString(subArgs, "-w")))
|
||||||
cmdErrors = append(cmdErrors, passThroughCmd("go", append([]string{"run", os.Getenv("GOFUMPT_PACKAGE"), "-extra", "-lang", getGoVersion()}, substArgs...)))
|
cmdErrors = append(cmdErrors, passThroughCmd("go", append([]string{"run", os.Getenv("GOFUMPT_PACKAGE"), "-extra", "-lang", "1.17"}, substArgs...)))
|
||||||
|
case "misspell":
|
||||||
|
cmdErrors = append(cmdErrors, passThroughCmd("go", append([]string{"run", os.Getenv("MISSPELL_PACKAGE")}, substArgs...)))
|
||||||
default:
|
default:
|
||||||
log.Fatalf("unknown cmd: %s %v", subCmd, subArgs)
|
log.Fatalf("unknown cmd: %s %v", subCmd, subArgs)
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ package codeformat
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
@ -158,7 +159,7 @@ func formatGoImports(contentBytes []byte) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FormatGoImports format the imports by our rules (see unit tests)
|
// FormatGoImports format the imports by our rules (see unit tests)
|
||||||
func FormatGoImports(file string, doWriteFile bool) error {
|
func FormatGoImports(file string, doChangedFiles, doWriteFile bool) error {
|
||||||
f, err := os.Open(file)
|
f, err := os.Open(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -182,6 +183,10 @@ func FormatGoImports(file string, doWriteFile bool) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if doChangedFiles {
|
||||||
|
fmt.Println(file)
|
||||||
|
}
|
||||||
|
|
||||||
if doWriteFile {
|
if doWriteFile {
|
||||||
f, err = os.OpenFile(file, os.O_TRUNC|os.O_WRONLY, 0o644)
|
f, err = os.OpenFile(file, os.O_TRUNC|os.O_WRONLY, 0o644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
gemojiURL = "https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json"
|
gemojiURL = "https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json"
|
||||||
maxUnicodeVersion = 14
|
maxUnicodeVersion = 12
|
||||||
)
|
)
|
||||||
|
|
||||||
var flagOut = flag.String("o", "modules/emoji/emoji_data.go", "out")
|
var flagOut = flag.String("o", "modules/emoji/emoji_data.go", "out")
|
||||||
|
@ -214,7 +214,8 @@ const hdr = `
|
||||||
|
|
||||||
package emoji
|
package emoji
|
||||||
|
|
||||||
// Code generated by build/generate-emoji.go. DO NOT EDIT.
|
// Code generated by gen.go. DO NOT EDIT.
|
||||||
// Sourced from %s
|
// Sourced from %s
|
||||||
|
//
|
||||||
var GemojiData = %#v
|
var GemojiData = %#v
|
||||||
`
|
`
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a MIT-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build ignore
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"io/fs"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
"regexp"
|
|
||||||
"sort"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
// regexp is based on go-license, excluding README and NOTICE
|
|
||||||
// https://github.com/google/go-licenses/blob/master/licenses/find.go
|
|
||||||
var licenseRe = regexp.MustCompile(`^(?i)((UN)?LICEN(S|C)E|COPYING).*$`)
|
|
||||||
|
|
||||||
type LicenseEntry struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Path string `json:"path"`
|
|
||||||
LicenseText string `json:"licenseText"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
base, out := os.Args[1], os.Args[2]
|
|
||||||
|
|
||||||
paths := []string{}
|
|
||||||
err := filepath.WalkDir(base, func(path string, entry fs.DirEntry, err error) error {
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if entry.IsDir() || !licenseRe.MatchString(entry.Name()) {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
paths = append(paths, path)
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
sort.Strings(paths)
|
|
||||||
|
|
||||||
entries := []LicenseEntry{}
|
|
||||||
for _, path := range paths {
|
|
||||||
licenseText, err := os.ReadFile(path)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
path := strings.Replace(path, base+string(os.PathSeparator), "", 1)
|
|
||||||
name := filepath.Dir(path)
|
|
||||||
|
|
||||||
// There might be a bug somewhere in go-licenses that sometimes interprets the
|
|
||||||
// root package as "." and sometimes as "code.gitea.io/gitea". Workaround by
|
|
||||||
// removing both of them for the sake of stable output.
|
|
||||||
if name == "." || name == "code.gitea.io/gitea" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
entries = append(entries, LicenseEntry{
|
|
||||||
Name: name,
|
|
||||||
Path: path,
|
|
||||||
LicenseText: string(licenseText),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
jsonBytes, err := json.MarshalIndent(entries, "", " ")
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = os.WriteFile(out, jsonBytes, 0o644)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -39,14 +39,6 @@ func main() {
|
||||||
|
|
||||||
defer util.Remove(file.Name())
|
defer util.Remove(file.Name())
|
||||||
|
|
||||||
if err := os.RemoveAll(destination); err != nil {
|
|
||||||
log.Fatalf("Cannot clean destination folder: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := os.MkdirAll(destination, 0o755); err != nil {
|
|
||||||
log.Fatalf("Cannot create destination: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
req, err := http.NewRequest("GET", url, nil)
|
req, err := http.NewRequest("GET", url, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to download archive. %s", err)
|
log.Fatalf("Failed to download archive. %s", err)
|
||||||
|
|
26
build/gitea-format-imports.go
Normal file
26
build/gitea-format-imports.go
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// Copyright 2021 The Gitea Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build ignore
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"code.gitea.io/gitea/build/codeformat"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
if len(os.Args) <= 1 {
|
||||||
|
log.Fatalf("Usage: gitea-format-imports [files...]")
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, file := range os.Args[1:] {
|
||||||
|
if err := codeformat.FormatGoImports(file); err != nil {
|
||||||
|
log.Fatalf("can not format file %s, err=%v", file, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
50
cmd/admin.go
50
cmd/admin.go
|
@ -13,8 +13,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
|
"code.gitea.io/gitea/models"
|
||||||
asymkey_model "code.gitea.io/gitea/models/asymkey"
|
asymkey_model "code.gitea.io/gitea/models/asymkey"
|
||||||
auth_model "code.gitea.io/gitea/models/auth"
|
"code.gitea.io/gitea/models/auth"
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
repo_model "code.gitea.io/gitea/models/repo"
|
repo_model "code.gitea.io/gitea/models/repo"
|
||||||
user_model "code.gitea.io/gitea/models/user"
|
user_model "code.gitea.io/gitea/models/user"
|
||||||
|
@ -156,10 +157,6 @@ var (
|
||||||
Name: "email,e",
|
Name: "email,e",
|
||||||
Usage: "Email of the user to delete",
|
Usage: "Email of the user to delete",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "purge",
|
|
||||||
Usage: "Purge user, all their repositories, organizations and comments",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Action: runDeleteUser,
|
Action: runDeleteUser,
|
||||||
}
|
}
|
||||||
|
@ -588,16 +585,16 @@ func runCreateUser(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := user_model.CreateUser(u, overwriteDefault); err != nil {
|
if err := user_model.CreateUser(u, overwriteDefault); err != nil {
|
||||||
return fmt.Errorf("CreateUser: %w", err)
|
return fmt.Errorf("CreateUser: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.Bool("access-token") {
|
if c.Bool("access-token") {
|
||||||
t := &auth_model.AccessToken{
|
t := &models.AccessToken{
|
||||||
Name: "gitea-admin",
|
Name: "gitea-admin",
|
||||||
UID: u.ID,
|
UID: u.ID,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := auth_model.NewAccessToken(t); err != nil {
|
if err := models.NewAccessToken(t); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -631,10 +628,9 @@ func runListUsers(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
twofa := user_model.UserList(users).GetTwoFaStatus()
|
fmt.Fprintf(w, "ID\tUsername\tEmail\tIsActive\tIsAdmin\n")
|
||||||
fmt.Fprintf(w, "ID\tUsername\tEmail\tIsActive\tIsAdmin\t2FA\n")
|
|
||||||
for _, u := range users {
|
for _, u := range users {
|
||||||
fmt.Fprintf(w, "%d\t%s\t%s\t%t\t%t\t%t\n", u.ID, u.Name, u.Email, u.IsActive, u.IsAdmin, twofa[u.ID])
|
fmt.Fprintf(w, "%d\t%s\t%s\t%t\t%t\n", u.ID, u.Name, u.Email, u.IsActive, u.IsAdmin)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -679,7 +675,7 @@ func runDeleteUser(c *cli.Context) error {
|
||||||
return fmt.Errorf("The user %s does not match the provided id %d", user.Name, c.Int64("id"))
|
return fmt.Errorf("The user %s does not match the provided id %d", user.Name, c.Int64("id"))
|
||||||
}
|
}
|
||||||
|
|
||||||
return user_service.DeleteUser(ctx, user, c.Bool("purge"))
|
return user_service.DeleteUser(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runGenerateAccessToken(c *cli.Context) error {
|
func runGenerateAccessToken(c *cli.Context) error {
|
||||||
|
@ -699,12 +695,12 @@ func runGenerateAccessToken(c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
t := &auth_model.AccessToken{
|
t := &models.AccessToken{
|
||||||
Name: c.String("token-name"),
|
Name: c.String("token-name"),
|
||||||
UID: user.ID,
|
UID: user.ID,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := auth_model.NewAccessToken(t); err != nil {
|
if err := models.NewAccessToken(t); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,7 +731,7 @@ func runRepoSyncReleases(_ *cli.Context) error {
|
||||||
Private: true,
|
Private: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("SearchRepositoryByName: %w", err)
|
return fmt.Errorf("SearchRepositoryByName: %v", err)
|
||||||
}
|
}
|
||||||
if len(repos) == 0 {
|
if len(repos) == 0 {
|
||||||
break
|
break
|
||||||
|
@ -778,9 +774,9 @@ func runRepoSyncReleases(_ *cli.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getReleaseCount(id int64) (int64, error) {
|
func getReleaseCount(id int64) (int64, error) {
|
||||||
return repo_model.GetReleaseCountByRepoID(
|
return models.GetReleaseCountByRepoID(
|
||||||
id,
|
id,
|
||||||
repo_model.FindReleasesOptions{
|
models.FindReleasesOptions{
|
||||||
IncludeTags: true,
|
IncludeTags: true,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -843,8 +839,8 @@ func runAddOauth(c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return auth_model.CreateSource(&auth_model.Source{
|
return auth.CreateSource(&auth.Source{
|
||||||
Type: auth_model.OAuth2,
|
Type: auth.OAuth2,
|
||||||
Name: c.String("name"),
|
Name: c.String("name"),
|
||||||
IsActive: true,
|
IsActive: true,
|
||||||
Cfg: parseOAuth2Config(c),
|
Cfg: parseOAuth2Config(c),
|
||||||
|
@ -863,7 +859,7 @@ func runUpdateOauth(c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
source, err := auth_model.GetSourceByID(c.Int64("id"))
|
source, err := auth.GetSourceByID(c.Int64("id"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -943,7 +939,7 @@ func runUpdateOauth(c *cli.Context) error {
|
||||||
oAuth2Config.CustomURLMapping = customURLMapping
|
oAuth2Config.CustomURLMapping = customURLMapping
|
||||||
source.Cfg = oAuth2Config
|
source.Cfg = oAuth2Config
|
||||||
|
|
||||||
return auth_model.UpdateSource(source)
|
return auth.UpdateSource(source)
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseSMTPConfig(c *cli.Context, conf *smtp.Source) error {
|
func parseSMTPConfig(c *cli.Context, conf *smtp.Source) error {
|
||||||
|
@ -1014,8 +1010,8 @@ func runAddSMTP(c *cli.Context) error {
|
||||||
smtpConfig.Auth = "PLAIN"
|
smtpConfig.Auth = "PLAIN"
|
||||||
}
|
}
|
||||||
|
|
||||||
return auth_model.CreateSource(&auth_model.Source{
|
return auth.CreateSource(&auth.Source{
|
||||||
Type: auth_model.SMTP,
|
Type: auth.SMTP,
|
||||||
Name: c.String("name"),
|
Name: c.String("name"),
|
||||||
IsActive: active,
|
IsActive: active,
|
||||||
Cfg: &smtpConfig,
|
Cfg: &smtpConfig,
|
||||||
|
@ -1034,7 +1030,7 @@ func runUpdateSMTP(c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
source, err := auth_model.GetSourceByID(c.Int64("id"))
|
source, err := auth.GetSourceByID(c.Int64("id"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1055,7 +1051,7 @@ func runUpdateSMTP(c *cli.Context) error {
|
||||||
|
|
||||||
source.Cfg = smtpConfig
|
source.Cfg = smtpConfig
|
||||||
|
|
||||||
return auth_model.UpdateSource(source)
|
return auth.UpdateSource(source)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runListAuth(c *cli.Context) error {
|
func runListAuth(c *cli.Context) error {
|
||||||
|
@ -1066,7 +1062,7 @@ func runListAuth(c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
authSources, err := auth_model.Sources()
|
authSources, err := auth.Sources()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1100,7 @@ func runDeleteAuth(c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
source, err := auth_model.GetSourceByID(c.Int64("id"))
|
source, err := auth.GetSourceByID(c.Int64("id"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,10 +34,6 @@ var (
|
||||||
Name: "not-active",
|
Name: "not-active",
|
||||||
Usage: "Deactivate the authentication source.",
|
Usage: "Deactivate the authentication source.",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "active",
|
|
||||||
Usage: "Activate the authentication source.",
|
|
||||||
},
|
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "security-protocol",
|
Name: "security-protocol",
|
||||||
Usage: "Security protocol name.",
|
Usage: "Security protocol name.",
|
||||||
|
@ -121,10 +117,6 @@ var (
|
||||||
Name: "synchronize-users",
|
Name: "synchronize-users",
|
||||||
Usage: "Enable user synchronization.",
|
Usage: "Enable user synchronization.",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "disable-synchronize-users",
|
|
||||||
Usage: "Disable user synchronization.",
|
|
||||||
},
|
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "page-size",
|
Name: "page-size",
|
||||||
Usage: "Search page size.",
|
Usage: "Search page size.",
|
||||||
|
@ -191,15 +183,9 @@ func parseAuthSource(c *cli.Context, authSource *auth.Source) {
|
||||||
if c.IsSet("not-active") {
|
if c.IsSet("not-active") {
|
||||||
authSource.IsActive = !c.Bool("not-active")
|
authSource.IsActive = !c.Bool("not-active")
|
||||||
}
|
}
|
||||||
if c.IsSet("active") {
|
|
||||||
authSource.IsActive = c.Bool("active")
|
|
||||||
}
|
|
||||||
if c.IsSet("synchronize-users") {
|
if c.IsSet("synchronize-users") {
|
||||||
authSource.IsSyncEnabled = c.Bool("synchronize-users")
|
authSource.IsSyncEnabled = c.Bool("synchronize-users")
|
||||||
}
|
}
|
||||||
if c.IsSet("disable-synchronize-users") {
|
|
||||||
authSource.IsSyncEnabled = !c.Bool("disable-synchronize-users")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseLdapConfig assigns values on config according to command line flags.
|
// parseLdapConfig assigns values on config according to command line flags.
|
||||||
|
|
|
@ -858,36 +858,6 @@ func TestUpdateLdapBindDn(t *testing.T) {
|
||||||
},
|
},
|
||||||
errMsg: "Invalid authentication type. expected: LDAP (via BindDN), actual: OAuth2",
|
errMsg: "Invalid authentication type. expected: LDAP (via BindDN), actual: OAuth2",
|
||||||
},
|
},
|
||||||
// case 24
|
|
||||||
{
|
|
||||||
args: []string{
|
|
||||||
"ldap-test",
|
|
||||||
"--id", "24",
|
|
||||||
"--name", "ldap (via Bind DN) flip 'active' and 'user sync' attributes",
|
|
||||||
"--active",
|
|
||||||
"--disable-synchronize-users",
|
|
||||||
},
|
|
||||||
id: 24,
|
|
||||||
existingAuthSource: &auth.Source{
|
|
||||||
Type: auth.LDAP,
|
|
||||||
IsActive: false,
|
|
||||||
IsSyncEnabled: true,
|
|
||||||
Cfg: &ldap.Source{
|
|
||||||
Name: "ldap (via Bind DN) flip 'active' and 'user sync' attributes",
|
|
||||||
Enabled: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
authSource: &auth.Source{
|
|
||||||
Type: auth.LDAP,
|
|
||||||
Name: "ldap (via Bind DN) flip 'active' and 'user sync' attributes",
|
|
||||||
IsActive: true,
|
|
||||||
IsSyncEnabled: false,
|
|
||||||
Cfg: &ldap.Source{
|
|
||||||
Name: "ldap (via Bind DN) flip 'active' and 'user sync' attributes",
|
|
||||||
Enabled: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for n, c := range cases {
|
for n, c := range cases {
|
||||||
|
@ -1251,33 +1221,6 @@ func TestUpdateLdapSimpleAuth(t *testing.T) {
|
||||||
},
|
},
|
||||||
errMsg: "Invalid authentication type. expected: LDAP (simple auth), actual: PAM",
|
errMsg: "Invalid authentication type. expected: LDAP (simple auth), actual: PAM",
|
||||||
},
|
},
|
||||||
// case 20
|
|
||||||
{
|
|
||||||
args: []string{
|
|
||||||
"ldap-test",
|
|
||||||
"--id", "20",
|
|
||||||
"--name", "ldap (simple auth) flip 'active' attribute",
|
|
||||||
"--active",
|
|
||||||
},
|
|
||||||
id: 20,
|
|
||||||
existingAuthSource: &auth.Source{
|
|
||||||
Type: auth.DLDAP,
|
|
||||||
IsActive: false,
|
|
||||||
Cfg: &ldap.Source{
|
|
||||||
Name: "ldap (simple auth) flip 'active' attribute",
|
|
||||||
Enabled: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
authSource: &auth.Source{
|
|
||||||
Type: auth.DLDAP,
|
|
||||||
Name: "ldap (simple auth) flip 'active' attribute",
|
|
||||||
IsActive: true,
|
|
||||||
Cfg: &ldap.Source{
|
|
||||||
Name: "ldap (simple auth) flip 'active' attribute",
|
|
||||||
Enabled: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for n, c := range cases {
|
for n, c := range cases {
|
||||||
|
|
|
@ -68,7 +68,7 @@ Ensure you are running in the correct environment or set the correct configurati
|
||||||
If this is the intended configuration file complete the [database] section.`, setting.CustomConf)
|
If this is the intended configuration file complete the [database] section.`, setting.CustomConf)
|
||||||
}
|
}
|
||||||
if err := db.InitEngine(ctx); err != nil {
|
if err := db.InitEngine(ctx); err != nil {
|
||||||
return fmt.Errorf("unable to initialize the database using the configuration in %q. Error: %w", setting.CustomConf, err)
|
return fmt.Errorf("unable to initialize the database using the configuration in %q. Error: %v", setting.CustomConf, err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,13 +166,13 @@ func setDoctorLogger(ctx *cli.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runDoctor(ctx *cli.Context) error {
|
func runDoctor(ctx *cli.Context) error {
|
||||||
stdCtx, cancel := installSignals()
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
// Silence the default loggers
|
// Silence the default loggers
|
||||||
log.DelNamedLogger("console")
|
log.DelNamedLogger("console")
|
||||||
log.DelNamedLogger(log.DEFAULT)
|
log.DelNamedLogger(log.DEFAULT)
|
||||||
|
|
||||||
|
stdCtx, cancel := installSignals()
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
// Now setup our own
|
// Now setup our own
|
||||||
setDoctorLogger(ctx)
|
setDoctorLogger(ctx)
|
||||||
|
|
||||||
|
|
11
cmd/dump.go
11
cmd/dump.go
|
@ -92,7 +92,7 @@ func (o outputType) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
var outputTypeEnum = &outputType{
|
var outputTypeEnum = &outputType{
|
||||||
Enum: []string{"zip", "tar", "tar.sz", "tar.gz", "tar.xz", "tar.bz2", "tar.br", "tar.lz4", "tar.zst"},
|
Enum: []string{"zip", "tar", "tar.sz", "tar.gz", "tar.xz", "tar.bz2", "tar.br", "tar.lz4"},
|
||||||
Default: "zip",
|
Default: "zip",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,10 +146,6 @@ It can be used for backup and capture Gitea server image to send to maintainer`,
|
||||||
Name: "skip-package-data",
|
Name: "skip-package-data",
|
||||||
Usage: "Skip package data",
|
Usage: "Skip package data",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "skip-index",
|
|
||||||
Usage: "Skip bleve index data",
|
|
||||||
},
|
|
||||||
cli.GenericFlag{
|
cli.GenericFlag{
|
||||||
Name: "type",
|
Name: "type",
|
||||||
Value: outputTypeEnum,
|
Value: outputTypeEnum,
|
||||||
|
@ -331,11 +327,6 @@ func runDump(ctx *cli.Context) error {
|
||||||
excludes = append(excludes, opts.ProviderConfig)
|
excludes = append(excludes, opts.ProviderConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.IsSet("skip-index") && ctx.Bool("skip-index") {
|
|
||||||
excludes = append(excludes, setting.Indexer.RepoPath)
|
|
||||||
excludes = append(excludes, setting.Indexer.IssuePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
excludes = append(excludes, setting.RepoRootPath)
|
excludes = append(excludes, setting.RepoRootPath)
|
||||||
excludes = append(excludes, setting.LFS.Path)
|
excludes = append(excludes, setting.LFS.Path)
|
||||||
excludes = append(excludes, setting.Attachment.Path)
|
excludes = append(excludes, setting.Attachment.Path)
|
||||||
|
|
|
@ -166,7 +166,7 @@ func runDumpRepository(ctx *cli.Context) error {
|
||||||
// make sure the directory doesn't exist or is empty, prevent from deleting user files
|
// make sure the directory doesn't exist or is empty, prevent from deleting user files
|
||||||
repoDir := ctx.String("repo_dir")
|
repoDir := ctx.String("repo_dir")
|
||||||
if exists, err := util.IsExist(repoDir); err != nil {
|
if exists, err := util.IsExist(repoDir); err != nil {
|
||||||
return fmt.Errorf("unable to stat repo_dir %q: %w", repoDir, err)
|
return fmt.Errorf("unable to stat repo_dir %q: %v", repoDir, err)
|
||||||
} else if exists {
|
} else if exists {
|
||||||
if isDir, _ := util.IsDir(repoDir); !isDir {
|
if isDir, _ := util.IsDir(repoDir); !isDir {
|
||||||
return fmt.Errorf("repo_dir %q already exists but it's not a directory", repoDir)
|
return fmt.Errorf("repo_dir %q already exists but it's not a directory", repoDir)
|
||||||
|
|
|
@ -123,7 +123,7 @@ func initEmbeddedExtractor(c *cli.Context) error {
|
||||||
|
|
||||||
sections["public"] = §ion{Path: "public", Names: public.AssetNames, IsDir: public.AssetIsDir, Asset: public.Asset}
|
sections["public"] = §ion{Path: "public", Names: public.AssetNames, IsDir: public.AssetIsDir, Asset: public.Asset}
|
||||||
sections["options"] = §ion{Path: "options", Names: options.AssetNames, IsDir: options.AssetIsDir, Asset: options.Asset}
|
sections["options"] = §ion{Path: "options", Names: options.AssetNames, IsDir: options.AssetIsDir, Asset: options.Asset}
|
||||||
sections["templates"] = §ion{Path: "templates", Names: templates.BuiltinAssetNames, IsDir: templates.BuiltinAssetIsDir, Asset: templates.BuiltinAsset}
|
sections["templates"] = §ion{Path: "templates", Names: templates.AssetNames, IsDir: templates.AssetIsDir, Asset: templates.Asset}
|
||||||
|
|
||||||
for _, sec := range sections {
|
for _, sec := range sections {
|
||||||
assets = append(assets, buildAssetList(sec, pats, c)...)
|
assets = append(assets, buildAssetList(sec, pats, c)...)
|
||||||
|
@ -186,11 +186,11 @@ func runViewDo(c *cli.Context) error {
|
||||||
|
|
||||||
data, err := assets[0].Section.Asset(assets[0].Name)
|
data, err := assets[0].Section.Asset(assets[0].Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("%s: %w", assets[0].Path, err)
|
return fmt.Errorf("%s: %v", assets[0].Path, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err = os.Stdout.Write(data); err != nil {
|
if _, err = os.Stdout.Write(data); err != nil {
|
||||||
return fmt.Errorf("%s: %w", assets[0].Path, err)
|
return fmt.Errorf("%s: %v", assets[0].Path, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -251,11 +251,11 @@ func extractAsset(d string, a asset, overwrite, rename bool) error {
|
||||||
|
|
||||||
data, err := a.Section.Asset(a.Name)
|
data, err := a.Section.Asset(a.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("%s: %w", a.Path, err)
|
return fmt.Errorf("%s: %v", a.Path, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
|
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
|
||||||
return fmt.Errorf("%s: %w", dir, err)
|
return fmt.Errorf("%s: %v", dir, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
perms := os.ModePerm & 0o666
|
perms := os.ModePerm & 0o666
|
||||||
|
@ -263,7 +263,7 @@ func extractAsset(d string, a asset, overwrite, rename bool) error {
|
||||||
fi, err := os.Lstat(dest)
|
fi, err := os.Lstat(dest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !errors.Is(err, os.ErrNotExist) {
|
if !errors.Is(err, os.ErrNotExist) {
|
||||||
return fmt.Errorf("%s: %w", dest, err)
|
return fmt.Errorf("%s: %v", dest, err)
|
||||||
}
|
}
|
||||||
} else if !overwrite && !rename {
|
} else if !overwrite && !rename {
|
||||||
fmt.Printf("%s already exists; skipped.\n", dest)
|
fmt.Printf("%s already exists; skipped.\n", dest)
|
||||||
|
@ -272,7 +272,7 @@ func extractAsset(d string, a asset, overwrite, rename bool) error {
|
||||||
return fmt.Errorf("%s already exists, but it's not a regular file", dest)
|
return fmt.Errorf("%s already exists, but it's not a regular file", dest)
|
||||||
} else if rename {
|
} else if rename {
|
||||||
if err := util.Rename(dest, dest+".bak"); err != nil {
|
if err := util.Rename(dest, dest+".bak"); err != nil {
|
||||||
return fmt.Errorf("Error creating backup for %s: %w", dest, err)
|
return fmt.Errorf("Error creating backup for %s: %v", dest, err)
|
||||||
}
|
}
|
||||||
// Attempt to respect file permissions mask (even if user:group will be set anew)
|
// Attempt to respect file permissions mask (even if user:group will be set anew)
|
||||||
perms = fi.Mode()
|
perms = fi.Mode()
|
||||||
|
@ -280,12 +280,12 @@ func extractAsset(d string, a asset, overwrite, rename bool) error {
|
||||||
|
|
||||||
file, err := os.OpenFile(dest, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, perms)
|
file, err := os.OpenFile(dest, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, perms)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("%s: %w", dest, err)
|
return fmt.Errorf("%s: %v", dest, err)
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
if _, err = file.Write(data); err != nil {
|
if _, err = file.Write(data); err != nil {
|
||||||
return fmt.Errorf("%s: %w", dest, err)
|
return fmt.Errorf("%s: %v", dest, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(dest)
|
fmt.Println(dest)
|
||||||
|
@ -325,7 +325,7 @@ func getPatterns(args []string) ([]glob.Glob, error) {
|
||||||
pat := make([]glob.Glob, len(args))
|
pat := make([]glob.Glob, len(args))
|
||||||
for i := range args {
|
for i := range args {
|
||||||
if g, err := glob.Compile(args[i], '/'); err != nil {
|
if g, err := glob.Compile(args[i], '/'); err != nil {
|
||||||
return nil, fmt.Errorf("'%s': Invalid glob pattern: %w", args[i], err)
|
return nil, fmt.Errorf("'%s': Invalid glob pattern: %v", args[i], err)
|
||||||
} else {
|
} else {
|
||||||
pat[i] = g
|
pat[i] = g
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,7 +312,7 @@ func runHookPostReceive(c *cli.Context) error {
|
||||||
|
|
||||||
// First of all run update-server-info no matter what
|
// First of all run update-server-info no matter what
|
||||||
if _, _, err := git.NewCommand(ctx, "update-server-info").RunStdString(nil); err != nil {
|
if _, _, err := git.NewCommand(ctx, "update-server-info").RunStdString(nil); err != nil {
|
||||||
return fmt.Errorf("Failed to call 'git update-server-info': %w", err)
|
return fmt.Errorf("Failed to call 'git update-server-info': %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now if we're an internal don't do anything else
|
// Now if we're an internal don't do anything else
|
||||||
|
@ -792,7 +792,7 @@ func writeDataPktLine(out io.Writer, data []byte) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fail("Internal Server Error", "Pkt-Line response failed: %v", err)
|
return fail("Internal Server Error", "Pkt-Line response failed: %v", err)
|
||||||
}
|
}
|
||||||
if lr != 4 {
|
if 4 != lr {
|
||||||
return fail("Internal Server Error", "Pkt-Line response failed: %v", err)
|
return fail("Internal Server Error", "Pkt-Line response failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ var (
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "no-system",
|
Name: "no-system",
|
||||||
Usage: "Do not show system processes",
|
Usage: "Do not show system proceses",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "stacktraces",
|
Name: "stacktraces",
|
||||||
|
|
|
@ -174,18 +174,6 @@ var (
|
||||||
Action: runAddSMTPLogger,
|
Action: runAddSMTPLogger,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, {
|
|
||||||
Name: "log-sql",
|
|
||||||
Usage: "Set LogSQL",
|
|
||||||
Flags: []cli.Flag{
|
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "debug",
|
|
||||||
}, cli.BoolFlag{
|
|
||||||
Name: "off",
|
|
||||||
Usage: "Switch off SQL logging",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Action: runSetLogSQL,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -393,18 +381,3 @@ func runReleaseReopenLogging(c *cli.Context) error {
|
||||||
fmt.Fprintln(os.Stdout, msg)
|
fmt.Fprintln(os.Stdout, msg)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func runSetLogSQL(c *cli.Context) error {
|
|
||||||
ctx, cancel := installSignals()
|
|
||||||
defer cancel()
|
|
||||||
setup("manager", c.Bool("debug"))
|
|
||||||
|
|
||||||
statusCode, msg := private.SetLogSQL(ctx, !c.Bool("off"))
|
|
||||||
switch statusCode {
|
|
||||||
case http.StatusInternalServerError:
|
|
||||||
return fail("InternalServerError", msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Fprintln(os.Stdout, msg)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
func TestMigratePackages(t *testing.T) {
|
func TestMigratePackages(t *testing.T) {
|
||||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||||
|
|
||||||
creator := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
|
creator := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}).(*user_model.User)
|
||||||
|
|
||||||
content := "package main\n\nfunc main() {\nfmt.Println(\"hi\")\n}\n"
|
content := "package main\n\nfunc main() {\nfmt.Println(\"hi\")\n}\n"
|
||||||
buf, err := packages_module.CreateHashedBufferFromReader(strings.NewReader(content), 1024)
|
buf, err := packages_module.CreateHashedBufferFromReader(strings.NewReader(content), 1024)
|
||||||
|
@ -53,7 +53,8 @@ func TestMigratePackages(t *testing.T) {
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
p := t.TempDir()
|
p, err := os.MkdirTemp(os.TempDir(), "migrated_packages")
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
dstStorage, err := storage.NewLocalStorage(
|
dstStorage, err := storage.NewLocalStorage(
|
||||||
ctx,
|
ctx,
|
||||||
|
|
|
@ -43,7 +43,7 @@ const (
|
||||||
var CmdServ = cli.Command{
|
var CmdServ = cli.Command{
|
||||||
Name: "serv",
|
Name: "serv",
|
||||||
Usage: "This command should only be called by SSH shell",
|
Usage: "This command should only be called by SSH shell",
|
||||||
Description: "Serv provides access auth for repositories",
|
Description: `Serv provide access auth for repositories`,
|
||||||
Action: runServ,
|
Action: runServ,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
|
|
27
cmd/web.go
27
cmd/web.go
|
@ -76,7 +76,7 @@ func runHTTPRedirector() {
|
||||||
http.Redirect(w, r, target, http.StatusTemporaryRedirect)
|
http.Redirect(w, r, target, http.StatusTemporaryRedirect)
|
||||||
})
|
})
|
||||||
|
|
||||||
err := runHTTP("tcp", source, "HTTP Redirector", handler, setting.RedirectorUseProxyProtocol)
|
err := runHTTP("tcp", source, "HTTP Redirector", handler)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Failed to start port redirection: %v", err)
|
log.Fatal("Failed to start port redirection: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -126,10 +126,8 @@ func runWeb(ctx *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
installCtx, cancel := context.WithCancel(graceful.GetManager().HammerContext())
|
c := install.Routes()
|
||||||
c := install.Routes(installCtx)
|
|
||||||
err := listen(c, false)
|
err := listen(c, false)
|
||||||
cancel()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Critical("Unable to open listener for installer. Is Gitea already running?")
|
log.Critical("Unable to open listener for installer. Is Gitea already running?")
|
||||||
graceful.GetManager().DoGracefulShutdown()
|
graceful.GetManager().DoGracefulShutdown()
|
||||||
|
@ -150,9 +148,8 @@ func runWeb(ctx *cli.Context) error {
|
||||||
go func() {
|
go func() {
|
||||||
http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
|
http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
|
||||||
_, _, finished := process.GetManager().AddTypedContext(context.Background(), "Web: PProf Server", process.SystemProcessType, true)
|
_, _, finished := process.GetManager().AddTypedContext(context.Background(), "Web: PProf Server", process.SystemProcessType, true)
|
||||||
// The pprof server is for debug purpose only, it shouldn't be exposed on public network. At the moment it's not worth to introduce a configurable option for it.
|
|
||||||
log.Info("Starting pprof server on localhost:6060")
|
log.Info("Starting pprof server on localhost:6060")
|
||||||
log.Info("Stopped pprof server: %v", http.ListenAndServe("localhost:6060", nil))
|
log.Info("%v", http.ListenAndServe("localhost:6060", nil))
|
||||||
finished()
|
finished()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
@ -177,7 +174,7 @@ func runWeb(ctx *cli.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up Chi routes
|
// Set up Chi routes
|
||||||
c := routers.NormalRoutes(graceful.GetManager().HammerContext())
|
c := routers.NormalRoutes()
|
||||||
err := listen(c, true)
|
err := listen(c, true)
|
||||||
<-graceful.GetManager().Done()
|
<-graceful.GetManager().Done()
|
||||||
log.Info("PID: %d Gitea Web Finished", os.Getpid())
|
log.Info("PID: %d Gitea Web Finished", os.Getpid())
|
||||||
|
@ -203,7 +200,7 @@ func setPort(port string) error {
|
||||||
defaultLocalURL += ":" + setting.HTTPPort + "/"
|
defaultLocalURL += ":" + setting.HTTPPort + "/"
|
||||||
|
|
||||||
// Save LOCAL_ROOT_URL if port changed
|
// Save LOCAL_ROOT_URL if port changed
|
||||||
setting.CreateOrAppendToCustomConf("server.LOCAL_ROOT_URL", func(cfg *ini.File) {
|
setting.CreateOrAppendToCustomConf(func(cfg *ini.File) {
|
||||||
cfg.Section("server").Key("LOCAL_ROOT_URL").SetValue(defaultLocalURL)
|
cfg.Section("server").Key("LOCAL_ROOT_URL").SetValue(defaultLocalURL)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -233,12 +230,12 @@ func listen(m http.Handler, handleRedirector bool) error {
|
||||||
if handleRedirector {
|
if handleRedirector {
|
||||||
NoHTTPRedirector()
|
NoHTTPRedirector()
|
||||||
}
|
}
|
||||||
err = runHTTP("tcp", listenAddr, "Web", m, setting.UseProxyProtocol)
|
err = runHTTP("tcp", listenAddr, "Web", m)
|
||||||
case setting.HTTPS:
|
case setting.HTTPS:
|
||||||
if setting.EnableAcme {
|
if setting.EnableAcme {
|
||||||
err = runACME(listenAddr, m)
|
err = runACME(listenAddr, m)
|
||||||
break
|
break
|
||||||
}
|
} else {
|
||||||
if handleRedirector {
|
if handleRedirector {
|
||||||
if setting.RedirectOtherPort {
|
if setting.RedirectOtherPort {
|
||||||
go runHTTPRedirector()
|
go runHTTPRedirector()
|
||||||
|
@ -246,25 +243,27 @@ func listen(m http.Handler, handleRedirector bool) error {
|
||||||
NoHTTPRedirector()
|
NoHTTPRedirector()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = runHTTPS("tcp", listenAddr, "Web", setting.CertFile, setting.KeyFile, m, setting.UseProxyProtocol, setting.ProxyProtocolTLSBridging)
|
err = runHTTPS("tcp", listenAddr, "Web", setting.CertFile, setting.KeyFile, m)
|
||||||
|
}
|
||||||
case setting.FCGI:
|
case setting.FCGI:
|
||||||
if handleRedirector {
|
if handleRedirector {
|
||||||
NoHTTPRedirector()
|
NoHTTPRedirector()
|
||||||
}
|
}
|
||||||
err = runFCGI("tcp", listenAddr, "FCGI Web", m, setting.UseProxyProtocol)
|
err = runFCGI("tcp", listenAddr, "FCGI Web", m)
|
||||||
case setting.HTTPUnix:
|
case setting.HTTPUnix:
|
||||||
if handleRedirector {
|
if handleRedirector {
|
||||||
NoHTTPRedirector()
|
NoHTTPRedirector()
|
||||||
}
|
}
|
||||||
err = runHTTP("unix", listenAddr, "Web", m, setting.UseProxyProtocol)
|
err = runHTTP("unix", listenAddr, "Web", m)
|
||||||
case setting.FCGIUnix:
|
case setting.FCGIUnix:
|
||||||
if handleRedirector {
|
if handleRedirector {
|
||||||
NoHTTPRedirector()
|
NoHTTPRedirector()
|
||||||
}
|
}
|
||||||
err = runFCGI("unix", listenAddr, "Web", m, setting.UseProxyProtocol)
|
err = runFCGI("unix", listenAddr, "Web", m)
|
||||||
default:
|
default:
|
||||||
log.Fatal("Invalid protocol: %s", setting.Protocol)
|
log.Fatal("Invalid protocol: %s", setting.Protocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Critical("Failed to start server: %v", err)
|
log.Critical("Failed to start server: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,14 +113,14 @@ func runACME(listenAddr string, m http.Handler) error {
|
||||||
|
|
||||||
log.Info("Running Let's Encrypt handler on %s", setting.HTTPAddr+":"+setting.PortToRedirect)
|
log.Info("Running Let's Encrypt handler on %s", setting.HTTPAddr+":"+setting.PortToRedirect)
|
||||||
// all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validation happens here)
|
// all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validation happens here)
|
||||||
err := runHTTP("tcp", setting.HTTPAddr+":"+setting.PortToRedirect, "Let's Encrypt HTTP Challenge", myACME.HTTPChallengeHandler(http.HandlerFunc(runLetsEncryptFallbackHandler)), setting.RedirectorUseProxyProtocol)
|
err := runHTTP("tcp", setting.HTTPAddr+":"+setting.PortToRedirect, "Let's Encrypt HTTP Challenge", myACME.HTTPChallengeHandler(http.HandlerFunc(runLetsEncryptFallbackHandler)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Failed to start the Let's Encrypt handler on port %s: %v", setting.PortToRedirect, err)
|
log.Fatal("Failed to start the Let's Encrypt handler on port %s: %v", setting.PortToRedirect, err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
return runHTTPSWithTLSConfig("tcp", listenAddr, "Web", tlsConfig, m, setting.UseProxyProtocol, setting.ProxyProtocolTLSBridging)
|
return runHTTPSWithTLSConfig("tcp", listenAddr, "Web", tlsConfig, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runLetsEncryptFallbackHandler(w http.ResponseWriter, r *http.Request) {
|
func runLetsEncryptFallbackHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
func runHTTP(network, listenAddr, name string, m http.Handler, useProxyProtocol bool) error {
|
func runHTTP(network, listenAddr, name string, m http.Handler) error {
|
||||||
return graceful.HTTPListenAndServe(network, listenAddr, name, m, useProxyProtocol)
|
return graceful.HTTPListenAndServe(network, listenAddr, name, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector
|
// NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector
|
||||||
|
@ -36,7 +36,7 @@ func NoInstallListener() {
|
||||||
graceful.GetManager().InformCleanup()
|
graceful.GetManager().InformCleanup()
|
||||||
}
|
}
|
||||||
|
|
||||||
func runFCGI(network, listenAddr, name string, m http.Handler, useProxyProtocol bool) error {
|
func runFCGI(network, listenAddr, name string, m http.Handler) error {
|
||||||
// This needs to handle stdin as fcgi point
|
// This needs to handle stdin as fcgi point
|
||||||
fcgiServer := graceful.NewServer(network, listenAddr, name)
|
fcgiServer := graceful.NewServer(network, listenAddr, name)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ func runFCGI(network, listenAddr, name string, m http.Handler, useProxyProtocol
|
||||||
}
|
}
|
||||||
m.ServeHTTP(resp, req)
|
m.ServeHTTP(resp, req)
|
||||||
}))
|
}))
|
||||||
}, useProxyProtocol)
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Failed to start FCGI main server: %v", err)
|
log.Fatal("Failed to start FCGI main server: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,14 +129,14 @@ var (
|
||||||
defaultCiphersChaChaFirst = append(defaultCiphersChaCha, defaultCiphersAES...)
|
defaultCiphersChaChaFirst = append(defaultCiphersChaCha, defaultCiphersAES...)
|
||||||
)
|
)
|
||||||
|
|
||||||
// runHTTPS listens on the provided network address and then calls
|
// runHTTPs listens on the provided network address and then calls
|
||||||
// Serve to handle requests on incoming TLS connections.
|
// Serve to handle requests on incoming TLS connections.
|
||||||
//
|
//
|
||||||
// Filenames containing a certificate and matching private key for the server must
|
// Filenames containing a certificate and matching private key for the server must
|
||||||
// be provided. If the certificate is signed by a certificate authority, the
|
// be provided. If the certificate is signed by a certificate authority, the
|
||||||
// certFile should be the concatenation of the server's certificate followed by the
|
// certFile should be the concatenation of the server's certificate followed by the
|
||||||
// CA's certificate.
|
// CA's certificate.
|
||||||
func runHTTPS(network, listenAddr, name, certFile, keyFile string, m http.Handler, useProxyProtocol, proxyProtocolTLSBridging bool) error {
|
func runHTTPS(network, listenAddr, name, certFile, keyFile string, m http.Handler) error {
|
||||||
tlsConfig := &tls.Config{}
|
tlsConfig := &tls.Config{}
|
||||||
if tlsConfig.NextProtos == nil {
|
if tlsConfig.NextProtos == nil {
|
||||||
tlsConfig.NextProtos = []string{"h2", "http/1.1"}
|
tlsConfig.NextProtos = []string{"h2", "http/1.1"}
|
||||||
|
@ -184,9 +184,9 @@ func runHTTPS(network, listenAddr, name, certFile, keyFile string, m http.Handle
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, name, tlsConfig, m, useProxyProtocol, proxyProtocolTLSBridging)
|
return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, name, tlsConfig, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runHTTPSWithTLSConfig(network, listenAddr, name string, tlsConfig *tls.Config, m http.Handler, useProxyProtocol, proxyProtocolTLSBridging bool) error {
|
func runHTTPSWithTLSConfig(network, listenAddr, name string, tlsConfig *tls.Config, m http.Handler) error {
|
||||||
return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, name, tlsConfig, m, useProxyProtocol, proxyProtocolTLSBridging)
|
return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, name, tlsConfig, m)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,43 +2,14 @@
|
||||||
|
|
||||||
DIR=/var/lib/gitea
|
DIR=/var/lib/gitea
|
||||||
USER=git
|
USER=git
|
||||||
HOME=/home/${USER}
|
|
||||||
GITEA_WORK_DIR=${DIR}
|
|
||||||
EXECUTABLE=/usr/local/bin/gitea
|
|
||||||
|
|
||||||
export USER
|
|
||||||
export HOME
|
|
||||||
export GITEA_WORK_DIR
|
|
||||||
|
|
||||||
name=$RC_SVCNAME
|
|
||||||
cfgfile="/etc/$RC_SVCNAME/app.ini"
|
|
||||||
command="${EXECUTABLE}"
|
|
||||||
command_user="${USER}"
|
|
||||||
command_args="web -c /etc/$RC_SVCNAME/app.ini"
|
|
||||||
command_background="yes"
|
|
||||||
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
|
|
||||||
start_stop_daemon_args="--user ${USER} --chdir ${DIR}"
|
start_stop_daemon_args="--user ${USER} --chdir ${DIR}"
|
||||||
|
command="/usr/local/bin/gitea"
|
||||||
|
command_args="web -c /etc/gitea/app.ini"
|
||||||
|
command_background=yes
|
||||||
|
pidfile=/run/gitea.pid
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
need net
|
need net
|
||||||
###
|
|
||||||
# Don't forget to add the database service requirements
|
|
||||||
###
|
|
||||||
#after postgresql
|
|
||||||
#after mysql
|
|
||||||
#after mariadb
|
|
||||||
#after memcached
|
|
||||||
#after redis
|
|
||||||
}
|
|
||||||
|
|
||||||
start_pre()
|
|
||||||
{
|
|
||||||
checkpath --directory --owner $command_user:$command_user --mode 0750 \
|
|
||||||
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
|
||||||
##
|
|
||||||
# If you want to bind Gitea to a port below 1024, uncomment
|
|
||||||
# the value below
|
|
||||||
##
|
|
||||||
#setcap cap_net_bind_service=+ep "${EXECUTABLE}"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"os/user"
|
"os/user"
|
||||||
|
@ -26,14 +27,12 @@ import (
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
"code.gitea.io/gitea/models/unittest"
|
"code.gitea.io/gitea/models/unittest"
|
||||||
gitea_git "code.gitea.io/gitea/modules/git"
|
gitea_git "code.gitea.io/gitea/modules/git"
|
||||||
"code.gitea.io/gitea/modules/graceful"
|
|
||||||
"code.gitea.io/gitea/modules/markup"
|
"code.gitea.io/gitea/modules/markup"
|
||||||
"code.gitea.io/gitea/modules/markup/external"
|
"code.gitea.io/gitea/modules/markup/external"
|
||||||
repo_module "code.gitea.io/gitea/modules/repository"
|
repo_module "code.gitea.io/gitea/modules/repository"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"code.gitea.io/gitea/modules/util"
|
"code.gitea.io/gitea/modules/util"
|
||||||
"code.gitea.io/gitea/routers"
|
"code.gitea.io/gitea/routers"
|
||||||
markup_service "code.gitea.io/gitea/services/markup"
|
|
||||||
|
|
||||||
"github.com/go-git/go-git/v5"
|
"github.com/go-git/go-git/v5"
|
||||||
"github.com/go-git/go-git/v5/config"
|
"github.com/go-git/go-git/v5/config"
|
||||||
|
@ -62,7 +61,11 @@ func runPR() {
|
||||||
}
|
}
|
||||||
setting.AppWorkPath = curDir
|
setting.AppWorkPath = curDir
|
||||||
setting.StaticRootPath = curDir
|
setting.StaticRootPath = curDir
|
||||||
setting.GravatarSource = "https://secure.gravatar.com/avatar/"
|
setting.GravatarSourceURL, err = url.Parse("https://secure.gravatar.com/avatar/")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("url.Parse: %v\n", err)
|
||||||
|
}
|
||||||
|
|
||||||
setting.AppURL = "http://localhost:8080/"
|
setting.AppURL = "http://localhost:8080/"
|
||||||
setting.HTTPPort = "8080"
|
setting.HTTPPort = "8080"
|
||||||
setting.SSH.Domain = "localhost"
|
setting.SSH.Domain = "localhost"
|
||||||
|
@ -77,6 +80,7 @@ func runPR() {
|
||||||
setting.RunUser = curUser.Username
|
setting.RunUser = curUser.Username
|
||||||
|
|
||||||
log.Printf("[PR] Loading fixtures data ...\n")
|
log.Printf("[PR] Loading fixtures data ...\n")
|
||||||
|
gitea_git.CheckLFSVersion()
|
||||||
//models.LoadConfigs()
|
//models.LoadConfigs()
|
||||||
/*
|
/*
|
||||||
setting.Database.Type = "sqlite3"
|
setting.Database.Type = "sqlite3"
|
||||||
|
@ -108,13 +112,13 @@ func runPR() {
|
||||||
unittest.LoadFixtures()
|
unittest.LoadFixtures()
|
||||||
util.RemoveAll(setting.RepoRootPath)
|
util.RemoveAll(setting.RepoRootPath)
|
||||||
util.RemoveAll(repo_module.LocalCopyPath())
|
util.RemoveAll(repo_module.LocalCopyPath())
|
||||||
unittest.CopyDir(path.Join(curDir, "tests/gitea-repositories-meta"), setting.RepoRootPath)
|
unittest.CopyDir(path.Join(curDir, "integrations/gitea-repositories-meta"), setting.RepoRootPath)
|
||||||
|
|
||||||
log.Printf("[PR] Setting up router\n")
|
log.Printf("[PR] Setting up router\n")
|
||||||
// routers.GlobalInit()
|
// routers.GlobalInit()
|
||||||
external.RegisterRenderers()
|
external.RegisterRenderers()
|
||||||
markup.Init(markup_service.ProcessorHelper())
|
markup.Init()
|
||||||
c := routers.NormalRoutes(graceful.GetManager().HammerContext())
|
c := routers.NormalRoutes()
|
||||||
|
|
||||||
log.Printf("[PR] Ready for testing !\n")
|
log.Printf("[PR] Ready for testing !\n")
|
||||||
log.Printf("[PR] Login with user1, user2, user3, ... with pass: password\n")
|
log.Printf("[PR] Login with user1, user2, user3, ... with pass: password\n")
|
||||||
|
|
|
@ -49,8 +49,12 @@ After=network.target
|
||||||
###
|
###
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
|
# Modify these two values and uncomment them if you have
|
||||||
# LimitNOFILE=524288:524288
|
# repos with lots of files and get an HTTP error 500 because
|
||||||
|
# of that
|
||||||
|
###
|
||||||
|
#LimitMEMLOCK=infinity
|
||||||
|
#LimitNOFILE=65535
|
||||||
RestartSec=2s
|
RestartSec=2s
|
||||||
Type=simple
|
Type=simple
|
||||||
User=git
|
User=git
|
||||||
|
@ -74,13 +78,6 @@ Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
|
||||||
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||||
#AmbientCapabilities=CAP_NET_BIND_SERVICE
|
#AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
###
|
###
|
||||||
# In some cases, when using CapabilityBoundingSet and AmbientCapabilities option, you may want to
|
|
||||||
# set the following value to false to allow capabilities to be applied on gitea process. The following
|
|
||||||
# value if set to true sandboxes gitea service and prevent any processes from running with privileges
|
|
||||||
# in the host user namespace.
|
|
||||||
###
|
|
||||||
#PrivateUsers=false
|
|
||||||
###
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -29,18 +29,6 @@ RUN_MODE = ; prod
|
||||||
;; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'. Defaults to 'http'
|
;; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'. Defaults to 'http'
|
||||||
;PROTOCOL = http
|
;PROTOCOL = http
|
||||||
;;
|
;;
|
||||||
;; Expect PROXY protocol headers on connections
|
|
||||||
;USE_PROXY_PROTOCOL = false
|
|
||||||
;;
|
|
||||||
;; Use PROXY protocol in TLS Bridging mode
|
|
||||||
;PROXY_PROTOCOL_TLS_BRIDGING = false
|
|
||||||
;;
|
|
||||||
; Timeout to wait for PROXY protocol header (set to 0 to have no timeout)
|
|
||||||
;PROXY_PROTOCOL_HEADER_TIMEOUT=5s
|
|
||||||
;;
|
|
||||||
; Accept PROXY protocol headers with UNKNOWN type
|
|
||||||
;PROXY_PROTOCOL_ACCEPT_UNKNOWN=false
|
|
||||||
;;
|
|
||||||
;; Set the domain for the server
|
;; Set the domain for the server
|
||||||
;DOMAIN = localhost
|
;DOMAIN = localhost
|
||||||
;;
|
;;
|
||||||
|
@ -63,8 +51,6 @@ RUN_MODE = ; prod
|
||||||
;REDIRECT_OTHER_PORT = false
|
;REDIRECT_OTHER_PORT = false
|
||||||
;PORT_TO_REDIRECT = 80
|
;PORT_TO_REDIRECT = 80
|
||||||
;;
|
;;
|
||||||
;; expect PROXY protocol header on connections to https redirector.
|
|
||||||
;REDIRECTOR_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)
|
|
||||||
;; Minimum and maximum supported TLS versions
|
;; Minimum and maximum supported TLS versions
|
||||||
;SSL_MIN_VERSION=TLSv1.2
|
;SSL_MIN_VERSION=TLSv1.2
|
||||||
;SSL_MAX_VERSION=
|
;SSL_MAX_VERSION=
|
||||||
|
@ -90,19 +76,13 @@ RUN_MODE = ; prod
|
||||||
;; Do not set this variable if PROTOCOL is set to 'unix'.
|
;; Do not set this variable if PROTOCOL is set to 'unix'.
|
||||||
;LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
|
;LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
|
||||||
;;
|
;;
|
||||||
;; When making local connections pass the PROXY protocol header.
|
|
||||||
;LOCAL_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)
|
|
||||||
;;
|
|
||||||
;; Disable SSH feature when not available
|
;; Disable SSH feature when not available
|
||||||
;DISABLE_SSH = false
|
;DISABLE_SSH = false
|
||||||
;;
|
;;
|
||||||
;; Whether to use the builtin SSH server or not.
|
;; Whether to use the builtin SSH server or not.
|
||||||
;START_SSH_SERVER = false
|
;START_SSH_SERVER = false
|
||||||
;;
|
;;
|
||||||
;; Expect PROXY protocol header on connections to the built-in SSH server
|
;; Username to use for the builtin SSH server.
|
||||||
;SSH_SERVER_USE_PROXY_PROTOCOL = false
|
|
||||||
;;
|
|
||||||
;; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER.
|
|
||||||
;BUILTIN_SSH_SERVER_USER = %(RUN_USER)s
|
;BUILTIN_SSH_SERVER_USER = %(RUN_USER)s
|
||||||
;;
|
;;
|
||||||
;; Domain name to be exposed in clone URL
|
;; Domain name to be exposed in clone URL
|
||||||
|
@ -333,7 +313,6 @@ USER = root
|
||||||
;DB_TYPE = sqlite3
|
;DB_TYPE = sqlite3
|
||||||
;PATH= ; defaults to data/gitea.db
|
;PATH= ; defaults to data/gitea.db
|
||||||
;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
|
;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
|
||||||
;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
|
|
||||||
;;
|
;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
|
@ -379,19 +358,14 @@ LOG_SQL = false ; if unset defaults to true
|
||||||
;; Whether the installer is disabled (set to true to disable the installer)
|
;; Whether the installer is disabled (set to true to disable the installer)
|
||||||
INSTALL_LOCK = false
|
INSTALL_LOCK = false
|
||||||
;;
|
;;
|
||||||
;; Global secret key that will be used
|
;; Global secret key that will be used - if blank will be regenerated.
|
||||||
;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
|
|
||||||
SECRET_KEY =
|
SECRET_KEY =
|
||||||
;;
|
;;
|
||||||
;; Alternative location to specify secret key, instead of this file; you cannot specify both this and SECRET_KEY, and must pick one
|
|
||||||
;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
|
|
||||||
;SECRET_KEY_URI = file:/etc/gitea/secret_key
|
|
||||||
;;
|
|
||||||
;; Secret used to validate communication within Gitea binary.
|
;; Secret used to validate communication within Gitea binary.
|
||||||
INTERNAL_TOKEN=
|
INTERNAL_TOKEN=
|
||||||
;;
|
;;
|
||||||
;; Alternative location to specify internal token, instead of this file; you cannot specify both this and INTERNAL_TOKEN, and must pick one
|
;; Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: file:/etc/gitea/internal_token)
|
||||||
;INTERNAL_TOKEN_URI = file:/etc/gitea/internal_token
|
;INTERNAL_TOKEN_URI = ;e.g. /etc/gitea/internal_token
|
||||||
;;
|
;;
|
||||||
;; How long to remember that a user is logged in before requiring relogin (in days)
|
;; How long to remember that a user is logged in before requiring relogin (in days)
|
||||||
;LOGIN_REMEMBER_DAYS = 7
|
;LOGIN_REMEMBER_DAYS = 7
|
||||||
|
@ -402,10 +376,9 @@ INTERNAL_TOKEN=
|
||||||
;; Name of cookie used to store authentication information.
|
;; Name of cookie used to store authentication information.
|
||||||
;COOKIE_REMEMBER_NAME = gitea_incredible
|
;COOKIE_REMEMBER_NAME = gitea_incredible
|
||||||
;;
|
;;
|
||||||
;; Reverse proxy authentication header name of user name, email, and full name
|
;; Reverse proxy authentication header name of user name and email
|
||||||
;REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
|
;REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
|
||||||
;REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL
|
;REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL
|
||||||
;REVERSE_PROXY_AUTHENTICATION_FULL_NAME = X-WEBAUTH-FULLNAME
|
|
||||||
;;
|
;;
|
||||||
;; Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request
|
;; Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request
|
||||||
;REVERSE_PROXY_LIMIT = 1
|
;REVERSE_PROXY_LIMIT = 1
|
||||||
|
@ -502,6 +475,20 @@ ENABLE = true
|
||||||
;; Maximum length of oauth2 token/cookie stored on server
|
;; Maximum length of oauth2 token/cookie stored on server
|
||||||
;MAX_TOKEN_LENGTH = 32767
|
;MAX_TOKEN_LENGTH = 32767
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
[U2F]
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;
|
||||||
|
;; NOTE: THE DEFAULT VALUES HERE WILL NEED TO BE CHANGED
|
||||||
|
;; Two Factor authentication with security keys
|
||||||
|
;; https://developers.yubico.com/U2F/App_ID.html
|
||||||
|
;;
|
||||||
|
;; DEPRECATED - this only applies to previously registered security keys using the U2F standard
|
||||||
|
APP_ID = ; e.g. http://localhost:3000/
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
[log]
|
[log]
|
||||||
|
@ -658,7 +645,6 @@ ROUTER = console
|
||||||
;GC_ARGS =
|
;GC_ARGS =
|
||||||
;;
|
;;
|
||||||
;; If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1
|
;; If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1
|
||||||
;; To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file.
|
|
||||||
;ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
|
;ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
|
||||||
;;
|
;;
|
||||||
;; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
|
;; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
|
||||||
|
@ -720,16 +706,13 @@ ROUTER = console
|
||||||
;ENABLE_REVERSE_PROXY_AUTHENTICATION = false
|
;ENABLE_REVERSE_PROXY_AUTHENTICATION = false
|
||||||
;ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
|
;ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
|
||||||
;ENABLE_REVERSE_PROXY_EMAIL = false
|
;ENABLE_REVERSE_PROXY_EMAIL = false
|
||||||
;ENABLE_REVERSE_PROXY_FULL_NAME = false
|
|
||||||
;;
|
;;
|
||||||
;; Enable captcha validation for registration
|
;; Enable captcha validation for registration
|
||||||
;ENABLE_CAPTCHA = false
|
;ENABLE_CAPTCHA = false
|
||||||
;;
|
;;
|
||||||
;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha, mcaptcha.
|
;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha
|
||||||
;CAPTCHA_TYPE = image
|
;CAPTCHA_TYPE = image
|
||||||
;;
|
;;
|
||||||
;; Change this to use recaptcha.net or other recaptcha service
|
|
||||||
;RECAPTCHA_URL = https://www.google.com/recaptcha/
|
|
||||||
;; Enable recaptcha to use Google's recaptcha service
|
;; Enable recaptcha to use Google's recaptcha service
|
||||||
;; Go to https://www.google.com/recaptcha/admin to sign up for a key
|
;; Go to https://www.google.com/recaptcha/admin to sign up for a key
|
||||||
;RECAPTCHA_SECRET =
|
;RECAPTCHA_SECRET =
|
||||||
|
@ -739,13 +722,8 @@ ROUTER = console
|
||||||
;HCAPTCHA_SECRET =
|
;HCAPTCHA_SECRET =
|
||||||
;HCAPTCHA_SITEKEY =
|
;HCAPTCHA_SITEKEY =
|
||||||
;;
|
;;
|
||||||
;; Change this to use demo.mcaptcha.org or your self-hosted mcaptcha.org instance.
|
;; Change this to use recaptcha.net or other recaptcha service
|
||||||
;MCAPTCHA_URL = https://demo.mcaptcha.org
|
;RECAPTCHA_URL = https://www.google.com/recaptcha/
|
||||||
;;
|
|
||||||
;; Go to your configured mCaptcha instance and register a sitekey
|
|
||||||
;; and use your account's secret.
|
|
||||||
;MCAPTCHA_SECRET =
|
|
||||||
;MCAPTCHA_SITEKEY =
|
|
||||||
;;
|
;;
|
||||||
;; Default value for KeepEmailPrivate
|
;; Default value for KeepEmailPrivate
|
||||||
;; Each new user will get the value of this setting copied into their profile
|
;; Each new user will get the value of this setting copied into their profile
|
||||||
|
@ -887,7 +865,7 @@ ROUTER = console
|
||||||
;USE_COMPAT_SSH_URI = false
|
;USE_COMPAT_SSH_URI = false
|
||||||
;;
|
;;
|
||||||
;; Close issues as long as a commit on any branch marks it as fixed
|
;; Close issues as long as a commit on any branch marks it as fixed
|
||||||
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects
|
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki
|
||||||
;DISABLED_REPO_UNITS =
|
;DISABLED_REPO_UNITS =
|
||||||
;;
|
;;
|
||||||
;; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects.
|
;; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects.
|
||||||
|
@ -996,9 +974,6 @@ ROUTER = console
|
||||||
;;
|
;;
|
||||||
;; Add co-authored-by and co-committed-by trailers if committer does not match author
|
;; Add co-authored-by and co-committed-by trailers if committer does not match author
|
||||||
;ADD_CO_COMMITTER_TRAILERS = true
|
;ADD_CO_COMMITTER_TRAILERS = true
|
||||||
;;
|
|
||||||
;; In addition to testing patches using the three-way merge method, re-test conflicting patches with git apply
|
|
||||||
;TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY = true
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -1120,7 +1095,7 @@ ROUTER = console
|
||||||
;EXPLORE_PAGING_NUM = 20
|
;EXPLORE_PAGING_NUM = 20
|
||||||
;;
|
;;
|
||||||
;; Number of issues that are displayed on one page
|
;; Number of issues that are displayed on one page
|
||||||
;ISSUE_PAGING_NUM = 20
|
;ISSUE_PAGING_NUM = 10
|
||||||
;;
|
;;
|
||||||
;; Number of maximum commits displayed in one activity feed
|
;; Number of maximum commits displayed in one activity feed
|
||||||
;FEED_MAX_COMMIT_NUM = 5
|
;FEED_MAX_COMMIT_NUM = 5
|
||||||
|
@ -1128,9 +1103,6 @@ ROUTER = console
|
||||||
;; Number of items that are displayed in home feed
|
;; Number of items that are displayed in home feed
|
||||||
;FEED_PAGING_NUM = 20
|
;FEED_PAGING_NUM = 20
|
||||||
;;
|
;;
|
||||||
;; Number of items that are displayed in a single subsitemap
|
|
||||||
;SITEMAP_PAGING_NUM = 20
|
|
||||||
;;
|
|
||||||
;; Number of maximum commits displayed in commit graph.
|
;; Number of maximum commits displayed in commit graph.
|
||||||
;GRAPH_MAX_COMMIT_NUM = 100
|
;GRAPH_MAX_COMMIT_NUM = 100
|
||||||
;;
|
;;
|
||||||
|
@ -1172,10 +1144,6 @@ ROUTER = console
|
||||||
;;
|
;;
|
||||||
;; Whether to enable a Service Worker to cache frontend assets
|
;; Whether to enable a Service Worker to cache frontend assets
|
||||||
;USE_SERVICE_WORKER = false
|
;USE_SERVICE_WORKER = false
|
||||||
;;
|
|
||||||
;; Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.
|
|
||||||
;; A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic).
|
|
||||||
;ONLY_SHOW_RELEVANT_REPOS = false
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -1270,9 +1238,6 @@ ROUTER = console
|
||||||
;; List of file extensions that should be rendered/edited as Markdown
|
;; List of file extensions that should be rendered/edited as Markdown
|
||||||
;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma
|
;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma
|
||||||
;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
|
;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
|
||||||
;;
|
|
||||||
;; Enables math inline and block detection
|
|
||||||
;ENABLE_MATH = true
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -1540,11 +1505,6 @@ ROUTER = console
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; NOTICE: this section is for Gitea 1.18 and later. If you are using Gitea 1.17 or older,
|
|
||||||
;; please refer to
|
|
||||||
;; https://github.com/go-gitea/gitea/blob/release/v1.17/custom/conf/app.example.ini
|
|
||||||
;; https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md
|
|
||||||
;;
|
|
||||||
;ENABLED = false
|
;ENABLED = false
|
||||||
;;
|
;;
|
||||||
;; Buffer length of channel, keep it as it is if you don't know what it is.
|
;; Buffer length of channel, keep it as it is if you don't know what it is.
|
||||||
|
@ -1553,42 +1513,30 @@ ROUTER = console
|
||||||
;; Prefix displayed before subject in mail
|
;; Prefix displayed before subject in mail
|
||||||
;SUBJECT_PREFIX =
|
;SUBJECT_PREFIX =
|
||||||
;;
|
;;
|
||||||
;; Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy".
|
;; Mail server
|
||||||
;; - sendmail: use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
|
;; Gmail: smtp.gmail.com:587
|
||||||
;; - dummy: send email messages to the log as a testing phase.
|
;; QQ: smtp.qq.com:465
|
||||||
;; If your provider does not explicitly say which protocol it uses but does provide a port,
|
;; As per RFC 8314 using Implicit TLS/SMTPS on port 465 (if supported) is recommended,
|
||||||
;; you can set SMTP_PORT instead and this will be inferred.
|
;; otherwise STARTTLS on port 587 should be used.
|
||||||
;; (Before 1.18, see the notice, this was controlled via MAILER_TYPE and IS_TLS_ENABLED.)
|
;HOST =
|
||||||
;PROTOCOL =
|
|
||||||
;;
|
;;
|
||||||
;; Mail server address, e.g. smtp.gmail.com.
|
;; Disable HELO operation when hostnames are different.
|
||||||
;; For smtp+unix, this should be a path to a unix socket instead.
|
;DISABLE_HELO =
|
||||||
;; (Before 1.18, see the notice, this was combined with SMTP_PORT as HOST.)
|
|
||||||
;SMTP_ADDR =
|
|
||||||
;;
|
;;
|
||||||
;; Mail server port. Common ports are:
|
;; Custom hostname for HELO operation, if no value is provided, one is retrieved from system.
|
||||||
;; 25: insecure SMTP
|
|
||||||
;; 465: SMTP Secure
|
|
||||||
;; 587: StartTLS
|
|
||||||
;; If no protocol is specified, it will be inferred by this setting.
|
|
||||||
;; (Before 1.18, this was combined with SMTP_ADDR as HOST.)
|
|
||||||
;SMTP_PORT =
|
|
||||||
;;
|
|
||||||
;; Enable HELO operation. Defaults to true.
|
|
||||||
;ENABLE_HELO = true
|
|
||||||
;;
|
|
||||||
;; Custom hostname for HELO operation.
|
|
||||||
;; If no value is provided, one is retrieved from system.
|
|
||||||
;HELO_HOSTNAME =
|
;HELO_HOSTNAME =
|
||||||
;;
|
;;
|
||||||
;; If set to `true`, completely ignores server certificate validation errors.
|
;; Whether or not to skip verification of certificates; `true` to disable verification. This option is unsafe. Consider adding the certificate to the system trust store instead.
|
||||||
;; This option is unsafe. Consider adding the certificate to the system trust store instead.
|
;SKIP_VERIFY = false
|
||||||
;FORCE_TRUST_SERVER_CERT = false
|
|
||||||
;;
|
;;
|
||||||
;; Use client certificate in connection.
|
;; Use client certificate
|
||||||
;USE_CLIENT_CERT = false
|
;USE_CERTIFICATE = false
|
||||||
;CLIENT_CERT_FILE = custom/mailer/cert.pem
|
;CERT_FILE = custom/mailer/cert.pem
|
||||||
;CLIENT_KEY_FILE = custom/mailer/key.pem
|
;KEY_FILE = custom/mailer/key.pem
|
||||||
|
;;
|
||||||
|
;; Should SMTP connect with TLS, (if port ends with 465 TLS will always be used.)
|
||||||
|
;; If this is false but STARTTLS is supported the connection will be upgraded to TLS opportunistically.
|
||||||
|
;IS_TLS_ENABLED = false
|
||||||
;;
|
;;
|
||||||
;; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
|
;; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
|
||||||
;FROM =
|
;FROM =
|
||||||
|
@ -1596,15 +1544,19 @@ ROUTER = console
|
||||||
;; Sometimes it is helpful to use a different address on the envelope. Set this to use ENVELOPE_FROM as the from on the envelope. Set to `<>` to send an empty address.
|
;; Sometimes it is helpful to use a different address on the envelope. Set this to use ENVELOPE_FROM as the from on the envelope. Set to `<>` to send an empty address.
|
||||||
;ENVELOPE_FROM =
|
;ENVELOPE_FROM =
|
||||||
;;
|
;;
|
||||||
;; Mailer user name and password, if required by provider.
|
;; Mailer user name and password
|
||||||
|
;; Please Note: Authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via STARTTLS) or `HOST=localhost`.
|
||||||
;USER =
|
;USER =
|
||||||
;;
|
;;
|
||||||
;; Use PASSWD = `your password` for quoting if you use special characters in the password.
|
;; Use PASSWD = `your password` for quoting if you use special characters in the password.
|
||||||
;PASSWD =
|
;PASSWD =
|
||||||
;;
|
;;
|
||||||
;; Send mails only in plain text, without HTML alternative
|
;; Send mails as plain text
|
||||||
;SEND_AS_PLAIN_TEXT = false
|
;SEND_AS_PLAIN_TEXT = false
|
||||||
;;
|
;;
|
||||||
|
;; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log)
|
||||||
|
;MAILER_TYPE = smtp
|
||||||
|
;;
|
||||||
;; Specify an alternative sendmail binary
|
;; Specify an alternative sendmail binary
|
||||||
;SENDMAIL_PATH = sendmail
|
;SENDMAIL_PATH = sendmail
|
||||||
;;
|
;;
|
||||||
|
@ -2161,7 +2113,7 @@ ROUTER = console
|
||||||
;[api]
|
;[api]
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Enables the API documentation endpoints (/api/swagger, /api/v1/swagger, …). True or false.
|
;; Enables Swagger. True or false; default is true.
|
||||||
;ENABLE_SWAGGER = true
|
;ENABLE_SWAGGER = true
|
||||||
;; Max number of items in a page
|
;; Max number of items in a page
|
||||||
;MAX_RESPONSE_ITEMS = 50
|
;MAX_RESPONSE_ITEMS = 50
|
||||||
|
@ -2169,7 +2121,7 @@ ROUTER = console
|
||||||
;DEFAULT_PAGING_NUM = 30
|
;DEFAULT_PAGING_NUM = 30
|
||||||
;; Default and maximum number of items per page for git trees api
|
;; Default and maximum number of items per page for git trees api
|
||||||
;DEFAULT_GIT_TREES_PER_PAGE = 1000
|
;DEFAULT_GIT_TREES_PER_PAGE = 1000
|
||||||
;; Default max size of a blob returned by the blobs API (default is 10MiB)
|
;; Default size of a blob returned by the blobs API (default is 10MiB)
|
||||||
;DEFAULT_MAX_BLOB_SIZE = 10485760
|
;DEFAULT_MAX_BLOB_SIZE = 10485760
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -2178,7 +2130,7 @@ ROUTER = console
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
|
;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
|
||||||
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
|
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
|
||||||
;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം
|
;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -2285,16 +2237,13 @@ ROUTER = console
|
||||||
;;
|
;;
|
||||||
;; Allowed domains for migrating, default is blank. Blank means everything will be allowed.
|
;; Allowed domains for migrating, default is blank. Blank means everything will be allowed.
|
||||||
;; Multiple domains could be separated by commas.
|
;; Multiple domains could be separated by commas.
|
||||||
;; Wildcard is supported: "github.com, *.github.com"
|
|
||||||
;ALLOWED_DOMAINS =
|
;ALLOWED_DOMAINS =
|
||||||
;;
|
;;
|
||||||
;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas.
|
;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas.
|
||||||
;; When ALLOWED_DOMAINS is not blank, this option has a higher priority to deny domains.
|
;; When ALLOWED_DOMAINS is not blank, this option has a higher priority to deny domains.
|
||||||
;; Wildcard is supported.
|
|
||||||
;BLOCKED_DOMAINS =
|
;BLOCKED_DOMAINS =
|
||||||
;;
|
;;
|
||||||
;; Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 (false by default)
|
;; Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 (false by default)
|
||||||
;; If a domain is allowed by ALLOWED_DOMAINS, this option will be ignored.
|
|
||||||
;ALLOW_LOCALNETWORKS = false
|
;ALLOW_LOCALNETWORKS = false
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -2308,23 +2257,6 @@ ROUTER = console
|
||||||
;;
|
;;
|
||||||
;; Enable/Disable user statistics for nodeinfo if federation is enabled
|
;; Enable/Disable user statistics for nodeinfo if federation is enabled
|
||||||
;SHARE_USER_STATISTICS = true
|
;SHARE_USER_STATISTICS = true
|
||||||
;;
|
|
||||||
;; Maximum federation request and response size (MB)
|
|
||||||
;MAX_SIZE = 4
|
|
||||||
;;
|
|
||||||
;; WARNING: Changing the settings below can break federation.
|
|
||||||
;;
|
|
||||||
;; HTTP signature algorithms
|
|
||||||
;ALGORITHMS = rsa-sha256, rsa-sha512, ed25519
|
|
||||||
;;
|
|
||||||
;; HTTP signature digest algorithm
|
|
||||||
;DIGEST_ALGORITHM = SHA-256
|
|
||||||
;;
|
|
||||||
;; GET headers for federation requests
|
|
||||||
;GET_HEADERS = (request-target), Date
|
|
||||||
;;
|
|
||||||
;; POST headers for federation requests
|
|
||||||
;POST_HEADERS = (request-target), Date, Digest
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
3
docs/.gitignore
vendored
3
docs/.gitignore
vendored
|
@ -2,6 +2,3 @@ public/
|
||||||
templates/swagger/v1_json.tmpl
|
templates/swagger/v1_json.tmpl
|
||||||
themes/
|
themes/
|
||||||
resources/
|
resources/
|
||||||
|
|
||||||
# Temporary lock file while building
|
|
||||||
/.hugo_build.lock
|
|
||||||
|
|
|
@ -18,11 +18,10 @@ params:
|
||||||
description: Git with a cup of tea
|
description: Git with a cup of tea
|
||||||
author: The Gitea Authors
|
author: The Gitea Authors
|
||||||
website: https://docs.gitea.io
|
website: https://docs.gitea.io
|
||||||
version: 1.17.3
|
version: 1.16.8
|
||||||
minGoVersion: 1.18
|
minGoVersion: 1.18
|
||||||
goVersion: 1.19
|
goVersion: 1.18
|
||||||
minNodeVersion: 14
|
minNodeVersion: 14
|
||||||
search: nav
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
home:
|
home:
|
||||||
|
|
|
@ -30,6 +30,7 @@ see Git version of the server.
|
||||||
By default, clone filters are enabled, unless `DISABLE_PARTIAL_CLONE` under
|
By default, clone filters are enabled, unless `DISABLE_PARTIAL_CLONE` under
|
||||||
`[git]` is set to `true`.
|
`[git]` is set to `true`.
|
||||||
|
|
||||||
|
|
||||||
See [GitHub blog post: Get up to speed with partial clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)
|
See [GitHub blog post: Get up to speed with partial clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)
|
||||||
for common use cases of clone filters (blobless and treeless clones), and
|
for common use cases of clone filters (blobless and treeless clones), and
|
||||||
[GitLab docs for partial clone](https://docs.gitlab.com/ee/topics/git/partial_clone.html)
|
[GitLab docs for partial clone](https://docs.gitlab.com/ee/topics/git/partial_clone.html)
|
||||||
|
|
|
@ -101,7 +101,6 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
||||||
- `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: In default merge messages only include approvers who are officially allowed to review.
|
- `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: In default merge messages only include approvers who are officially allowed to review.
|
||||||
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request.
|
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request.
|
||||||
- `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author.
|
- `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author.
|
||||||
- `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`: **true**: PR patches are tested using a three-way merge method to discover if there are conflicts. If this setting is set to **true**, conflicting patches will be retested using `git apply` - This was the previous behaviour in 1.18 (and earlier) but is somewhat inefficient. Please report if you find that this setting is required.
|
|
||||||
|
|
||||||
### Repository - Issue (`repository.issue`)
|
### Repository - Issue (`repository.issue`)
|
||||||
|
|
||||||
|
@ -154,7 +153,6 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
||||||
Configuration for set the expected MIME type based on file extensions of downloadable files. Configuration presents in key-value pairs and file extensions starts with leading `.`.
|
Configuration for set the expected MIME type based on file extensions of downloadable files. Configuration presents in key-value pairs and file extensions starts with leading `.`.
|
||||||
|
|
||||||
The following configuration set `Content-Type: application/vnd.android.package-archive` header when downloading files with `.apk` file extension.
|
The following configuration set `Content-Type: application/vnd.android.package-archive` header when downloading files with `.apk` file extension.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
.apk=application/vnd.android.package-archive
|
.apk=application/vnd.android.package-archive
|
||||||
```
|
```
|
||||||
|
@ -173,11 +171,10 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||||
## UI (`ui`)
|
## UI (`ui`)
|
||||||
|
|
||||||
- `EXPLORE_PAGING_NUM`: **20**: Number of repositories that are shown in one explore page.
|
- `EXPLORE_PAGING_NUM`: **20**: Number of repositories that are shown in one explore page.
|
||||||
- `ISSUE_PAGING_NUM`: **20**: Number of issues that are shown in one page (for all pages that list issues, milestones, projects).
|
- `ISSUE_PAGING_NUM`: **10**: Number of issues that are shown in one page (for all pages that list issues).
|
||||||
- `MEMBERS_PAGING_NUM`: **20**: Number of members that are shown in organization members.
|
- `MEMBERS_PAGING_NUM`: **20**: Number of members that are shown in organization members.
|
||||||
- `FEED_MAX_COMMIT_NUM`: **5**: Number of maximum commits shown in one activity feed.
|
- `FEED_MAX_COMMIT_NUM`: **5**: Number of maximum commits shown in one activity feed.
|
||||||
- `FEED_PAGING_NUM`: **20**: Number of items that are displayed in home feed.
|
- `FEED_PAGING_NUM`: **20**: Number of items that are displayed in home feed.
|
||||||
- `SITEMAP_PAGING_NUM`: **20**: Number of items that are displayed in a single subsitemap.
|
|
||||||
- `GRAPH_MAX_COMMIT_NUM`: **100**: Number of maximum commits shown in the commit graph.
|
- `GRAPH_MAX_COMMIT_NUM`: **100**: Number of maximum commits shown in the commit graph.
|
||||||
- `CODE_COMMENT_LINES`: **4**: Number of line of codes shown for a code comment.
|
- `CODE_COMMENT_LINES`: **4**: Number of line of codes shown for a code comment.
|
||||||
- `DEFAULT_THEME`: **auto**: \[auto, gitea, arc-green\]: Set the default theme for the Gitea install.
|
- `DEFAULT_THEME`: **auto**: \[auto, gitea, arc-green\]: Set the default theme for the Gitea install.
|
||||||
|
@ -195,8 +192,6 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||||
- `DEFAULT_SHOW_FULL_NAME`: **false**: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
|
- `DEFAULT_SHOW_FULL_NAME`: **false**: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
|
||||||
- `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page.
|
- `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page.
|
||||||
- `USE_SERVICE_WORKER`: **false**: Whether to enable a Service Worker to cache frontend assets.
|
- `USE_SERVICE_WORKER`: **false**: Whether to enable a Service Worker to cache frontend assets.
|
||||||
- `ONLY_SHOW_RELEVANT_REPOS`: **false** Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.
|
|
||||||
A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic).
|
|
||||||
|
|
||||||
### UI - Admin (`ui.admin`)
|
### UI - Admin (`ui.admin`)
|
||||||
|
|
||||||
|
@ -237,15 +232,10 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||||
- `CUSTOM_URL_SCHEMES`: Use a comma separated list (ftp,git,svn) to indicate additional
|
- `CUSTOM_URL_SCHEMES`: Use a comma separated list (ftp,git,svn) to indicate additional
|
||||||
URL hyperlinks to be rendered in Markdown. URLs beginning in http and https are
|
URL hyperlinks to be rendered in Markdown. URLs beginning in http and https are
|
||||||
always displayed
|
always displayed
|
||||||
- `ENABLE_MATH`: **true**: Enables detection of `\(...\)`, `\[...\]`, `$...$` and `$$...$$` blocks as math blocks.
|
|
||||||
|
|
||||||
## Server (`server`)
|
## Server (`server`)
|
||||||
|
|
||||||
- `PROTOCOL`: **http**: \[http, https, fcgi, http+unix, fcgi+unix\]
|
- `PROTOCOL`: **http**: \[http, https, fcgi, http+unix, fcgi+unix\]
|
||||||
- `USE_PROXY_PROTOCOL`: **false**: Expect PROXY protocol headers on connections
|
|
||||||
- `PROXY_PROTOCOL_TLS_BRIDGING`: **false**: When protocol is https, expect PROXY protocol headers after TLS negotiation.
|
|
||||||
- `PROXY_PROTOCOL_HEADER_TIMEOUT`: **5s**: Timeout to wait for PROXY protocol header (set to 0 to have no timeout)
|
|
||||||
- `PROXY_PROTOCOL_ACCEPT_UNKNOWN`: **false**: Accept PROXY protocol headers with Unknown type.
|
|
||||||
- `DOMAIN`: **localhost**: Domain name of this server.
|
- `DOMAIN`: **localhost**: Domain name of this server.
|
||||||
- `ROOT_URL`: **%(PROTOCOL)s://%(DOMAIN)s:%(HTTP\_PORT)s/**:
|
- `ROOT_URL`: **%(PROTOCOL)s://%(DOMAIN)s:%(HTTP\_PORT)s/**:
|
||||||
Overwrite the automatically generated public URL.
|
Overwrite the automatically generated public URL.
|
||||||
|
@ -270,15 +260,12 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||||
most cases you do not need to change the default value. Alter it only if
|
most cases you do not need to change the default value. Alter it only if
|
||||||
your SSH server node is not the same as HTTP node. Do not set this variable
|
your SSH server node is not the same as HTTP node. Do not set this variable
|
||||||
if `PROTOCOL` is set to `http+unix`.
|
if `PROTOCOL` is set to `http+unix`.
|
||||||
- `LOCAL_USE_PROXY_PROTOCOL`: **%(USE_PROXY_PROTOCOL)**: When making local connections pass the PROXY protocol header.
|
|
||||||
This should be set to false if the local connection will go through the proxy.
|
|
||||||
- `PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the connection. (Set to -1 to
|
- `PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the connection. (Set to -1 to
|
||||||
disable all timeouts.)
|
disable all timeouts.)
|
||||||
- `PER_WRITE_PER_KB_TIMEOUT`: **10s**: Timeout per Kb written to connections.
|
- `PER_WRITE_PER_KB_TIMEOUT`: **10s**: Timeout per Kb written to connections.
|
||||||
|
|
||||||
- `DISABLE_SSH`: **false**: Disable SSH feature when it's not available.
|
- `DISABLE_SSH`: **false**: Disable SSH feature when it's not available.
|
||||||
- `START_SSH_SERVER`: **false**: When enabled, use the built-in SSH server.
|
- `START_SSH_SERVER`: **false**: When enabled, use the built-in SSH server.
|
||||||
- `SSH_SERVER_USE_PROXY_PROTOCOL`: **false**: Expect PROXY protocol header on connections to the built-in SSH Server.
|
|
||||||
- `BUILTIN_SSH_SERVER_USER`: **%(RUN_USER)s**: Username to use for the built-in SSH Server.
|
- `BUILTIN_SSH_SERVER_USER`: **%(RUN_USER)s**: Username to use for the built-in SSH Server.
|
||||||
- `SSH_USER`: **%(BUILTIN_SSH_SERVER_USER)**: SSH username displayed in clone URLs. This is only for people who configure the SSH server themselves; in most cases, you want to leave this blank and modify the `BUILTIN_SSH_SERVER_USER`.
|
- `SSH_USER`: **%(BUILTIN_SSH_SERVER_USER)**: SSH username displayed in clone URLs. This is only for people who configure the SSH server themselves; in most cases, you want to leave this blank and modify the `BUILTIN_SSH_SERVER_USER`.
|
||||||
- `SSH_DOMAIN`: **%(DOMAIN)s**: Domain name of this server, used for displayed clone URL.
|
- `SSH_DOMAIN`: **%(DOMAIN)s**: Domain name of this server, used for displayed clone URL.
|
||||||
|
@ -307,13 +294,13 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||||
- `MINIMUM_KEY_SIZE_CHECK`: **true**: Indicate whether to check minimum key size with corresponding type.
|
- `MINIMUM_KEY_SIZE_CHECK`: **true**: Indicate whether to check minimum key size with corresponding type.
|
||||||
|
|
||||||
- `OFFLINE_MODE`: **false**: Disables use of CDN for static files and Gravatar for profile pictures.
|
- `OFFLINE_MODE`: **false**: Disables use of CDN for static files and Gravatar for profile pictures.
|
||||||
- `CERT_FILE`: **https/cert.pem**: Cert file path used for HTTPS. When chaining, the server certificate must come first, then intermediate CA certificates (if any). This is ignored if `ENABLE_ACME=true`. Paths are relative to `CUSTOM_PATH`.
|
- `CERT_FILE`: **https/cert.pem**: Cert file path used for HTTPS. When chaining, the server certificate must come first, then intermediate CA certificates (if any). This is ignored if `ENABLE_ACME=true`. From 1.11 paths are relative to `CUSTOM_PATH`.
|
||||||
- `KEY_FILE`: **https/key.pem**: Key file path used for HTTPS. This is ignored if `ENABLE_ACME=true`. Paths are relative to `CUSTOM_PATH`.
|
- `KEY_FILE`: **https/key.pem**: Key file path used for HTTPS. This is ignored if `ENABLE_ACME=true`. From 1.11 paths are relative to `CUSTOM_PATH`.
|
||||||
- `STATIC_ROOT_PATH`: **./**: Upper level of template and static files path.
|
- `STATIC_ROOT_PATH`: **./**: Upper level of template and static files path.
|
||||||
- `APP_DATA_PATH`: **data** (**/data/gitea** on docker): Default path for application data.
|
- `APP_DATA_PATH`: **data** (**/data/gitea** on docker): Default path for application data.
|
||||||
- `STATIC_CACHE_TIME`: **6h**: Web browser cache time for static resources on `custom/`, `public/` and all uploaded avatars. Note that this cache is disabled when `RUN_MODE` is "dev".
|
- `STATIC_CACHE_TIME`: **6h**: Web browser cache time for static resources on `custom/`, `public/` and all uploaded avatars. Note that this cache is disabled when `RUN_MODE` is "dev".
|
||||||
- `ENABLE_GZIP`: **false**: Enable gzip compression for runtime-generated content, static resources excluded.
|
- `ENABLE_GZIP`: **false**: Enable gzip compression for runtime-generated content, static resources excluded.
|
||||||
- `ENABLE_PPROF`: **false**: Application profiling (memory and cpu). For "web" command it listens on `localhost:6060`. For "serv" command it dumps to disk at `PPROF_DATA_PATH` as `(cpuprofile|memprofile)_<username>_<temporary id>`
|
- `ENABLE_PPROF`: **false**: Application profiling (memory and cpu). For "web" command it listens on localhost:6060. For "serv" command it dumps to disk at `PPROF_DATA_PATH` as `(cpuprofile|memprofile)_<username>_<temporary id>`
|
||||||
- `PPROF_DATA_PATH`: **data/tmp/pprof**: `PPROF_DATA_PATH`, use an absolute path when you start Gitea as service
|
- `PPROF_DATA_PATH`: **data/tmp/pprof**: `PPROF_DATA_PATH`, use an absolute path when you start Gitea as service
|
||||||
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login, **custom**\]. Where custom would instead be any URL such as "/org/repo" or even `https://anotherwebsite.com`
|
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login, **custom**\]. Where custom would instead be any URL such as "/org/repo" or even `https://anotherwebsite.com`
|
||||||
- `LFS_START_SERVER`: **false**: Enables Git LFS support.
|
- `LFS_START_SERVER`: **false**: Enables Git LFS support.
|
||||||
|
@ -324,7 +311,6 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||||
- `LFS_LOCKS_PAGING_NUM`: **50**: Maximum number of LFS Locks returned per page.
|
- `LFS_LOCKS_PAGING_NUM`: **50**: Maximum number of LFS Locks returned per page.
|
||||||
|
|
||||||
- `REDIRECT_OTHER_PORT`: **false**: If true and `PROTOCOL` is https, allows redirecting http requests on `PORT_TO_REDIRECT` to the https port Gitea listens on.
|
- `REDIRECT_OTHER_PORT`: **false**: If true and `PROTOCOL` is https, allows redirecting http requests on `PORT_TO_REDIRECT` to the https port Gitea listens on.
|
||||||
- `REDIRECTOR_USE_PROXY_PROTOCOL`: **%(USE_PROXY_PROTOCOL)**: expect PROXY protocol header on connections to https redirector.
|
|
||||||
- `PORT_TO_REDIRECT`: **80**: Port for the http redirection service to listen on. Used when `REDIRECT_OTHER_PORT` is true.
|
- `PORT_TO_REDIRECT`: **80**: Port for the http redirection service to listen on. Used when `REDIRECT_OTHER_PORT` is true.
|
||||||
- `SSL_MIN_VERSION`: **TLSv1.2**: Set the minimum version of ssl support.
|
- `SSL_MIN_VERSION`: **TLSv1.2**: Set the minimum version of ssl support.
|
||||||
- `SSL_MAX_VERSION`: **\<empty\>**: Set the maximum version of ssl support.
|
- `SSL_MAX_VERSION`: **\<empty\>**: Set the maximum version of ssl support.
|
||||||
|
@ -395,7 +381,6 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||||
- `verify-ca`: Enable TLS with verification of the database server certificate against its root certificate.
|
- `verify-ca`: Enable TLS with verification of the database server certificate against its root certificate.
|
||||||
- `verify-full`: Enable TLS and verify the database server name matches the given certificate in either the `Common Name` or `Subject Alternative Name` fields.
|
- `verify-full`: Enable TLS and verify the database server name matches the given certificate in either the `Common Name` or `Subject Alternative Name` fields.
|
||||||
- `SQLITE_TIMEOUT`: **500**: Query timeout for SQLite3 only.
|
- `SQLITE_TIMEOUT`: **500**: Query timeout for SQLite3 only.
|
||||||
- `SQLITE_JOURNAL_MODE`: **""**: Change journal mode for SQlite3. Can be used to enable [WAL mode](https://www.sqlite.org/wal.html) when high load causes write congestion. See [SQlite3 docs](https://www.sqlite.org/pragma.html#pragma_journal_mode) for possible values. Defaults to the default for the database file, often DELETE.
|
|
||||||
- `ITERATE_BUFFER_SIZE`: **50**: Internal buffer size for iterating.
|
- `ITERATE_BUFFER_SIZE`: **50**: Internal buffer size for iterating.
|
||||||
- `CHARSET`: **utf8mb4**: For MySQL only, either "utf8" or "utf8mb4". NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this.
|
- `CHARSET`: **utf8mb4**: For MySQL only, either "utf8" or "utf8mb4". NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this.
|
||||||
- `PATH`: **data/gitea.db**: For SQLite3 only, the database file path.
|
- `PATH`: **data/gitea.db**: For SQLite3 only, the database file path.
|
||||||
|
@ -450,11 +435,11 @@ Configuration at `[queue]` will set defaults for queues with overrides for indiv
|
||||||
- `MAX_ATTEMPTS`: **10**: Maximum number of attempts to create the wrapped queue
|
- `MAX_ATTEMPTS`: **10**: Maximum number of attempts to create the wrapped queue
|
||||||
- `TIMEOUT`: **GRACEFUL_HAMMER_TIME + 30s**: Timeout the creation of the wrapped queue if it takes longer than this to create.
|
- `TIMEOUT`: **GRACEFUL_HAMMER_TIME + 30s**: Timeout the creation of the wrapped queue if it takes longer than this to create.
|
||||||
- Queues by default come with a dynamically scaling worker pool. The following settings configure this:
|
- Queues by default come with a dynamically scaling worker pool. The following settings configure this:
|
||||||
- `WORKERS`: **0**: Number of initial workers for the queue.
|
- `WORKERS`: **0** (v1.14 and before: **1**): Number of initial workers for the queue.
|
||||||
- `MAX_WORKERS`: **10**: Maximum number of worker go-routines for the queue.
|
- `MAX_WORKERS`: **10**: Maximum number of worker go-routines for the queue.
|
||||||
- `BLOCK_TIMEOUT`: **1s**: If the queue blocks for this time, boost the number of workers - the `BLOCK_TIMEOUT` will then be doubled before boosting again whilst the boost is ongoing.
|
- `BLOCK_TIMEOUT`: **1s**: If the queue blocks for this time, boost the number of workers - the `BLOCK_TIMEOUT` will then be doubled before boosting again whilst the boost is ongoing.
|
||||||
- `BOOST_TIMEOUT`: **5m**: Boost workers will timeout after this long.
|
- `BOOST_TIMEOUT`: **5m**: Boost workers will timeout after this long.
|
||||||
- `BOOST_WORKERS`: **1**: This many workers will be added to the worker pool if there is a boost.
|
- `BOOST_WORKERS`: **1** (v1.14 and before: **5**): This many workers will be added to the worker pool if there is a boost.
|
||||||
|
|
||||||
Gitea creates the following non-unique queues:
|
Gitea creates the following non-unique queues:
|
||||||
|
|
||||||
|
@ -495,8 +480,7 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
|
||||||
## Security (`security`)
|
## Security (`security`)
|
||||||
|
|
||||||
- `INSTALL_LOCK`: **false**: Controls access to the installation page. When set to "true", the installation page is not accessible.
|
- `INSTALL_LOCK`: **false**: Controls access to the installation page. When set to "true", the installation page is not accessible.
|
||||||
- `SECRET_KEY`: **\<random at every install\>**: Global secret key. This key is VERY IMPORTANT, if you lost it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
|
- `SECRET_KEY`: **\<random at every install\>**: Global secret key. This should be changed.
|
||||||
- `SECRET_KEY_URI`: **<empty>**: Instead of defining SECRET_KEY, this option can be used to use the key stored in a file (example value: `file:/etc/gitea/secret_key`). It shouldn't be lost like SECRET_KEY.
|
|
||||||
- `LOGIN_REMEMBER_DAYS`: **7**: Cookie lifetime, in days.
|
- `LOGIN_REMEMBER_DAYS`: **7**: Cookie lifetime, in days.
|
||||||
- `COOKIE_USERNAME`: **gitea\_awesome**: Name of the cookie used to store the current username.
|
- `COOKIE_USERNAME`: **gitea\_awesome**: Name of the cookie used to store the current username.
|
||||||
- `COOKIE_REMEMBER_NAME`: **gitea\_incredible**: Name of cookie used to store authentication
|
- `COOKIE_REMEMBER_NAME`: **gitea\_incredible**: Name of cookie used to store authentication
|
||||||
|
@ -505,8 +489,6 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
|
||||||
authentication.
|
authentication.
|
||||||
- `REVERSE_PROXY_AUTHENTICATION_EMAIL`: **X-WEBAUTH-EMAIL**: Header name for reverse proxy
|
- `REVERSE_PROXY_AUTHENTICATION_EMAIL`: **X-WEBAUTH-EMAIL**: Header name for reverse proxy
|
||||||
authentication provided email.
|
authentication provided email.
|
||||||
- `REVERSE_PROXY_AUTHENTICATION_FULL_NAME`: **X-WEBAUTH-FULLNAME**: Header name for reverse proxy
|
|
||||||
authentication provided full name.
|
|
||||||
- `REVERSE_PROXY_LIMIT`: **1**: Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request.
|
- `REVERSE_PROXY_LIMIT`: **1**: Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request.
|
||||||
Number of trusted proxy count. Set to zero to not use these headers.
|
Number of trusted proxy count. Set to zero to not use these headers.
|
||||||
- `REVERSE_PROXY_TRUSTED_PROXIES`: **127.0.0.0/8,::1/128**: List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all.
|
- `REVERSE_PROXY_TRUSTED_PROXIES`: **127.0.0.0/8,::1/128**: List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all.
|
||||||
|
@ -522,7 +504,7 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
|
||||||
- `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to Gitea repositories you should set the environment appropriately.
|
- `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to Gitea repositories you should set the environment appropriately.
|
||||||
- `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server.
|
- `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server.
|
||||||
- `INTERNAL_TOKEN`: **\<random at every install if no uri set\>**: Secret used to validate communication within Gitea binary.
|
- `INTERNAL_TOKEN`: **\<random at every install if no uri set\>**: Secret used to validate communication within Gitea binary.
|
||||||
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
|
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
|
||||||
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others.
|
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others.
|
||||||
- `CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie.
|
- `CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie.
|
||||||
- `MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users.
|
- `MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users.
|
||||||
|
@ -538,9 +520,9 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
|
||||||
## Camo (`camo`)
|
## Camo (`camo`)
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable media proxy, we support images only at the moment.
|
- `ENABLED`: **false**: Enable media proxy, we support images only at the moment.
|
||||||
- `SERVER_URL`: **<empty>**: URL of camo server, it **is required** if camo is enabled.
|
- `SERVER_URL`: **<empty>**: url of camo server, it **is required** if camo is enabled.
|
||||||
- `HMAC_KEY`: **<empty>**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled.
|
- `HMAC_KEY`: **<empty>**: Provide the HMAC key for encoding urls, it **is required** if camo is enabled.
|
||||||
- `ALLWAYS`: **false**: Set to true to use camo for both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied
|
- `ALLWAYS`: **false**: Set to true to use camo for https too lese only non https urls are proxyed
|
||||||
|
|
||||||
## OpenID (`openid`)
|
## OpenID (`openid`)
|
||||||
|
|
||||||
|
@ -553,7 +535,7 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
|
||||||
|
|
||||||
## OAuth2 Client (`oauth2_client`)
|
## OAuth2 Client (`oauth2_client`)
|
||||||
|
|
||||||
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section)
|
- `REGISTER_EMAIL_CONFIRM`: *[service]* **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section)
|
||||||
- `OPENID_CONNECT_SCOPES`: **\<empty\>**: List of additional openid connect scopes. (`openid` is implicitly added)
|
- `OPENID_CONNECT_SCOPES`: **\<empty\>**: List of additional openid connect scopes. (`openid` is implicitly added)
|
||||||
- `ENABLE_AUTO_REGISTRATION`: **false**: Automatically create user accounts for new oauth2 users.
|
- `ENABLE_AUTO_REGISTRATION`: **false**: Automatically create user accounts for new oauth2 users.
|
||||||
- `USERNAME`: **nickname**: The source of the username for new oauth2 accounts:
|
- `USERNAME`: **nickname**: The source of the username for new oauth2 accounts:
|
||||||
|
@ -592,20 +574,15 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
|
||||||
for reverse authentication.
|
for reverse authentication.
|
||||||
- `ENABLE_REVERSE_PROXY_EMAIL`: **false**: Enable this to allow to auto-registration with a
|
- `ENABLE_REVERSE_PROXY_EMAIL`: **false**: Enable this to allow to auto-registration with a
|
||||||
provided email rather than a generated email.
|
provided email rather than a generated email.
|
||||||
- `ENABLE_REVERSE_PROXY_FULL_NAME`: **false**: Enable this to allow to auto-registration with a
|
|
||||||
provided full name for the user.
|
|
||||||
- `ENABLE_CAPTCHA`: **false**: Enable this to use captcha validation for registration.
|
- `ENABLE_CAPTCHA`: **false**: Enable this to use captcha validation for registration.
|
||||||
- `REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA`: **false**: Enable this to force captcha validation
|
- `REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA`: **false**: Enable this to force captcha validation
|
||||||
even for External Accounts (i.e. GitHub, OpenID Connect, etc). You also must enable `ENABLE_CAPTCHA`.
|
even for External Accounts (i.e. GitHub, OpenID Connect, etc). You must `ENABLE_CAPTCHA` also.
|
||||||
- `CAPTCHA_TYPE`: **image**: \[image, recaptcha, hcaptcha, mcaptcha\]
|
- `CAPTCHA_TYPE`: **image**: \[image, recaptcha, hcaptcha\]
|
||||||
- `RECAPTCHA_SECRET`: **""**: Go to https://www.google.com/recaptcha/admin to get a secret for recaptcha.
|
- `RECAPTCHA_SECRET`: **""**: Go to https://www.google.com/recaptcha/admin to get a secret for recaptcha.
|
||||||
- `RECAPTCHA_SITEKEY`: **""**: Go to https://www.google.com/recaptcha/admin to get a sitekey for recaptcha.
|
- `RECAPTCHA_SITEKEY`: **""**: Go to https://www.google.com/recaptcha/admin to get a sitekey for recaptcha.
|
||||||
- `RECAPTCHA_URL`: **https://www.google.com/recaptcha/**: Set the recaptcha url - allows the use of recaptcha net.
|
- `RECAPTCHA_URL`: **https://www.google.com/recaptcha/**: Set the recaptcha url - allows the use of recaptcha net.
|
||||||
- `HCAPTCHA_SECRET`: **""**: Sign up at https://www.hcaptcha.com/ to get a secret for hcaptcha.
|
- `HCAPTCHA_SECRET`: **""**: Sign up at https://www.hcaptcha.com/ to get a secret for hcaptcha.
|
||||||
- `HCAPTCHA_SITEKEY`: **""**: Sign up at https://www.hcaptcha.com/ to get a sitekey for hcaptcha.
|
- `HCAPTCHA_SITEKEY`: **""**: Sign up at https://www.hcaptcha.com/ to get a sitekey for hcaptcha.
|
||||||
- `MCAPTCHA_SECRET`: **""**: Go to your mCaptcha instance to get a secret for mCaptcha.
|
|
||||||
- `MCAPTCHA_SITEKEY`: **""**: Go to your mCaptcha instance to get a sitekey for mCaptcha.
|
|
||||||
- `MCAPTCHA_URL` **https://demo.mcaptcha.org/**: Set the mCaptcha URL.
|
|
||||||
- `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: By default set users to keep their email address private.
|
- `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: By default set users to keep their email address private.
|
||||||
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: Allow new users to create organizations by default.
|
- `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: Allow new users to create organizations by default.
|
||||||
- `DEFAULT_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default
|
- `DEFAULT_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default
|
||||||
|
@ -651,7 +628,7 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
|
||||||
|
|
||||||
- `QUEUE_LENGTH`: **1000**: Hook task queue length. Use caution when editing this value.
|
- `QUEUE_LENGTH`: **1000**: Hook task queue length. Use caution when editing this value.
|
||||||
- `DELIVER_TIMEOUT`: **5**: Delivery timeout (sec) for shooting webhooks.
|
- `DELIVER_TIMEOUT`: **5**: Delivery timeout (sec) for shooting webhooks.
|
||||||
- `ALLOWED_HOST_LIST`: **external**: Webhook can only call allowed hosts for security reasons. Comma separated list.
|
- `ALLOWED_HOST_LIST`: **external**: Since 1.15.7. Default to `*` for 1.15.x, `external` for 1.16 and later. Webhook can only call allowed hosts for security reasons. Comma separated list.
|
||||||
- Built-in networks:
|
- Built-in networks:
|
||||||
- `loopback`: 127.0.0.0/8 for IPv4 and ::1/128 for IPv6, localhost is included.
|
- `loopback`: 127.0.0.0/8 for IPv4 and ::1/128 for IPv6, localhost is included.
|
||||||
- `private`: RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and RFC 4193 (FC00::/7). Also called LAN/Intranet.
|
- `private`: RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and RFC 4193 (FC00::/7). Also called LAN/Intranet.
|
||||||
|
@ -666,42 +643,42 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
|
||||||
|
|
||||||
## Mailer (`mailer`)
|
## Mailer (`mailer`)
|
||||||
|
|
||||||
⚠️ This section is for Gitea 1.18 and later. If you are using Gitea 1.17 or older,
|
|
||||||
please refer to
|
|
||||||
[Gitea 1.17 app.ini example](https://github.com/go-gitea/gitea/blob/release/v1.17/custom/conf/app.example.ini)
|
|
||||||
and
|
|
||||||
[Gitea 1.17 configuration document](https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md)
|
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable to use a mail service.
|
- `ENABLED`: **false**: Enable to use a mail service.
|
||||||
- `PROTOCOL`: **\<empty\>**: Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy". _Before 1.18, this was inferred from a combination of `MAILER_TYPE` and `IS_TLS_ENABLED`._
|
- `DISABLE_HELO`: **\<empty\>**: Disable HELO operation.
|
||||||
- SMTP family, if your provider does not explicitly say which protocol it uses but does provide a port, you can set SMTP_PORT instead and this will be inferred.
|
- `HELO_HOSTNAME`: **\<empty\>**: Custom hostname for HELO operation.
|
||||||
- **sendmail** Use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
|
- `HOST`: **\<empty\>**: SMTP mail host address and port (example: smtp.gitea.io:587).
|
||||||
- **dummy** Send email messages to the log as a testing phase.
|
- As per RFC 8314, if supported, Implicit TLS/SMTPS on port 465 is recommended, otherwise opportunistic TLS via STARTTLS on port 587 should be used.
|
||||||
- Note that enabling sendmail will ignore all other `mailer` settings except `ENABLED`, `FROM`, `SUBJECT_PREFIX` and `SENDMAIL_PATH`.
|
- `IS_TLS_ENABLED` : **false** : Forcibly use TLS to connect even if not on a default SMTPS port.
|
||||||
- Enabling dummy will ignore all settings except `ENABLED`, `SUBJECT_PREFIX` and `FROM`.
|
- Note, if the port ends with `465` Implicit TLS/SMTPS/SMTP over TLS will be used despite this setting.
|
||||||
- `SMTP_ADDR`: **\<empty\>**: Mail server address. e.g. smtp.gmail.com. For smtp+unix, this should be a path to a unix socket instead. _Before 1.18, this was combined with `SMTP_PORT` under the name `HOST`._
|
- Otherwise if `IS_TLS_ENABLED=false` and the server supports `STARTTLS` this will be used. Thus if `STARTTLS` is preferred you should set `IS_TLS_ENABLED=false`.
|
||||||
- `SMTP_PORT`: **\<empty\>**: Mail server port. If no protocol is specified, it will be inferred by this setting. Common ports are listed below. _Before 1.18, this was combined with `SMTP_ADDR` under the name `HOST`._
|
- `FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or
|
||||||
- 25: insecure SMTP
|
the "Name" \<email@example.com\> format.
|
||||||
- 465: SMTP Secure
|
- `ENVELOPE_FROM`: **\<empty\>**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address.
|
||||||
- 587: StartTLS
|
|
||||||
- `USE_CLIENT_CERT`: **false**: Use client certificate for TLS/SSL.
|
|
||||||
- `CLIENT_CERT_FILE`: **custom/mailer/cert.pem**: Client certificate file.
|
|
||||||
- `CLIENT_KEY_FILE`: **custom/mailer/key.pem**: Client key file.
|
|
||||||
- `FORCE_TRUST_SERVER_CERT`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe. Consider adding the certificate to the system trust store instead.
|
|
||||||
- `USER`: **\<empty\>**: Username of mailing user (usually the sender's e-mail address).
|
- `USER`: **\<empty\>**: Username of mailing user (usually the sender's e-mail address).
|
||||||
- `PASSWD`: **\<empty\>**: Password of mailing user. Use \`your password\` for quoting if you use special characters in the password.
|
- `PASSWD`: **\<empty\>**: Password of mailing user. Use \`your password\` for quoting if you use special characters in the password.
|
||||||
- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or SMTP host is localhost. See [Email Setup]({{< relref "doc/usage/email-setup.en-us.md" >}}) for more information.
|
- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or `HOST=localhost`. See [Email Setup]({{< relref "doc/usage/email-setup.en-us.md" >}}) for more information.
|
||||||
- `ENABLE_HELO`: **true**: Enable HELO operation.
|
- `SEND_AS_PLAIN_TEXT`: **false**: Send mails as plain text.
|
||||||
- `HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname.
|
- `SKIP_VERIFY`: **false**: Whether or not to skip verification of certificates; `true` to disable verification.
|
||||||
- `FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \<email@example.com\> format.
|
- **Warning:** This option is unsafe. Consider adding the certificate to the system trust store instead.
|
||||||
- `ENVELOPE_FROM`: **\<empty\>**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address.
|
- **Note:** Gitea only supports SMTP with STARTTLS.
|
||||||
|
- `USE_CERTIFICATE`: **false**: Use client certificate.
|
||||||
|
- `CERT_FILE`: **custom/mailer/cert.pem**
|
||||||
|
- `KEY_FILE`: **custom/mailer/key.pem**
|
||||||
- `SUBJECT_PREFIX`: **\<empty\>**: Prefix to be placed before e-mail subject lines.
|
- `SUBJECT_PREFIX`: **\<empty\>**: Prefix to be placed before e-mail subject lines.
|
||||||
- `SENDMAIL_PATH`: **sendmail**: The location of sendmail on the operating system (can be command or full path).
|
- `MAILER_TYPE`: **smtp**: \[smtp, sendmail, dummy\]
|
||||||
- `SENDMAIL_ARGS`: **\<empty\>**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`)
|
- **smtp** Use SMTP to send mail
|
||||||
|
- **sendmail** Use the operating system's `sendmail` command instead of SMTP.
|
||||||
|
This is common on Linux systems.
|
||||||
|
- **dummy** Send email messages to the log as a testing phase.
|
||||||
|
- Note that enabling sendmail will ignore all other `mailer` settings except `ENABLED`,
|
||||||
|
`FROM`, `SUBJECT_PREFIX` and `SENDMAIL_PATH`.
|
||||||
|
- Enabling dummy will ignore all settings except `ENABLED`, `SUBJECT_PREFIX` and `FROM`.
|
||||||
|
- `SENDMAIL_PATH`: **sendmail**: The location of sendmail on the operating system (can be
|
||||||
|
command or full path).
|
||||||
|
- `SENDMAIL_ARGS`: **_empty_**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`)
|
||||||
- `SENDMAIL_TIMEOUT`: **5m**: default timeout for sending email through sendmail
|
- `SENDMAIL_TIMEOUT`: **5m**: default timeout for sending email through sendmail
|
||||||
- `SENDMAIL_CONVERT_CRLF`: **true**: Most versions of sendmail prefer LF line endings rather than CRLF line endings. Set this to false if your version of sendmail requires CRLF line endings.
|
- `SENDMAIL_CONVERT_CRLF`: **true**: Most versions of sendmail prefer LF line endings rather than CRLF line endings. Set this to false if your version of sendmail requires CRLF line endings.
|
||||||
- `SEND_BUFFER_LEN`: **100**: Buffer length of mailing queue. **DEPRECATED** use `LENGTH` in `[queue.mailer]`
|
- `SEND_BUFFER_LEN`: **100**: Buffer length of mailing queue. **DEPRECATED** use `LENGTH` in `[queue.mailer]`
|
||||||
- `SEND_AS_PLAIN_TEXT`: **false**: Send mails only in plain text, without HTML alternative.
|
|
||||||
|
|
||||||
## Cache (`cache`)
|
## Cache (`cache`)
|
||||||
|
|
||||||
|
@ -735,9 +712,9 @@ and
|
||||||
|
|
||||||
- `GRAVATAR_SOURCE`: **gravatar**: Can be `gravatar`, `duoshuo` or anything like
|
- `GRAVATAR_SOURCE`: **gravatar**: Can be `gravatar`, `duoshuo` or anything like
|
||||||
`http://cn.gravatar.com/avatar/`.
|
`http://cn.gravatar.com/avatar/`.
|
||||||
- `DISABLE_GRAVATAR`: **false**: Enable this to use local avatars only. **DEPRECATED [v1.18+]** moved to database. Use admin panel to configure.
|
- `DISABLE_GRAVATAR`: **false**: Enable this to use local avatars only.
|
||||||
- `ENABLE_FEDERATED_AVATAR`: **false**: Enable support for federated avatars (see
|
- `ENABLE_FEDERATED_AVATAR`: **false**: Enable support for federated avatars (see
|
||||||
[http://www.libravatar.org](http://www.libravatar.org)). **DEPRECATED [v1.18+]** moved to database. Use admin panel to configure.
|
[http://www.libravatar.org](http://www.libravatar.org)).
|
||||||
|
|
||||||
- `AVATAR_STORAGE_TYPE`: **default**: Storage type defined in `[storage.xxx]`. Default is `default` which will read `[storage]` if no section `[storage]` will be a type `local`.
|
- `AVATAR_STORAGE_TYPE`: **default**: Storage type defined in `[storage.xxx]`. Default is `default` which will read `[storage]` if no section `[storage]` will be a type `local`.
|
||||||
- `AVATAR_UPLOAD_PATH`: **data/avatars**: Path to store user avatar image files.
|
- `AVATAR_UPLOAD_PATH`: **data/avatars**: Path to store user avatar image files.
|
||||||
|
@ -754,6 +731,7 @@ and
|
||||||
- image = default image will be used (which is set in `REPOSITORY_AVATAR_FALLBACK_IMAGE`)
|
- image = default image will be used (which is set in `REPOSITORY_AVATAR_FALLBACK_IMAGE`)
|
||||||
- `REPOSITORY_AVATAR_FALLBACK_IMAGE`: **/img/repo_default.png**: Image used as default repository avatar (if `REPOSITORY_AVATAR_FALLBACK` is set to image and none was uploaded)
|
- `REPOSITORY_AVATAR_FALLBACK_IMAGE`: **/img/repo_default.png**: Image used as default repository avatar (if `REPOSITORY_AVATAR_FALLBACK` is set to image and none was uploaded)
|
||||||
|
|
||||||
|
|
||||||
## Project (`project`)
|
## Project (`project`)
|
||||||
|
|
||||||
Default templates for project boards:
|
Default templates for project boards:
|
||||||
|
@ -788,13 +766,11 @@ Default templates for project boards:
|
||||||
- `ENABLE_XORM_LOG`: **true**: Set whether to perform XORM logging. Please note SQL statement logging can be disabled by setting `LOG_SQL` to false in the `[database]` section.
|
- `ENABLE_XORM_LOG`: **true**: Set whether to perform XORM logging. Please note SQL statement logging can be disabled by setting `LOG_SQL` to false in the `[database]` section.
|
||||||
|
|
||||||
### Router Log (`log`)
|
### Router Log (`log`)
|
||||||
|
|
||||||
- `DISABLE_ROUTER_LOG`: **false**: Mute printing of the router log.
|
- `DISABLE_ROUTER_LOG`: **false**: Mute printing of the router log.
|
||||||
- `ROUTER`: **console**: The mode or name of the log the router should log to. (If you set this to `,` it will log to default Gitea logger.)
|
- `ROUTER`: **console**: The mode or name of the log the router should log to. (If you set this to `,` it will log to default Gitea logger.)
|
||||||
NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`.
|
NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`.
|
||||||
|
|
||||||
### Access Log (`log`)
|
### Access Log (`log`)
|
||||||
|
|
||||||
- `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template
|
- `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template
|
||||||
- `ACCESS`: **file**: Logging mode for the access logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.access\]`. By default the file mode will log to `$ROOT_PATH/access.log`. (If you set this to `,` it will log to the default Gitea logger.)
|
- `ACCESS`: **file**: Logging mode for the access logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.access\]`. By default the file mode will log to `$ROOT_PATH/access.log`. (If you set this to `,` it will log to the default Gitea logger.)
|
||||||
- `ACCESS_LOG_TEMPLATE`: **`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**: Sets the template used to create the access log.
|
- `ACCESS_LOG_TEMPLATE`: **`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**: Sets the template used to create the access log.
|
||||||
|
@ -854,7 +830,7 @@ Default templates for project boards:
|
||||||
- `SCHEDULE` accept formats
|
- `SCHEDULE` accept formats
|
||||||
- Full crontab specs, e.g. `* * * * * ?`
|
- Full crontab specs, e.g. `* * * * * ?`
|
||||||
- Descriptors, e.g. `@midnight`, `@every 1h30m` ...
|
- Descriptors, e.g. `@midnight`, `@every 1h30m` ...
|
||||||
- See more: [cron documentation](https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14)
|
- See more: [cron decument](https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14)
|
||||||
|
|
||||||
### Basic cron tasks - enabled by default
|
### Basic cron tasks - enabled by default
|
||||||
|
|
||||||
|
@ -911,7 +887,6 @@ Default templates for project boards:
|
||||||
### Extended cron tasks (not enabled by default)
|
### Extended cron tasks (not enabled by default)
|
||||||
|
|
||||||
#### Cron - Garbage collect all repositories ('cron.git_gc_repos')
|
#### Cron - Garbage collect all repositories ('cron.git_gc_repos')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
||||||
|
@ -920,42 +895,36 @@ Default templates for project boards:
|
||||||
- `ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. The default value is same with [git] -> GC_ARGS
|
- `ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. The default value is same with [git] -> GC_ARGS
|
||||||
|
|
||||||
#### Cron - Update the '.ssh/authorized_keys' file with Gitea SSH keys ('cron.resync_all_sshkeys')
|
#### Cron - Update the '.ssh/authorized_keys' file with Gitea SSH keys ('cron.resync_all_sshkeys')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
||||||
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
||||||
|
|
||||||
#### Cron - Resynchronize pre-receive, update and post-receive hooks of all repositories ('cron.resync_all_hooks')
|
#### Cron - Resynchronize pre-receive, update and post-receive hooks of all repositories ('cron.resync_all_hooks')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
||||||
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
||||||
|
|
||||||
#### Cron - Reinitialize all missing Git repositories for which records exist ('cron.reinit_missing_repos')
|
#### Cron - Reinitialize all missing Git repositories for which records exist ('cron.reinit_missing_repos')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
||||||
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
||||||
|
|
||||||
#### Cron - Delete all repositories missing their Git files ('cron.delete_missing_repos')
|
#### Cron - Delete all repositories missing their Git files ('cron.delete_missing_repos')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
||||||
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
||||||
|
|
||||||
#### Cron - Delete generated repository avatars ('cron.delete_generated_repository_avatars')
|
#### Cron - Delete generated repository avatars ('cron.delete_generated_repository_avatars')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
||||||
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
- `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`.
|
||||||
|
|
||||||
#### Cron - Delete all old actions from database ('cron.delete_old_actions')
|
#### Cron - Delete all old actions from database ('cron.delete_old_actions')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
||||||
|
@ -963,7 +932,6 @@ Default templates for project boards:
|
||||||
- `OLDER_THAN`: **@every 8760h**: any action older than this expression will be deleted from database, suggest using `8760h` (1 year) because that's the max length of heatmap.
|
- `OLDER_THAN`: **@every 8760h**: any action older than this expression will be deleted from database, suggest using `8760h` (1 year) because that's the max length of heatmap.
|
||||||
|
|
||||||
#### Cron - Check for new Gitea versions ('cron.update_checker')
|
#### Cron - Check for new Gitea versions ('cron.update_checker')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `ENABLE_SUCCESS_NOTICE`: **true**: Set to false to switch off success notices.
|
- `ENABLE_SUCCESS_NOTICE`: **true**: Set to false to switch off success notices.
|
||||||
|
@ -971,7 +939,6 @@ Default templates for project boards:
|
||||||
- `HTTP_ENDPOINT`: **https://dl.gitea.io/gitea/version.json**: the endpoint that Gitea will check for newer versions
|
- `HTTP_ENDPOINT`: **https://dl.gitea.io/gitea/version.json**: the endpoint that Gitea will check for newer versions
|
||||||
|
|
||||||
#### Cron - Delete all old system notices from database ('cron.delete_old_system_notices')
|
#### Cron - Delete all old system notices from database ('cron.delete_old_system_notices')
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable service.
|
- `ENABLED`: **false**: Enable service.
|
||||||
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
|
||||||
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
|
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices.
|
||||||
|
@ -990,8 +957,7 @@ Default templates for project boards:
|
||||||
- `COMMITS_RANGE_SIZE`: **50**: Set the default commits range size
|
- `COMMITS_RANGE_SIZE`: **50**: Set the default commits range size
|
||||||
- `BRANCHES_RANGE_SIZE`: **20**: Set the default branches range size
|
- `BRANCHES_RANGE_SIZE`: **20**: Set the default branches range size
|
||||||
- `GC_ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/
|
- `GC_ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/
|
||||||
- `ENABLE_AUTO_GIT_WIRE_PROTOCOL`: **true**: If use Git wire protocol version 2 when Git version >= 2.18, default is true, set to false when you always want Git wire protocol version 1.
|
- `ENABLE_AUTO_GIT_WIRE_PROTOCOL`: **true**: If use Git wire protocol version 2 when Git version >= 2.18, default is true, set to false when you always want Git wire protocol version 1
|
||||||
To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file.
|
|
||||||
- `PULL_REQUEST_PUSH_MESSAGE`: **true**: Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
|
- `PULL_REQUEST_PUSH_MESSAGE`: **true**: Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
|
||||||
- `VERBOSE_PUSH`: **true**: Print status information about pushes as they are being processed.
|
- `VERBOSE_PUSH`: **true**: Print status information about pushes as they are being processed.
|
||||||
- `VERBOSE_PUSH_DELAY`: **5s**: Only print verbose information if push takes longer than this delay.
|
- `VERBOSE_PUSH_DELAY`: **5s**: Only print verbose information if push takes longer than this delay.
|
||||||
|
@ -1000,7 +966,6 @@ Default templates for project boards:
|
||||||
- `DISABLE_PARTIAL_CLONE`: **false** Disable the usage of using partial clones for git.
|
- `DISABLE_PARTIAL_CLONE`: **false** Disable the usage of using partial clones for git.
|
||||||
|
|
||||||
## Git - Timeout settings (`git.timeout`)
|
## Git - Timeout settings (`git.timeout`)
|
||||||
|
|
||||||
- `DEFAUlT`: **360**: Git operations default timeout seconds.
|
- `DEFAUlT`: **360**: Git operations default timeout seconds.
|
||||||
- `MIGRATE`: **600**: Migrate external repositories timeout seconds.
|
- `MIGRATE`: **600**: Migrate external repositories timeout seconds.
|
||||||
- `MIRROR`: **300**: Mirror external repositories timeout seconds.
|
- `MIRROR`: **300**: Mirror external repositories timeout seconds.
|
||||||
|
@ -1017,11 +982,11 @@ Default templates for project boards:
|
||||||
|
|
||||||
## API (`api`)
|
## API (`api`)
|
||||||
|
|
||||||
- `ENABLE_SWAGGER`: **true**: Enables the API documentation endpoints (`/api/swagger`, `/api/v1/swagger`, …). True or false.
|
- `ENABLE_SWAGGER`: **true**: Enables /api/swagger, /api/v1/swagger etc. endpoints. True or false; default is true.
|
||||||
- `MAX_RESPONSE_ITEMS`: **50**: Max number of items in a page.
|
- `MAX_RESPONSE_ITEMS`: **50**: Max number of items in a page.
|
||||||
- `DEFAULT_PAGING_NUM`: **30**: Default paging number of API.
|
- `DEFAULT_PAGING_NUM`: **30**: Default paging number of API.
|
||||||
- `DEFAULT_GIT_TREES_PER_PAGE`: **1000**: Default and maximum number of items per page for Git trees API.
|
- `DEFAULT_GIT_TREES_PER_PAGE`: **1000**: Default and maximum number of items per page for Git trees API.
|
||||||
- `DEFAULT_MAX_BLOB_SIZE`: **10485760** (10MiB): Default max size of a blob that can be returned by the blobs API.
|
- `DEFAULT_MAX_BLOB_SIZE`: **10485760**: Default max size of a blob that can be return by the blobs API.
|
||||||
|
|
||||||
## OAuth2 (`oauth2`)
|
## OAuth2 (`oauth2`)
|
||||||
|
|
||||||
|
@ -1036,10 +1001,13 @@ Default templates for project boards:
|
||||||
|
|
||||||
## i18n (`i18n`)
|
## i18n (`i18n`)
|
||||||
|
|
||||||
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
|
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
|
||||||
List of locales shown in language selector. The first locale will be used as the default if user browser's language doesn't match any locale in the list.
|
List of locales shown in language selector. The first locale will be used as the default if user browser's language doesn't match any locale in the list.
|
||||||
- `NAMES`: **English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം**: Visible names corresponding to the locales
|
- `NAMES`: **English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം**: Visible names corresponding to the locales
|
||||||
|
|
||||||
|
## U2F (`U2F`) **DEPRECATED**
|
||||||
|
- `APP_ID`: **`ROOT_URL`**: Declares the facet of the application which is used for authentication of previously registered U2F keys. Requires HTTPS.
|
||||||
|
|
||||||
## Markup (`markup`)
|
## Markup (`markup`)
|
||||||
|
|
||||||
- `MERMAID_MAX_SOURCE_CHARACTERS`: **5000**: Set the maximum size of a Mermaid source. (Set to -1 to disable)
|
- `MERMAID_MAX_SOURCE_CHARACTERS`: **5000**: Set the maximum size of a Mermaid source. (Set to -1 to disable)
|
||||||
|
@ -1067,7 +1035,6 @@ IS_INPUT_FILE = false
|
||||||
- iframe: Render the content in a separate standalone page and embed it into current page by iframe. The iframe is in sandbox mode with same-origin disabled, and the JS code are safely isolated from parent page.
|
- iframe: Render the content in a separate standalone page and embed it into current page by iframe. The iframe is in sandbox mode with same-origin disabled, and the JS code are safely isolated from parent page.
|
||||||
|
|
||||||
Two special environment variables are passed to the render command:
|
Two special environment variables are passed to the render command:
|
||||||
|
|
||||||
- `GITEA_PREFIX_SRC`, which contains the current URL prefix in the `src` path tree. To be used as prefix for links.
|
- `GITEA_PREFIX_SRC`, which contains the current URL prefix in the `src` path tree. To be used as prefix for links.
|
||||||
- `GITEA_PREFIX_RAW`, which contains the current URL prefix in the `raw` path tree. To be used as prefix for image paths.
|
- `GITEA_PREFIX_RAW`, which contains the current URL prefix in the `raw` path tree. To be used as prefix for image paths.
|
||||||
|
|
||||||
|
@ -1083,10 +1050,10 @@ REGEXP = ^\s*((math(\s+|$)|inline(\s+|$)|display(\s+|$)))+
|
||||||
ALLOW_DATA_URI_IMAGES = true
|
ALLOW_DATA_URI_IMAGES = true
|
||||||
```
|
```
|
||||||
|
|
||||||
- `ELEMENT`: The element this policy applies to. Must be non-empty.
|
- `ELEMENT`: The element this policy applies to. Must be non-empty.
|
||||||
- `ALLOW_ATTR`: The attribute this policy allows. Must be non-empty.
|
- `ALLOW_ATTR`: The attribute this policy allows. Must be non-empty.
|
||||||
- `REGEXP`: A regex to match the contents of the attribute against. Must be present but may be empty for unconditional whitelisting of this attribute.
|
- `REGEXP`: A regex to match the contents of the attribute against. Must be present but may be empty for unconditional whitelisting of this attribute.
|
||||||
- `ALLOW_DATA_URI_IMAGES`: **false** Allow data uri images (`<img src="data:image/png;base64,..."/>`).
|
- `ALLOW_DATA_URI_IMAGES`: **false** Allow data uri images (`<img src="data:image/png;base64,..."/>`).
|
||||||
|
|
||||||
Multiple sanitisation rules can be defined by adding unique subsections, e.g. `[markup.sanitizer.TeX-2]`.
|
Multiple sanitisation rules can be defined by adding unique subsections, e.g. `[markup.sanitizer.TeX-2]`.
|
||||||
To apply a sanitisation rules only for a specify external renderer they must use the renderer name, e.g. `[markup.sanitizer.asciidoc.rule-1]`.
|
To apply a sanitisation rules only for a specify external renderer they must use the renderer name, e.g. `[markup.sanitizer.asciidoc.rule-1]`.
|
||||||
|
@ -1117,23 +1084,15 @@ Task queue configuration has been moved to `queue.task`. However, the below conf
|
||||||
|
|
||||||
- `MAX_ATTEMPTS`: **3**: Max attempts per http/https request on migrations.
|
- `MAX_ATTEMPTS`: **3**: Max attempts per http/https request on migrations.
|
||||||
- `RETRY_BACKOFF`: **3**: Backoff time per http/https request retry (seconds)
|
- `RETRY_BACKOFF`: **3**: Backoff time per http/https request retry (seconds)
|
||||||
- `ALLOWED_DOMAINS`: **\<empty\>**: Domains allowlist for migrating repositories, default is blank. It means everything will be allowed. Multiple domains could be separated by commas. Wildcard is supported: `github.com, *.github.com`.
|
- `ALLOWED_DOMAINS`: **\<empty\>**: Domains allowlist for migrating repositories, default is blank. It means everything will be allowed. Multiple domains could be separated by commas.
|
||||||
- `BLOCKED_DOMAINS`: **\<empty\>**: Domains blocklist for migrating repositories, default is blank. Multiple domains could be separated by commas. When `ALLOWED_DOMAINS` is not blank, this option has a higher priority to deny domains. Wildcard is supported.
|
- `BLOCKED_DOMAINS`: **\<empty\>**: Domains blocklist for migrating repositories, default is blank. Multiple domains could be separated by commas. When `ALLOWED_DOMAINS` is not blank, this option has a higher priority to deny domains.
|
||||||
- `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291. If a domain is allowed by `ALLOWED_DOMAINS`, this option will be ignored.
|
- `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291
|
||||||
- `SKIP_TLS_VERIFY`: **false**: Allow skip tls verify
|
- `SKIP_TLS_VERIFY`: **false**: Allow skip tls verify
|
||||||
|
|
||||||
## Federation (`federation`)
|
## Federation (`federation`)
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable/Disable federation capabilities
|
- `ENABLED`: **false**: Enable/Disable federation capabilities
|
||||||
- `SHARE_USER_STATISTICS`: **true**: Enable/Disable user statistics for nodeinfo if federation is enabled
|
- `SHARE_USER_STATISTICS`: **true**: Enable/Disable user statistics for nodeinfo if federation is enabled
|
||||||
- `MAX_SIZE`: **4**: Maximum federation request and response size (MB)
|
|
||||||
|
|
||||||
WARNING: Changing the settings below can break federation.
|
|
||||||
|
|
||||||
- `ALGORITHMS`: **rsa-sha256, rsa-sha512, ed25519**: HTTP signature algorithms
|
|
||||||
- `DIGEST_ALGORITHM`: **SHA-256**: HTTP signature digest algorithm
|
|
||||||
- `GET_HEADERS`: **(request-target), Date**: GET headers for federation requests
|
|
||||||
- `POST_HEADERS`: **(request-target), Date, Digest**: POST headers for federation requests
|
|
||||||
|
|
||||||
## Packages (`packages`)
|
## Packages (`packages`)
|
||||||
|
|
||||||
|
@ -1222,7 +1181,6 @@ is `data/repo-archive` and the default of `MINIO_BASE_PATH` is `repo-archive/`.
|
||||||
- `PROXY_HOSTS`: **\<empty\>**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
|
- `PROXY_HOSTS`: **\<empty\>**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
|
||||||
|
|
||||||
i.e.
|
i.e.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
PROXY_ENABLED = true
|
PROXY_ENABLED = true
|
||||||
PROXY_URL = socks://127.0.0.1:1080
|
PROXY_URL = socks://127.0.0.1:1080
|
||||||
|
|
|
@ -15,14 +15,7 @@ menu:
|
||||||
|
|
||||||
# 配置说明
|
# 配置说明
|
||||||
|
|
||||||
这是针对Gitea配置文件的说明,你可以了解Gitea的强大配置。需要说明的是,你的所有改变请修改 `custom/conf/app.ini` 文件而不是源文件。
|
这是针对Gitea配置文件的说明,你可以了解Gitea的强大配置。需要说明的是,你的所有改变请修改 `custom/conf/app.ini` 文件而不是源文件。所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) 查看到。如果你发现 `%(X)s` 这样的内容,请查看 [ini](https://github.com/go-ini/ini/#recursive-values) 这里的说明。标注了 :exclamation: 的配置项表明除非你真的理解这个配置项的意义,否则最好使用默认值。
|
||||||
所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) 查看到。
|
|
||||||
如果你发现 `%(X)s` 这样的内容,请查看 [ini](https://github.com/go-ini/ini/#recursive-values) 这里的说明。
|
|
||||||
标注了 :exclamation: 的配置项表明除非你真的理解这个配置项的意义,否则最好使用默认值。
|
|
||||||
|
|
||||||
## ⚠️时效性警告⚠️
|
|
||||||
|
|
||||||
此文档的内容可能过于陈旧或者错误,请参考英文文档。
|
|
||||||
|
|
||||||
{{< toc >}}
|
{{< toc >}}
|
||||||
|
|
||||||
|
@ -246,6 +239,7 @@ file -I test01.xls
|
||||||
test01.xls: application/vnd.ms-excel; charset=binary
|
test01.xls: application/vnd.ms-excel; charset=binary
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Log (`log`)
|
## Log (`log`)
|
||||||
|
|
||||||
- `ROOT_PATH`: 日志文件根目录。
|
- `ROOT_PATH`: 日志文件根目录。
|
||||||
|
@ -261,6 +255,7 @@ test01.xls: application/vnd.ms-excel; charset=binary
|
||||||
- 描述符, 例如 `@midnight`, `@every 1h30m` ...
|
- 描述符, 例如 `@midnight`, `@every 1h30m` ...
|
||||||
- 更多细节参见 [cron api文档](https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14)
|
- 更多细节参见 [cron api文档](https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14)
|
||||||
|
|
||||||
|
|
||||||
### Cron - Update Mirrors (`cron.update_mirrors`)
|
### Cron - Update Mirrors (`cron.update_mirrors`)
|
||||||
|
|
||||||
- `SCHEDULE`: 自动同步镜像仓库的Cron语法,比如:`@every 1h`。
|
- `SCHEDULE`: 自动同步镜像仓库的Cron语法,比如:`@every 1h`。
|
||||||
|
@ -299,7 +294,7 @@ test01.xls: application/vnd.ms-excel; charset=binary
|
||||||
|
|
||||||
## API (`api`)
|
## API (`api`)
|
||||||
|
|
||||||
- `ENABLE_SWAGGER`: **true**: 是否启用swagger路由 /api/swagger, /api/v1/swagger etc. endpoints. True 或 false.
|
- `ENABLE_SWAGGER`: **true**: 是否启用swagger路由 /api/swagger, /api/v1/swagger etc. endpoints. True 或 false; 默认是 true.
|
||||||
- `MAX_RESPONSE_ITEMS`: **50**: 一个页面最大的项目数。
|
- `MAX_RESPONSE_ITEMS`: **50**: 一个页面最大的项目数。
|
||||||
- `DEFAULT_PAGING_NUM`: **30**: API中默认分页条数。
|
- `DEFAULT_PAGING_NUM`: **30**: API中默认分页条数。
|
||||||
- `DEFAULT_GIT_TREES_PER_PAGE`: **1000**: GIT TREES API每页的默认最大项数.
|
- `DEFAULT_GIT_TREES_PER_PAGE`: **1000**: GIT TREES API每页的默认最大项数.
|
||||||
|
@ -351,7 +346,7 @@ ALLOW_DATA_URI_IMAGES = true
|
||||||
- `ALLOW_DATA_URI_IMAGES`: **false** 允许 data uri 图片 (`<img src="data:image/png;base64,..."/>`)。
|
- `ALLOW_DATA_URI_IMAGES`: **false** 允许 data uri 图片 (`<img src="data:image/png;base64,..."/>`)。
|
||||||
|
|
||||||
多个净化规则可以被同时定义,只要section名称最后一位不重复即可。如: `[markup.sanitizer.TeX-2]`。
|
多个净化规则可以被同时定义,只要section名称最后一位不重复即可。如: `[markup.sanitizer.TeX-2]`。
|
||||||
为了针对一种渲染类型进行一个特殊的净化策略,必须使用形如 `[markup.sanitizer.asciidoc.rule-1]` 的方式来命名 section。
|
为了针对一种渲染类型进行一个特殊的净化策略,必须使用形如 `[markup.sanitizer.asciidoc.rule-1]` 的方式来命名 seciton。
|
||||||
如果此规则没有匹配到任何渲染类型,它将会被应用到所有的渲染类型。
|
如果此规则没有匹配到任何渲染类型,它将会被应用到所有的渲染类型。
|
||||||
|
|
||||||
## Time (`time`)
|
## Time (`time`)
|
||||||
|
@ -445,7 +440,6 @@ Repository archive 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配
|
||||||
- `PROXY_HOSTS`: **\<empty\>**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站
|
- `PROXY_HOSTS`: **\<empty\>**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站
|
||||||
|
|
||||||
i.e.
|
i.e.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
PROXY_ENABLED = true
|
PROXY_ENABLED = true
|
||||||
PROXY_URL = socks://127.0.0.1:1080
|
PROXY_URL = socks://127.0.0.1:1080
|
||||||
|
|
|
@ -121,7 +121,7 @@ Apart from `extra_links.tmpl` and `extra_tabs.tmpl`, there are other useful temp
|
||||||
- `body_inner_pre.tmpl`, before the top navigation bar, but already inside the main container `<div class="full height">`.
|
- `body_inner_pre.tmpl`, before the top navigation bar, but already inside the main container `<div class="full height">`.
|
||||||
- `body_inner_post.tmpl`, before the end of the main container.
|
- `body_inner_post.tmpl`, before the end of the main container.
|
||||||
- `body_outer_post.tmpl`, before the bottom `<footer>` element.
|
- `body_outer_post.tmpl`, before the bottom `<footer>` element.
|
||||||
- `footer.tmpl`, right before the end of the `<body>` tag, a good place for additional JavaScript.
|
- `footer.tmpl`, right before the end of the `<body>` tag, a good place for additional Javascript.
|
||||||
|
|
||||||
#### Example: PlantUML
|
#### Example: PlantUML
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ You can add [PlantUML](https://plantuml.com/) support to Gitea's markdown by usi
|
||||||
The data is encoded and sent to the PlantUML server which generates the picture. There is an online
|
The data is encoded and sent to the PlantUML server which generates the picture. There is an online
|
||||||
demo server at http://www.plantuml.com/plantuml, but if you (or your users) have sensitive data you
|
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,
|
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
|
copy javascript files from https://gitea.com/davidsvantesson/plantuml-code-highlight and put them in your
|
||||||
`$GITEA_CUSTOM/public` folder. Then add the following to `custom/footer.tmpl`:
|
`$GITEA_CUSTOM/public` folder. Then add the following to `custom/footer.tmpl`:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
|
@ -137,9 +137,9 @@ copy JavaScript files from https://gitea.com/davidsvantesson/plantuml-code-highl
|
||||||
$(async () => {
|
$(async () => {
|
||||||
if (!$('.language-plantuml').length) return;
|
if (!$('.language-plantuml').length) return;
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
$.getScript('https://your-gitea-server.com/assets/deflate.js'),
|
$.getScript('https://your-server.com/deflate.js'),
|
||||||
$.getScript('https://your-gitea-server.com/assets/encode.js'),
|
$.getScript('https://your-server.com/encode.js'),
|
||||||
$.getScript('https://your-gitea-server.com/assets/plantuml_codeblock_parse.js'),
|
$.getScript('https://your-server.com/plantuml_codeblock_parse.js'),
|
||||||
]);
|
]);
|
||||||
// Replace call with address to your plantuml server
|
// Replace call with address to your plantuml server
|
||||||
parsePlantumlCodeBlocks("https://www.plantuml.com/plantuml");
|
parsePlantumlCodeBlocks("https://www.plantuml.com/plantuml");
|
||||||
|
@ -149,13 +149,13 @@ copy JavaScript files from https://gitea.com/davidsvantesson/plantuml-code-highl
|
||||||
|
|
||||||
You can then add blocks like the following to your markdown:
|
You can then add blocks like the following to your markdown:
|
||||||
|
|
||||||
```plantuml
|
```plantuml
|
||||||
Alice -> Bob: Authentication Request
|
Alice -> Bob: Authentication Request
|
||||||
Bob --> Alice: Authentication Response
|
Bob --> Alice: Authentication Response
|
||||||
|
|
||||||
Alice -> Bob: Another authentication Request
|
Alice -> Bob: Another authentication Request
|
||||||
Alice <-- Bob: Another authentication Response
|
Alice <-- Bob: Another authentication Response
|
||||||
```
|
```
|
||||||
|
|
||||||
The script will detect tags with `class="language-plantuml"`, but you can change this by providing a second argument to `parsePlantumlCodeBlocks`.
|
The script will detect tags with `class="language-plantuml"`, but you can change this by providing a second argument to `parsePlantumlCodeBlocks`.
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ You can display STL file directly in Gitea by adding:
|
||||||
|
|
||||||
to the file `templates/custom/footer.tmpl`
|
to the file `templates/custom/footer.tmpl`
|
||||||
|
|
||||||
You also need to download the content of the library [Madeleine.js](https://github.com/beige90/Madeleine.js) and place it under `$GITEA_CUSTOM/public/` folder.
|
You also need to download the content of the library [Madeleine.js](https://jinjunho.github.io/Madeleine.js/) and place it under `$GITEA_CUSTOM/public/` folder.
|
||||||
|
|
||||||
You should end-up with a folder structure similar to:
|
You should end-up with a folder structure similar to:
|
||||||
|
|
||||||
|
@ -335,8 +335,8 @@ The list of themes a user can choose from can be configured with the `THEMES` va
|
||||||
|
|
||||||
To make a custom theme available to all users:
|
To make a custom theme available to all users:
|
||||||
|
|
||||||
1. Add a CSS file to `$GITEA_CUSTOM/public/css/theme-<theme-name>.css`.
|
1. Add a CSS file to `$GITEA_PUBLIC/public/css/theme-<theme-name>.css`.
|
||||||
The value of `$GITEA_CUSTOM` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
|
The value of `$GITEA_PUBLIC` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
|
||||||
2. Add `<theme-name>` to the comma-separated list of setting `THEMES` in `app.ini`
|
2. Add `<theme-name>` to the comma-separated list of setting `THEMES` in `app.ini`
|
||||||
|
|
||||||
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).
|
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).
|
||||||
|
|
|
@ -25,31 +25,31 @@ GITEA_CUSTOM=/home/gitea/custom ./gitea web
|
||||||
|
|
||||||
因为 Gitea 使用 Go 语言编写,因此它使用了一些相关的 Go 的配置参数:
|
因为 Gitea 使用 Go 语言编写,因此它使用了一些相关的 Go 的配置参数:
|
||||||
|
|
||||||
* `GOOS`
|
* `GOOS`
|
||||||
* `GOARCH`
|
* `GOARCH`
|
||||||
* [`GOPATH`](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable)
|
* [`GOPATH`](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable)
|
||||||
|
|
||||||
您可以在[官方文档](https://golang.org/cmd/go/#hdr-Environment_variables)中查阅这些配置参数的详细信息。
|
您可以在[官方文档](https://golang.org/cmd/go/#hdr-Environment_variables)中查阅这些配置参数的详细信息。
|
||||||
|
|
||||||
## Gitea 的文件目录
|
## Gitea 的文件目录
|
||||||
|
|
||||||
* `GITEA_WORK_DIR`:工作目录的绝对路径
|
* `GITEA_WORK_DIR`:工作目录的绝对路径
|
||||||
* `GITEA_CUSTOM`:默认情况下 Gitea 使用默认目录 `GITEA_WORK_DIR`/custom,您可以使用这个参数来配置 *custom* 目录
|
* `GITEA_CUSTOM`:默认情况下 Gitea 使用默认目录 `GITEA_WORK_DIR`/custom,您可以使用这个参数来配置 *custom* 目录
|
||||||
* `GOGS_WORK_DIR`: 已废弃,请使用 `GITEA_WORK_DIR` 替代
|
* `GOGS_WORK_DIR`: 已废弃,请使用 `GITEA_WORK_DIR` 替代
|
||||||
* `GOGS_CUSTOM`: 已废弃,请使用 `GITEA_CUSTOM` 替代
|
* `GOGS_CUSTOM`: 已废弃,请使用 `GITEA_CUSTOM` 替代
|
||||||
|
|
||||||
## 操作系统配置
|
## 操作系统配置
|
||||||
|
|
||||||
* `USER`:Gitea 运行时使用的系统用户,它将作为一些 repository 的访问地址的一部分
|
* `USER`:Gitea 运行时使用的系统用户,它将作为一些 repository 的访问地址的一部分
|
||||||
* `USERNAME`: 如果没有配置 `USER`, Gitea 将使用 `USERNAME`
|
* `USERNAME`: 如果没有配置 `USER`, Gitea 将使用 `USERNAME`
|
||||||
* `HOME`: 用户的 home 目录,在 Windows 中会使用 `USERPROFILE` 环境变量
|
* `HOME`: 用户的 home 目录,在 Windows 中会使用 `USERPROFILE` 环境变量
|
||||||
|
|
||||||
### 仅限于 Windows 的配置
|
### 仅限于 Windows 的配置
|
||||||
|
|
||||||
* `USERPROFILE`: 用户的主目录,如果未配置则会使用 `HOMEDRIVE` + `HOMEPATH`
|
* `USERPROFILE`: 用户的主目录,如果未配置则会使用 `HOMEDRIVE` + `HOMEPATH`
|
||||||
* `HOMEDRIVE`: 用于访问 home 目录的主驱动器路径(C盘)
|
* `HOMEDRIVE`: 用于访问 home 目录的主驱动器路径(C盘)
|
||||||
* `HOMEPATH`:在指定主驱动器下的 home 目录相对路径
|
* `HOMEPATH`:在指定主驱动器下的 home 目录相对路径
|
||||||
|
|
||||||
## Miscellaneous
|
## Miscellaneous
|
||||||
|
|
||||||
* `SKIP_MINWINSVC`:如果设置为 1,在 Windows 上不会以 service 的形式运行。
|
* `SKIP_MINWINSVC`:如果设置为 1,在 Windows 上不会以 service 的形式运行。
|
||||||
|
|
|
@ -74,13 +74,12 @@ RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f rst"
|
||||||
IS_INPUT_FILE = false
|
IS_INPUT_FILE = false
|
||||||
```
|
```
|
||||||
|
|
||||||
If your external markup relies on additional classes and attributes on the generated HTML elements, you might need to enable custom sanitizer policies. Gitea uses the [`bluemonday`](https://godoc.org/github.com/microcosm-cc/bluemonday) package as our HTML sanitizer. The example below could be used to support server-side [KaTeX](https://katex.org/) rendering output from [`pandoc`](https://pandoc.org/).
|
If your external markup relies on additional classes and attributes on the generated HTML elements, you might need to enable custom sanitizer policies. Gitea uses the [`bluemonday`](https://godoc.org/github.com/microcosm-cc/bluemonday) package as our HTML sanitizier. The example below will support [KaTeX](https://katex.org/) output from [`pandoc`](https://pandoc.org/).
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[markup.sanitizer.TeX]
|
[markup.sanitizer.TeX]
|
||||||
; Pandoc renders TeX segments as <span>s with the "math" class, optionally
|
; Pandoc renders TeX segments as <span>s with the "math" class, optionally
|
||||||
; with "inline" or "display" classes depending on context.
|
; with "inline" or "display" classes depending on context.
|
||||||
; - note this is different from the built-in math support in our markdown parser which uses <code>
|
|
||||||
ELEMENT = span
|
ELEMENT = span
|
||||||
ALLOW_ATTR = class
|
ALLOW_ATTR = class
|
||||||
REGEXP = ^\s*((math(\s+|$)|inline(\s+|$)|display(\s+|$)))+
|
REGEXP = ^\s*((math(\s+|$)|inline(\s+|$)|display(\s+|$)))+
|
||||||
|
@ -128,7 +127,6 @@ ALLOW_ATTR = class
|
||||||
### Example: Office DOCX
|
### Example: Office DOCX
|
||||||
|
|
||||||
Display Office DOCX files with [`pandoc`](https://pandoc.org/):
|
Display Office DOCX files with [`pandoc`](https://pandoc.org/):
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[markup.docx]
|
[markup.docx]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
|
@ -140,7 +138,6 @@ ALLOW_DATA_URI_IMAGES = true
|
||||||
```
|
```
|
||||||
|
|
||||||
The template file has the following content:
|
The template file has the following content:
|
||||||
|
|
||||||
```
|
```
|
||||||
$body$
|
$body$
|
||||||
```
|
```
|
||||||
|
@ -148,7 +145,6 @@ $body$
|
||||||
### Example: Jupyter Notebook
|
### Example: Jupyter Notebook
|
||||||
|
|
||||||
Display Jupyter Notebook files with [`nbconvert`](https://github.com/jupyter/nbconvert):
|
Display Jupyter Notebook files with [`nbconvert`](https://github.com/jupyter/nbconvert):
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[markup.jupyter]
|
[markup.jupyter]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
|
@ -160,11 +156,9 @@ ALLOW_DATA_URI_IMAGES = true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Customizing CSS
|
## Customizing CSS
|
||||||
|
|
||||||
The external renderer is specified in the .ini in the format `[markup.XXXXX]` and the HTML supplied by your external renderer will be wrapped in a `<div>` with classes `markup` and `XXXXX`. The `markup` class provides out of the box styling (as does `markdown` if `XXXXX` is `markdown`). Otherwise you can use these classes to specifically target the contents of your rendered HTML.
|
The external renderer is specified in the .ini in the format `[markup.XXXXX]` and the HTML supplied by your external renderer will be wrapped in a `<div>` with classes `markup` and `XXXXX`. The `markup` class provides out of the box styling (as does `markdown` if `XXXXX` is `markdown`). Otherwise you can use these classes to specifically target the contents of your rendered HTML.
|
||||||
|
|
||||||
And so you could write some CSS:
|
And so you could write some CSS:
|
||||||
|
|
||||||
```css
|
```css
|
||||||
.markup.XXXXX html {
|
.markup.XXXXX html {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
|
@ -190,7 +184,6 @@ And so you could write some CSS:
|
||||||
```
|
```
|
||||||
|
|
||||||
Add your stylesheet to your custom directory e.g `custom/public/css/my-style-XXXXX.css` and import it using a custom header file `custom/templates/custom/header.tmpl`:
|
Add your stylesheet to your custom directory e.g `custom/public/css/my-style-XXXXX.css` and import it using a custom header file `custom/templates/custom/header.tmpl`:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link type="text/css" href="{{AppSubUrl}}/assets/css/my-style-XXXXX.css" />
|
<link type="text/css" href="{{AppSubUrl}}/assets/css/my-style-XXXXX.css" />
|
||||||
```
|
```
|
||||||
|
|
|
@ -15,14 +15,12 @@ menu:
|
||||||
|
|
||||||
# Logging Configuration
|
# Logging Configuration
|
||||||
|
|
||||||
|
The logging framework has been revamped in Gitea 1.9.0.
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
|
|
||||||
{{< toc >}}
|
{{< toc >}}
|
||||||
|
|
||||||
## Collecting Logs for Help
|
|
||||||
|
|
||||||
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
|
|
||||||
|
|
||||||
## Log Groups
|
## Log Groups
|
||||||
|
|
||||||
The fundamental thing to be aware of in Gitea is that there are several
|
The fundamental thing to be aware of in Gitea is that there are several
|
||||||
|
|
|
@ -37,7 +37,7 @@ For an existing remote repository, you can set up pull mirroring as follows:
|
||||||
3. Enter a repository URL.
|
3. Enter a repository URL.
|
||||||
4. If the repository needs authentication fill in your authentication information.
|
4. If the repository needs authentication fill in your authentication information.
|
||||||
5. Check the box **This repository will be a mirror**.
|
5. Check the box **This repository will be a mirror**.
|
||||||
6. Select **Migrate repository** to save the configuration.
|
5. Select **Migrate repository** to save the configuration.
|
||||||
|
|
||||||
The repository now gets mirrored periodically from the remote repository. You can force a sync by selecting **Synchronize Now** in the repository settings.
|
The repository now gets mirrored periodically from the remote repository. You can force a sync by selecting **Synchronize Now** in the repository settings.
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ create a file called `robots.txt` in the [`custom` folder or `CustomPath`]({{< r
|
||||||
|
|
||||||
Examples on how to configure the `robots.txt` can be found at [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt).
|
Examples on how to configure the `robots.txt` can be found at [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt).
|
||||||
|
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /
|
Disallow: /
|
||||||
|
|
|
@ -102,7 +102,7 @@ and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/gitconfig`)
|
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/gitconfig`)
|
||||||
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
|
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
||||||
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location.
|
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|
|
@ -14,26 +14,23 @@ menu:
|
||||||
---
|
---
|
||||||
|
|
||||||
# 第三方工具列表
|
# 第三方工具列表
|
||||||
|
|
||||||
**注意:** 这些工具并没有经过Gitea的检验,在这里列出它们只是为了便捷.
|
**注意:** 这些工具并没有经过Gitea的检验,在这里列出它们只是为了便捷.
|
||||||
|
|
||||||
*此列表并不是完整的列表,可以随时咨询如何添加!*
|
*此列表并不是完整的列表,可以随时咨询如何添加!*
|
||||||
|
|
||||||
### 持续集成
|
### 持续集成
|
||||||
|
|
||||||
[BuildKite 连接器](https://github.com/techknowlogick/gitea-buildkite-connector)
|
[BuildKite 连接器](https://github.com/techknowlogick/gitea-buildkite-connector)
|
||||||
[Jenkins 插件](https://github.com/jenkinsci/gitea-plugin)
|
[Jenkins 插件](https://github.com/jenkinsci/gitea-plugin)
|
||||||
[Gitea搭配Drone](https://docs.drone.io/installation/gitea)
|
[Gitea搭配Drone](https://docs.drone.io/installation/gitea)
|
||||||
|
|
||||||
### 迁移
|
|
||||||
|
|
||||||
|
### 迁移
|
||||||
[Gitea安装脚本](https://git.coolaj86.com/coolaj86/gitea-installer.sh)
|
[Gitea安装脚本](https://git.coolaj86.com/coolaj86/gitea-installer.sh)
|
||||||
[GitHub迁移](https://gitea.com/gitea/migrator)
|
[GitHub迁移](https://gitea.com/gitea/migrator)
|
||||||
|
|
||||||
### 移动端
|
|
||||||
|
|
||||||
|
### 移动端
|
||||||
[安卓客户端GitNex](https://gitlab.com/mmarif4u/gitnex)
|
[安卓客户端GitNex](https://gitlab.com/mmarif4u/gitnex)
|
||||||
|
|
||||||
### 编辑器扩展
|
### 编辑器扩展
|
||||||
|
- [Gitea的Visual Studio扩展](https://github.com/maikebing/Gitea.VisualStudio) 从 [Visual Studio 扩展市场](https://marketplace.visualstudio.com/items?itemName=MysticBoy.GiteaExtensionforVisualStudio) 下载
|
||||||
- [Gitea的Visual Studio扩展](https://github.com/maikebing/Gitea.VisualStudio) 从 [Visual Studio 扩展市场](https://marketplace.visualstudio.com/items?itemName=MysticBoy.GiteaExtensionforVisualStudio) 下载
|
|
||||||
|
|
|
@ -48,8 +48,9 @@ A new token can be generated with a `POST` request to
|
||||||
Note that `/users/:name/tokens` is a special endpoint and requires you
|
Note that `/users/:name/tokens` is a special endpoint and requires you
|
||||||
to authenticate using `BasicAuth` and a password, as follows:
|
to authenticate using `BasicAuth` and a password, as follows:
|
||||||
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ curl -H "Content-Type: application/json" -d '{"name":"test"}' -u username:password https://gitea.your.host/api/v1/users/<username>/tokens
|
$ curl -XPOST -H "Content-Type: application/json" -k -d '{"name":"test"}' -u username:password https://gitea.your.host/api/v1/users/<username>/tokens
|
||||||
{"id":1,"name":"test","sha1":"9fcb1158165773dd010fca5f0cf7174316c3e37d","token_last_eight":"16c3e37d"}
|
{"id":1,"name":"test","sha1":"9fcb1158165773dd010fca5f0cf7174316c3e37d","token_last_eight":"16c3e37d"}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@ plain-text. It will not be displayed when listing tokens with a `GET`
|
||||||
request; e.g.
|
request; e.g.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ curl --url https://yourusername:password@gitea.your.host/api/v1/users/<username>/tokens
|
$ curl --request GET --url https://yourusername:password@gitea.your.host/api/v1/users/<username>/tokens
|
||||||
[{"name":"test","sha1":"","token_last_eight:"........":},{"name":"dev","sha1":"","token_last_eight":"........"}]
|
[{"name":"test","sha1":"","token_last_eight:"........":},{"name":"dev","sha1":"","token_last_eight":"........"}]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -70,7 +71,7 @@ is where you'd place the code from your authenticator.
|
||||||
Here is how the request would look like in curl:
|
Here is how the request would look like in curl:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ curl -H "X-Gitea-OTP: 123456" --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens
|
$ curl -H "X-Gitea-OTP: 123456" --request GET --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also create an API key token via your Gitea installation's web
|
You can also create an API key token via your Gitea installation's web
|
||||||
|
@ -96,7 +97,7 @@ Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675
|
||||||
In a `curl` command, for instance, this would look like:
|
In a `curl` command, for instance, this would look like:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl "http://localhost:4000/api/v1/repos/test1/test1/issues" \
|
curl -X POST "http://localhost:4000/api/v1/repos/test1/test1/issues" \
|
||||||
-H "accept: application/json" \
|
-H "accept: application/json" \
|
||||||
-H "Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675" \
|
-H "Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675" \
|
||||||
-H "Content-Type: application/json" -d "{ \"body\": \"testing\", \"title\": \"test 20\"}" -i
|
-H "Content-Type: application/json" -d "{ \"body\": \"testing\", \"title\": \"test 20\"}" -i
|
||||||
|
@ -105,18 +106,6 @@ curl "http://localhost:4000/api/v1/repos/test1/test1/issues" \
|
||||||
As mentioned above, the token used is the same one you would use in
|
As mentioned above, the token used is the same one you would use in
|
||||||
the `token=` string in a GET request.
|
the `token=` string in a GET request.
|
||||||
|
|
||||||
## Pagination
|
|
||||||
|
|
||||||
The API supports pagination. The `page` and `limit` parameters are used to specify the page number and the number of items per page. As well, the `Link` header is returned with the next, previous, and last page links if there are more than one pages. The `x-total-count` is also returned to indicate the total number of items.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
curl -v "http://localhost/api/v1/repos/search?limit=1"
|
|
||||||
...
|
|
||||||
< link: <http://localhost/api/v1/repos/search?limit=1&page=2>; rel="next",<http://localhost/api/v1/repos/search?limit=1&page=5252>; rel="last"
|
|
||||||
...
|
|
||||||
< x-total-count: 5252
|
|
||||||
```
|
|
||||||
|
|
||||||
## API Guide:
|
## API Guide:
|
||||||
|
|
||||||
API Reference guide is auto-generated by swagger and available on:
|
API Reference guide is auto-generated by swagger and available on:
|
||||||
|
|
|
@ -46,7 +46,7 @@ Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675
|
||||||
以 `curl` 命令为例,它会以如下形式携带在请求中:
|
以 `curl` 命令为例,它会以如下形式携带在请求中:
|
||||||
|
|
||||||
```
|
```
|
||||||
curl "http://localhost:4000/api/v1/repos/test1/test1/issues" \
|
curl -X POST "http://localhost:4000/api/v1/repos/test1/test1/issues" \
|
||||||
-H "accept: application/json" \
|
-H "accept: application/json" \
|
||||||
-H "Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675" \
|
-H "Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675" \
|
||||||
-H "Content-Type: application/json" -d "{ \"body\": \"testing\", \"title\": \"test 20\"}" -i
|
-H "Content-Type: application/json" -d "{ \"body\": \"testing\", \"title\": \"test 20\"}" -i
|
||||||
|
@ -62,7 +62,7 @@ curl "http://localhost:4000/api/v1/repos/test1/test1/issues" \
|
||||||
### 使用 Basic authentication 认证:
|
### 使用 Basic authentication 认证:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ curl --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens
|
$ curl --request GET --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens
|
||||||
[{"name":"test","sha1":"..."},{"name":"dev","sha1":"..."}]
|
[{"name":"test","sha1":"..."},{"name":"dev","sha1":"..."}]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,7 @@ To maintain understandable code and avoid circular dependencies it is important
|
||||||
|
|
||||||
- `build`: Scripts to help build Gitea.
|
- `build`: Scripts to help build Gitea.
|
||||||
- `cmd`: All Gitea actual sub commands includes web, doctor, serv, hooks, admin and etc. `web` will start the web service. `serv` and `hooks` will be invoked by Git or OpenSSH. Other sub commands could help to maintain Gitea.
|
- `cmd`: All Gitea actual sub commands includes web, doctor, serv, hooks, admin and etc. `web` will start the web service. `serv` and `hooks` will be invoked by Git or OpenSSH. Other sub commands could help to maintain Gitea.
|
||||||
- `tests`: Common test utility functions
|
- `integrations`: Integration tests
|
||||||
- `tests/integration`: Integration tests, to test back-end regressions
|
|
||||||
- `tests/e2e`: E2e tests, to test test front-end <> back-end compatibility and visual regressions.
|
|
||||||
- `models`: Contains the data structures used by xorm to construct database tables. It also contains functions to query and update the database. Dependencies to other Gitea code should be avoided. You can make exceptions in cases such as logging.
|
- `models`: Contains the data structures used by xorm to construct database tables. It also contains functions to query and update the database. Dependencies to other Gitea code should be avoided. You can make exceptions in cases such as logging.
|
||||||
- `models/db`: Basic database operations. All other `models/xxx` packages should depend on this package. The `GetEngine` function should only be invoked from `models/`.
|
- `models/db`: Basic database operations. All other `models/xxx` packages should depend on this package. The `GetEngine` function should only be invoked from `models/`.
|
||||||
- `models/fixtures`: Sample data used in unit tests and integration tests. One `yml` file means one table which will be loaded into database when beginning the tests.
|
- `models/fixtures`: Sample data used in unit tests and integration tests. One `yml` file means one table which will be loaded into database when beginning the tests.
|
||||||
|
@ -67,18 +65,22 @@ Some actions should allow for rollback when database record insertion/update/del
|
||||||
So services must be allowed to create a database transaction. Here is some example,
|
So services must be allowed to create a database transaction. Here is some example,
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// services/repository/repository.go
|
// servcies/repository/repo.go
|
||||||
func CreateXXXX() error {
|
func CreateXXXX() error {\
|
||||||
return db.WithTx(func(ctx context.Context) error {
|
ctx, committer, err := db.TxContext()
|
||||||
e := db.GetEngine(ctx)
|
if err != nil {
|
||||||
// do something, if err is returned, it will rollback automatically
|
|
||||||
if err := issues.UpdateIssue(ctx, repoID); err != nil {
|
|
||||||
// ...
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer committer.Close()
|
||||||
|
|
||||||
|
// do something, if return err, it will rollback automatically when `committer.Close()` is invoked.
|
||||||
|
if err := issues.UpdateIssue(ctx, repoID); err != nil {
|
||||||
// ...
|
// ...
|
||||||
return nil
|
}
|
||||||
})
|
|
||||||
|
// ......
|
||||||
|
|
||||||
|
return committer.Commit()
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -90,14 +92,14 @@ If the function will be used in the transaction, just let `context.Context` as t
|
||||||
func UpdateIssue(ctx context.Context, repoID int64) error {
|
func UpdateIssue(ctx context.Context, repoID int64) error {
|
||||||
e := db.GetEngine(ctx)
|
e := db.GetEngine(ctx)
|
||||||
|
|
||||||
// ...
|
// ......
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Package Name
|
### Package Name
|
||||||
|
|
||||||
For the top level package, use a plural as package name, i.e. `services`, `models`, for sub packages, use singular,
|
For the top level package, use a plural as package name, i.e. `services`, `models`, for sub packages, use singular,
|
||||||
i.e. `services/user`, `models/repository`.
|
i.e. `servcies/user`, `models/repository`.
|
||||||
|
|
||||||
### Import Alias
|
### Import Alias
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,11 @@ menu:
|
||||||
|
|
||||||
## Background
|
## Background
|
||||||
|
|
||||||
Gitea uses [Less CSS](https://lesscss.org), [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend.
|
Gitea uses [Less CSS](https://lesscss.org), [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue2](https://vuejs.org/v2/guide/) for its frontend.
|
||||||
|
|
||||||
The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template).
|
The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template).
|
||||||
|
|
||||||
The source files can be found in the following directories:
|
The source files can be found in the following directories:
|
||||||
|
|
||||||
* **Less styles:** `web_src/less/`
|
* **Less styles:** `web_src/less/`
|
||||||
* **JavaScript files:** `web_src/js/`
|
* **JavaScript files:** `web_src/js/`
|
||||||
* **Vue components:** `web_src/js/components/`
|
* **Vue components:** `web_src/js/components/`
|
||||||
|
@ -44,7 +43,8 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h
|
||||||
4. jQuery events across different features could use their own namespaces if there are potential conflicts.
|
4. jQuery events across different features could use their own namespaces if there are potential conflicts.
|
||||||
5. CSS styling for classes provided by frameworks should not be overwritten. Always use new class-names with 2-3 feature related keywords to overwrite framework styles.
|
5. CSS styling for classes provided by frameworks should not be overwritten. Always use new class-names with 2-3 feature related keywords to overwrite framework styles.
|
||||||
6. The backend can pass complex data to the frontend by using `ctx.PageData["myModuleData"] = map[]{}`
|
6. The backend can pass complex data to the frontend by using `ctx.PageData["myModuleData"] = map[]{}`
|
||||||
7. Simple pages and SEO-related pages use Go HTML Template render to generate static Fomantic-UI HTML output. Complex pages can use Vue3.
|
7. Simple pages and SEO-related pages use Go HTML Template render to generate static Fomantic-UI HTML output. Complex pages can use Vue2 (or Vue3 in future).
|
||||||
|
|
||||||
|
|
||||||
### Framework Usage
|
### Framework Usage
|
||||||
|
|
||||||
|
@ -52,13 +52,11 @@ Mixing different frameworks together is discouraged, it makes the code difficult
|
||||||
A JavaScript module should follow one major framework and follow the framework's best practice.
|
A JavaScript module should follow one major framework and follow the framework's best practice.
|
||||||
|
|
||||||
Recommended implementations:
|
Recommended implementations:
|
||||||
|
|
||||||
* Vue + Vanilla JS
|
* Vue + Vanilla JS
|
||||||
* Fomantic-UI (jQuery)
|
* Fomantic-UI (jQuery)
|
||||||
* Vanilla JS
|
* Vanilla JS
|
||||||
|
|
||||||
Discouraged implementations:
|
Discouraged implementations:
|
||||||
|
|
||||||
* Vue + Fomantic-UI (jQuery)
|
* Vue + Fomantic-UI (jQuery)
|
||||||
* jQuery + Vanilla JS
|
* jQuery + Vanilla JS
|
||||||
|
|
||||||
|
@ -93,10 +91,11 @@ However, there are still some special cases, so the current guideline is:
|
||||||
* `node.dataset` should not be used, use `node.getAttribute` instead.
|
* `node.dataset` should not be used, use `node.getAttribute` instead.
|
||||||
* never bind any user data to a DOM node, use a suitable design pattern to describe the relation between node and data.
|
* never bind any user data to a DOM node, use a suitable design pattern to describe the relation between node and data.
|
||||||
|
|
||||||
|
|
||||||
### Legacy Code
|
### Legacy Code
|
||||||
|
|
||||||
A lot of legacy code already existed before this document's written. It's recommended to refactor legacy code to follow the guidelines.
|
A lot of legacy code already existed before this document's written. It's recommended to refactor legacy code to follow the guidelines.
|
||||||
|
|
||||||
### Vue3 and JSX
|
### Vue2/Vue3 and JSX
|
||||||
|
|
||||||
Gitea is using Vue3 now. We decided not to introduce JSX to keep the HTML and the JavaScript code separated.
|
Gitea is using Vue2 now, we plan to upgrade to Vue3. We decided not to introduce JSX to keep the HTML and the JavaScript code separated.
|
|
@ -19,12 +19,6 @@ menu:
|
||||||
|
|
||||||
{{< toc >}}
|
{{< toc >}}
|
||||||
|
|
||||||
## Quickstart
|
|
||||||
|
|
||||||
To get a quick working development environment you could use Gitpod.
|
|
||||||
|
|
||||||
[![Open in Gitpod](/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/go-gitea/gitea)
|
|
||||||
|
|
||||||
## Installing go
|
## Installing go
|
||||||
|
|
||||||
You should [install go](https://golang.org/doc/install) and set up your go
|
You should [install go](https://golang.org/doc/install) and set up your go
|
||||||
|
@ -177,7 +171,7 @@ server as mentioned above.
|
||||||
|
|
||||||
### Working on JS and CSS
|
### Working on JS and CSS
|
||||||
|
|
||||||
Frontend development should follow [Guidelines for Frontend Development]({{< relref "doc/developers/guidelines-frontend.en-us.md" >}})
|
Frontend development should follow [Guidelines for Frontend Development](./guidelines-frontend.md)
|
||||||
|
|
||||||
To build with frontend resources, either use the `watch-frontend` target mentioned above or just build once:
|
To build with frontend resources, either use the `watch-frontend` target mentioned above or just build once:
|
||||||
|
|
||||||
|
@ -315,9 +309,10 @@ will run the integration tests in an SQLite environment. Integration tests
|
||||||
require `git lfs` to be installed. Other database tests are available but
|
require `git lfs` to be installed. Other database tests are available but
|
||||||
may need adjustment to the local environment.
|
may need adjustment to the local environment.
|
||||||
|
|
||||||
Take a look at [`tests/integration/README.md`](https://github.com/go-gitea/gitea/blob/main/tests/integration/README.md)
|
Take a look at [`integrations/README.md`](https://github.com/go-gitea/gitea/blob/main/integrations/README.md)
|
||||||
for more information and how to run a single test.
|
for more information and how to run a single test.
|
||||||
|
|
||||||
|
|
||||||
### Testing for a PR
|
### Testing for a PR
|
||||||
|
|
||||||
Our continuous integration will test the code passes its unit tests and that
|
Our continuous integration will test the code passes its unit tests and that
|
||||||
|
|
|
@ -16,8 +16,8 @@ menu:
|
||||||
# Migration Features
|
# Migration Features
|
||||||
|
|
||||||
Complete migrations were introduced in Gitea 1.9.0. It defines two interfaces to support migrating
|
Complete migrations were introduced in Gitea 1.9.0. It defines two interfaces to support migrating
|
||||||
repository data from other Git host platforms to Gitea or, in the future, migrating Gitea data to other Git host platforms.
|
repository data from other Git host platforms to Gitea or, in the future, migrating Gitea data to other
|
||||||
|
Git host platforms.
|
||||||
Currently, migrations from GitHub, GitLab, and other Gitea instances are implemented.
|
Currently, migrations from GitHub, GitLab, and other Gitea instances are implemented.
|
||||||
|
|
||||||
First of all, Gitea defines some standard objects in packages [modules/migration](https://github.com/go-gitea/gitea/tree/main/modules/migration).
|
First of all, Gitea defines some standard objects in packages [modules/migration](https://github.com/go-gitea/gitea/tree/main/modules/migration).
|
||||||
|
|
|
@ -34,7 +34,6 @@ Gitea supports acting as an OAuth2 provider to allow third party applications to
|
||||||
## Supported OAuth2 Grants
|
## Supported OAuth2 Grants
|
||||||
|
|
||||||
At the moment Gitea only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the following extensions:
|
At the moment Gitea only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the following extensions:
|
||||||
|
|
||||||
- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
|
- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
|
||||||
- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
|
- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
|
||||||
|
|
||||||
|
@ -42,19 +41,13 @@ To use the Authorization Code Grant as a third party application it is required
|
||||||
|
|
||||||
## Scopes
|
## Scopes
|
||||||
|
|
||||||
Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and their organizations.
|
Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and his/her organizations.
|
||||||
|
|
||||||
## Client types
|
|
||||||
|
|
||||||
Gitea supports both confidential and public client types, [as defined by RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1).
|
|
||||||
|
|
||||||
For public clients, a redirect URI of a loopback IP address such as `http://127.0.0.1/` allows any port. Avoid using `localhost`, [as recommended by RFC 8252](https://datatracker.ietf.org/doc/html/rfc8252#section-8.3).
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
**Note:** This example does not use PKCE.
|
**Note:** This example does not use PKCE.
|
||||||
|
|
||||||
1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources:
|
1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources:
|
||||||
|
|
||||||
```curl
|
```curl
|
||||||
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
|
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
|
||||||
|
|
|
@ -46,7 +46,7 @@ Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意
|
||||||
**備註:** 此範例未使用 PKCE。
|
**備註:** 此範例未使用 PKCE。
|
||||||
|
|
||||||
1. 重新導向使用者到 authorization endpoint 以獲得他同意授權存取資源:
|
1. 重新導向使用者到 authorization endpoint 以獲得他同意授權存取資源:
|
||||||
<!-- 1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources: -->
|
<!-- 1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources: -->
|
||||||
|
|
||||||
```curl
|
```curl
|
||||||
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
|
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
|
||||||
|
|
|
@ -21,7 +21,7 @@ menu:
|
||||||
|
|
||||||
To help decide if Gitea is suited for your needs, here is how it compares to other Git self hosted options.
|
To help decide if Gitea is suited for your needs, here is how it compares to other Git self hosted options.
|
||||||
|
|
||||||
Be warned that we don't regularly check for feature changes in other products, so this list may be outdated. If you find anything that needs to be updated in the table below, please [open an issue](https://github.com/go-gitea/gitea/issues/new/choose).
|
Be warned that we don't regularly check for feature changes in other products, so this list may be outdated. If you find anything that needs to be updated in the table below, please report it in an [issue on GitHub](https://github.com/go-gitea/gitea/issues).
|
||||||
|
|
||||||
_Symbols used in table:_
|
_Symbols used in table:_
|
||||||
|
|
||||||
|
@ -34,110 +34,99 @@ _Symbols used in table:_
|
||||||
## General Features
|
## General Features
|
||||||
|
|
||||||
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ------------------------------------------------ | --------------------------------------------------- | ---- | --------- | --------- | --------- | --------- | ------------ |
|
| ----------------------------------- | ---------------------------------------------------| ---- | --------- | --------- | --------- | -------------- | ------------ |
|
||||||
| Open source and free | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ |
|
| Open source and free | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ |
|
||||||
| Low RAM/ CPU usage | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
| Low resource usage (RAM/CPU) | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
||||||
| Multiple database support | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ |
|
| Multiple database support | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ |
|
||||||
| Multiple OS support | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ |
|
| Multiple OS support | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ |
|
||||||
| Easy upgrades | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
| Easy upgrade process | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
||||||
| Telemetry | **✘** | ✘ | ✓ | ✓ | ✓ | ✓ | ? |
|
|
||||||
| Third-party render tool support | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? |
|
|
||||||
| WebAuthn (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ? |
|
|
||||||
| Extensive API | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
||||||
| Built-in Package/Container Registry | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
|
||||||
| Sync commits to an external repo (push mirror) | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
|
||||||
| Sync commits from an external repo (pull mirror) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ? |
|
|
||||||
| Light and Dark Theme | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ? |
|
|
||||||
| Custom Theme Support | ✓ | ✓ | ✘ | ✘ | ✘ | ✓ | ✘ |
|
|
||||||
| Markdown support | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Markdown support | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| Orgmode support | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? |
|
||||||
| CSV support | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? |
|
| CSV support | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? |
|
||||||
| 'GitHub / GitLab pages' | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Third-party render tool support | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? |
|
||||||
| Repo-specific wiki (as a repo itself) | ✓ | ✓ | ✓ | ✓ | ✓ | / | ✘ |
|
| Static Git-powered pages | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
|
| Integrated Git-powered wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (cloud only) | ✘ |
|
||||||
| Deploy Tokens | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Deploy Tokens | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Repository Tokens with write rights | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Repository Tokens with write rights | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| RSS Feeds | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ✘ |
|
| Built-in Package/Container Registry | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Built-in CI/CD | [✘](https://github.com/go-gitea/gitea/issues/13539) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| External git mirroring | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| Subgroups: groups within groups | [✘](https://github.com/go-gitea/gitea/issues/1872) | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
| WebAuthn (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ? |
|
||||||
| Interaction with other instances | [/](https://github.com/go-gitea/gitea/issues/18240) | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
| Built-in CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Mermaid diagrams in Markdown | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Subgroups: groups within groups | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
||||||
| Math syntax in Markdown | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
|
||||||
|
|
||||||
## Code management
|
## Code management
|
||||||
|
|
||||||
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ------------------------------------------- | --------------------------------------------------- | ---- | --------- | --------- | --------- | --------- | ------------ |
|
| -------------------------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ |
|
||||||
| Repository topics | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Repository topics | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Repository code search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Repository code search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Global code search | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ |
|
| Global code search | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Group Milestones | [✘](https://github.com/go-gitea/gitea/issues/14622) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Group Milestones | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Granular user roles (Code, Issues, Wiki, …) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Granular user roles (Code, Issues, Wiki etc) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Verified Committer | ⁄ | ✘ | ? | ✓ | ✓ | ✓ | ✘ |
|
| Verified Committer | ⁄ | ✘ | ? | ✓ | ✓ | ✓ | ✘ |
|
||||||
| GPG Signed Commits | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| GPG Signed Commits | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| SSH Signed Commits | ✓ | ✘ | ✓ | ✘ | ✘ | ? | ? |
|
| SSH Signed Commits | ✓ | ✘ | ✘ | ✘ | ✘ | ? | ? |
|
||||||
| Reject unsigned commits | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Reject unsigned commits | [✓](https://github.com/go-gitea/gitea/pull/9708) | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Migrating repos from other services | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
||||||
| Repository Activity page | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Repository Activity page | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Branch manager | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Branch manager | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Create new branches | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Create new branches | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Web code editor | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Web code editor | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Commit graph | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Commit graph | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Template Repositories | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✘ |
|
| Template Repositories | [✓](https://github.com/go-gitea/gitea/pull/8768) | ✘ | ✓ | ✘ | ✓ | ✓ | ✘ |
|
||||||
| Git Blame | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
|
||||||
| Visual comparison of image changes | ✓ | ✘ | ✓ | ? | ? | ? | ? |
|
|
||||||
|
|
||||||
## Issue Tracker
|
## Issue Tracker
|
||||||
|
|
||||||
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ----------------------------- | --------------------------------------------------- | ---- | --------- | --------- | --------- | --------- | ------------ |
|
| ------------------------------- | -------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------------------------------------------------- | --------- | -------------- | ------------ |
|
||||||
| Issue tracker | ✓ | ✓ | ✓ | ✓ | ✓ | / | ✘ |
|
| Issue tracker | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (cloud only) | ✘ |
|
||||||
| Issue templates | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Issue templates | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Labels | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Labels | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Time tracking | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Time tracking | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Multiple assignees for issues | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ |
|
| Multiple assignees for issues | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ |
|
||||||
| Related issues | ✘ | ✘ | ⁄ | ✓ | ✓ | ✘ | ✘ |
|
| Related issues | ✘ | ✘ | ⁄ | [✓](https://docs.gitlab.com/ce/user/project/issues/related_issues.html) | ✓ | ✘ | ✘ |
|
||||||
| Confidential issues | [✘](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Confidential issues | [✘](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Comment reactions | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Comment reactions | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Lock Discussion | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Lock Discussion | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Batch issue handling | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Batch issue handling | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Issue Boards (Kanban) | [/](https://github.com/go-gitea/gitea/issues/14710) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Issue Boards (Kanban) | [✓](https://github.com/go-gitea/gitea/pull/8346) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Create branch from issue | [✘](https://github.com/go-gitea/gitea/issues/20226) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Create new branches from issues | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Convert comment to new issue | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
|
||||||
| Issue search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| Issue search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| Global issue search | [/](https://github.com/go-gitea/gitea/issues/2434) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| Global issue search | [✘](https://github.com/go-gitea/gitea/issues/2434) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| Issue dependency | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
| Issue dependency | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
||||||
| Create issue via email | [✘](https://github.com/go-gitea/gitea/issues/6226) | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ |
|
| Create issue via email | [✘](https://github.com/go-gitea/gitea/issues/6226) | [✘](https://github.com/gogs/gogs/issues/2602) | ✘ | ✘ | ✓ | ✓ | ✘ |
|
||||||
| Service Desk | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Service Desk | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | [✓](https://gitlab.com/groups/gitlab-org/-/epics/3103) | ✓ | ✘ | ✘ |
|
||||||
|
|
||||||
## Pull/Merge requests
|
## Pull/Merge requests
|
||||||
|
|
||||||
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ----------------------------------------------- | -------------------------------------------------- | ---- | --------- | --------- | --------- | --------- | ------------ |
|
| ----------------------------------------------- | -------------------------------------------------- | ---- | --------- | --------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------ | ------------ |
|
||||||
| Pull/Merge requests | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Pull/Merge requests | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Squash merging | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Squash merging | ✓ | ✘ | ✓ | [✓](https://docs.gitlab.com/ce/user/project/merge_requests/squash_and_merge.html) | ✓ | ✓ | ✓ |
|
||||||
| Rebase merging | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Rebase merging | ✓ | ✓ | ✓ | ✘ | ⁄ | ✘ | ✓ |
|
||||||
| Pull/Merge request inline comments | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Pull/Merge request inline comments | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Pull/Merge request approval | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Pull/Merge request approval | ✓ | ✘ | ⁄ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Merge conflict resolution | [✘](https://github.com/go-gitea/gitea/issues/9014) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| Merge conflict resolution | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| Restrict push and merge access to certain users | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Restrict push and merge access to certain users | ✓ | ✘ | ✓ | ⁄ | ✓ | ✓ | ✓ |
|
||||||
| Revert specific commits | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| Revert specific commits or a merge request | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| Pull/Merge requests templates | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Pull/Merge requests templates | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Cherry-picking changes | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Cherry-picking changes | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Download Patch | ✓ | ✘ | ✓ | ✓ | ✓ | / | ✘ |
|
| Download Patch | ✓ | ✘ | ✓ | ✓ | ✓ | [/](https://jira.atlassian.com/plugins/servlet/mobile#issue/BCLOUD-8323) | ✘ |
|
||||||
|
|
||||||
## 3rd-party integrations
|
## 3rd-party integrations
|
||||||
|
|
||||||
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ---------------------------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ |
|
| ---------------------------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ |
|
||||||
| Webhooks | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Webhook support | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Git Hooks | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Custom Git Hooks | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| AD / LDAP integration | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| AD / LDAP integration | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Multiple LDAP / AD server support | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
| Multiple LDAP / AD server support | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| LDAP user synchronization | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| LDAP user synchronization | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| SAML 2.0 service provider | [✘](https://github.com/go-gitea/gitea/issues/5512) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| OpenId Connect support | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ |
|
||||||
| OpenID Connect support | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ |
|
|
||||||
| OAuth 2.0 integration (external authorization) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ |
|
| OAuth 2.0 integration (external authorization) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ |
|
||||||
| Act as OAuth 2.0 provider | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| Act as OAuth 2.0 provider | [✓](https://github.com/go-gitea/gitea/pull/5378) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| Two factor authentication (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| Two factor authentication (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| Integration with the most common services | ✓ | / | ⁄ | ✓ | ✓ | ⁄ | ✓ |
|
| Mattermost/Slack integration | ✓ | ✓ | ⁄ | ✓ | ✓ | ⁄ | ✓ |
|
||||||
| Incorporate external CI/CD | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Discord integration | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
|
| Microsoft Teams integration | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
|
| External CI/CD status display | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
|
|
@ -32,7 +32,7 @@ _表格中的符号含义:_
|
||||||
#### 主要特性
|
#### 主要特性
|
||||||
|
|
||||||
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| --------------------- | -------------------------------------------------- | ---- | --------- | --------- | --------- | -------------- | ------------ |
|
|-----------------------|-------|------|-----------|-----------|-----------|-----------|--------------|
|
||||||
| 开源免费 | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ |
|
| 开源免费 | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ |
|
||||||
| 低资源开销 (RAM/CPU) | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
| 低资源开销 (RAM/CPU) | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
||||||
| 支持多种数据库 | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ |
|
| 支持多种数据库 | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ |
|
||||||
|
@ -42,90 +42,87 @@ _表格中的符号含义:_
|
||||||
| 支持 Orgmode | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? |
|
| 支持 Orgmode | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? |
|
||||||
| 支持 CSV | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? |
|
| 支持 CSV | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? |
|
||||||
| 支持第三方渲染工具 | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? |
|
| 支持第三方渲染工具 | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? |
|
||||||
| Git 驱动的静态 pages | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Git 驱动的静态 pages | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| Git 驱动的集成化 wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (cloud only) | ✘ |
|
| Git 驱动的集成化 wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 部署令牌 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 部署令牌 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 仓库写权限令牌 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 仓库写权限令牌 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ |
|
||||||
| 内置容器 Registry | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 内置容器 Registry | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 外部 Git 镜像 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
| 外部 Git 镜像 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| WebAuthn (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ? |
|
| WebAuthn (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ? |
|
||||||
| 内置 CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 内置 CI/CD | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 子组织:组织内的组织 | [✘](https://github.com/go-gitea/gitea/issues/1872) | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
| 子组织:组织内的组织 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
||||||
|
|
||||||
#### 代码管理
|
#### 代码管理
|
||||||
|
|
||||||
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ---------------------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ |
|
|------------------------------------------|-------|------|-----------|-----------|-----------|-----------|--------------|
|
||||||
| 仓库主题描述 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 仓库主题描述 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 仓库内代码搜索 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 仓库内代码搜索 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 全局代码搜索 | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ |
|
| 全局代码搜索 | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ⁄ | ✓ |
|
||||||
| 组织里程碑 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| 组织里程碑 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 细粒度用户角色 (例如 Code, Issues, Wiki) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| 细粒度用户角色 (例如 Code, Issues, Wiki) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 提交人的身份验证 | ⁄ | ✘ | ? | ✓ | ✓ | ✓ | ✘ |
|
| 提交人的身份验证 | ✘ | ✘ | ? | ✓ | ✓ | ✓ | ✘ |
|
||||||
| GPG 签名的提交 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| GPG 签名的提交 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| SSH 签名的提交 | ✓ | ✘ | ✘ | ✘ | ✘ | ? | ? |
|
| SSH 签名的提交 | ✓ | ✘ | ✘ | ✘ | ✘ | ? | ? |
|
||||||
| 拒绝未用通过验证的提交 | [✓](https://github.com/go-gitea/gitea/pull/9708) | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 拒绝未用通过验证的提交 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ |
|
||||||
| 仓库活跃度页面 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 仓库活跃度页面 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 分支管理 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 分支管理 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 建立新分支 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 建立新分支 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 在线代码编辑 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 在线代码编辑 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 提交的统计图表 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 提交的统计图表 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 模板仓库 | [✓](https://github.com/go-gitea/gitea/pull/8768) | ✘ | ✓ | ✘ | ✓ | ✓ | ✘ |
|
|
||||||
|
|
||||||
#### 工单管理
|
#### Issue 管理
|
||||||
|
|
||||||
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ------------------- | -------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------------------------------------------------- | --------- | -------------- | ------------ |
|
|----------------------|-------|------|-----------|-----------|-----------|-----------|--------------|
|
||||||
| 工单跟踪 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (cloud only) | ✘ |
|
| 跟踪 Issue | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 工单模板 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Issue 模板 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 标签 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 标签 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 时间跟踪 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 跟踪时间 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 支持多个负责人 | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ |
|
| Issue 可有多个负责人 | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ |
|
||||||
| 关联的工单 | ✘ | ✘ | ⁄ | [✓](https://docs.gitlab.com/ce/user/project/issues/related_issues.html) | ✓ | ✘ | ✘ |
|
| 关联的 issues | ✘ | ✘ | ⁄ | ✘ | ✓ | ✘ | ✘ |
|
||||||
| 私密工单 | [✘](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| 私密 issues | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 评论反馈 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 评论反馈 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 锁定讨论 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 锁定讨论 | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 工单批处理 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Issue 批量处理 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 工单看板 | [✓](https://github.com/go-gitea/gitea/pull/8346) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| Issue 看板 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 从工单创建分支 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| 从 issues 创建分支 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 工单搜索 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| Issue 搜索 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 工单全局搜索 | [✘](https://github.com/go-gitea/gitea/issues/2434) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| 全局 Issue 搜索 | ✘ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 工单依赖关系 | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
| Issue 依赖 | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
|
||||||
| 通过 Email 创建工单 | [✘](https://github.com/go-gitea/gitea/issues/6226) | [✘](https://github.com/gogs/gogs/issues/2602) | ✘ | ✘ | ✓ | ✓ | ✘ |
|
| 通过 Email 创建工单 | [✘](https://github.com/go-gitea/gitea/issues/6226) | [✘](https://github.com/gogs/gogs/issues/2602) | ✘ | ✘ | ✓ | ✓ | ✘ |
|
||||||
| 服务台 | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | [✓](https://gitlab.com/groups/gitlab-org/-/epics/3103) | ✓ | ✘ | ✘ |
|
| Service Desk | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | ✘ | ✓ | ✘ | ✘ |
|
||||||
|
|
||||||
#### Pull/Merge requests
|
#### Pull/Merge requests
|
||||||
|
|
||||||
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| ------------------------------------ | -------------------------------------------------- | ---- | --------- | --------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------ | ------------ |
|
|--------------------------------------|-------|------|-----------|-----------|-----------|-----------|--------------|
|
||||||
| Pull/Merge requests | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Pull/Merge requests | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Squash merging | ✓ | ✘ | ✓ | [✓](https://docs.gitlab.com/ce/user/project/merge_requests/squash_and_merge.html) | ✓ | ✓ | ✓ |
|
| Squash merging | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| Rebase merging | ✓ | ✓ | ✓ | ✘ | ⁄ | ✘ | ✓ |
|
| Rebase merging | ✓ | ✓ | ✓ | ✘ | ⁄ | ✘ | ✓ |
|
||||||
| 评论 Pull/Merge request 中的某行代码 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 评论 Pull/Merge request 中的某行代码 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 指定 Pull/Merge request 的审核人 | ✓ | ✘ | ⁄ | ✓ | ✓ | ✓ | ✓ |
|
| 指定 Pull/Merge request 的审核人 | ✓ | ✘ | ⁄ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 解决 Merge 冲突 | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| 解决 Merge 冲突 | ✘ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 限制某些用户的 push 和 merge 权限 | ✓ | ✘ | ✓ | ⁄ | ✓ | ✓ | ✓ |
|
| 限制某些用户的 push 和 merge 权限 | ✓ | ✘ | ✓ | ⁄ | ✓ | ✓ | ✓ |
|
||||||
| 回退某些 commits 或 merge request | [✓](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| 回退某些 commits 或 merge request | ✘ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| Pull/Merge requests 模板 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| Pull/Merge requests 模板 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 查看 Cherry-picking 的更改 | [✓](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| 查看 Cherry-picking 的更改 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 下载 Patch | ✓ | ✘ | ✓ | ✓ | ✓ | [/](https://jira.atlassian.com/plugins/servlet/mobile#issue/BCLOUD-8323) | ✘ |
|
|
||||||
|
|
||||||
#### 第三方集成
|
#### 第三方集成
|
||||||
|
|
||||||
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
| 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE |
|
||||||
| -------------------------- | -------------------------------------------------- | --------------------------------------------- | --------- | --------- | --------- | --------- | ------------ |
|
|----------------------------|-------|------|-----------|-----------|-----------|-----------|--------------|
|
||||||
| 支持 Webhook | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 支持 Webhook | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 自定义 Git 钩子 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 自定义 Git 钩子 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 集成 AD / LDAP | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 集成 AD / LDAP | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 支持多个 LDAP / AD 服务 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
| 支持多个 LDAP / AD 服务 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| LDAP 用户同步 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| LDAP 用户同步 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| SAML 2.0 service provider | [✘](https://github.com/go-gitea/gitea/issues/5512) | [✘](https://github.com/gogs/gogs/issues/1221) | ✓ | ✓ | ✓ | ✓ | ✘ |
|
|
||||||
| 支持 OpenId 连接 | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ |
|
| 支持 OpenId 连接 | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ |
|
||||||
| 集成 OAuth 2.0(外部授权) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ |
|
| 集成 OAuth 2.0(外部授权) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ |
|
||||||
| 作为 OAuth 2.0 provider | [✓](https://github.com/go-gitea/gitea/pull/5378) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| 作为 OAuth 2.0 provider | [✓](https://github.com/go-gitea/gitea/pull/5378) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 二次验证 (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| 二次验证 (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 集成 Mattermost/Slack | ✓ | ✓ | ⁄ | ✓ | ✓ | ⁄ | ✓ |
|
| 集成 Mattermost/Slack | ✓ | ✓ | ⁄ | ✓ | ✓ | ⁄ | ✓ |
|
||||||
| 集成 Discord | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 集成 Discord | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 集成 Microsoft Teams | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
|
||||||
| 显示外部 CI/CD 的状态 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 显示外部 CI/CD 的状态 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
|
|
@ -50,7 +50,7 @@ menu:
|
||||||
| 有寫入權限的儲存庫 Token | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ |
|
| 有寫入權限的儲存庫 Token | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ |
|
||||||
| 內建 Container Registry | [✘](https://github.com/go-gitea/gitea/issues/2316) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
| 內建 Container Registry | [✘](https://github.com/go-gitea/gitea/issues/2316) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 對外部 Git 鏡像 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
| 對外部 Git 鏡像 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| FIDO (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| FIDO U2F (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
| 內建 CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
| 內建 CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ |
|
||||||
| 子群組: 群組中的群組 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
| 子群組: 群組中的群組 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ |
|
||||||
|
|
||||||
|
@ -121,7 +121,6 @@ menu:
|
||||||
| 整合 AD / LDAP | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 整合 AD / LDAP | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| 支援多重 LDAP / AD 伺服器 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
| 支援多重 LDAP / AD 伺服器 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ |
|
||||||
| 同步 LDAP 使用者 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| 同步 LDAP 使用者 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| SAML 2.0 service provider | [✘](https://github.com/go-gitea/gitea/issues/5512) | [✘](https://github.com/gogs/gogs/issues/1221) | ✓ | ✓ | ✓ | ✓ | ✘ |
|
|
||||||
| 支援 OpenId Connect | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ |
|
| 支援 OpenId Connect | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ |
|
||||||
| 整合 OAuth 2.0 (外部驗證) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ |
|
| 整合 OAuth 2.0 (外部驗證) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ |
|
||||||
| 成為 OAuth 2.0 提供者 | [✓](https://github.com/go-gitea/gitea/pull/5378) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
| 成為 OAuth 2.0 提供者 | [✓](https://github.com/go-gitea/gitea/pull/5378) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |
|
||||||
|
|
|
@ -27,7 +27,5 @@ For changes to a **non-English** translation, refer to the Crowdin project above
|
||||||
Any language listed in the above Crowdin project will be supported as long as 25% or more has been translated.
|
Any language listed in the above Crowdin project will be supported as long as 25% or more has been translated.
|
||||||
|
|
||||||
After a translation has been accepted, it will be reflected in the main repository after the next Crowdin sync, which is generally after any PR is merged.
|
After a translation has been accepted, it will be reflected in the main repository after the next Crowdin sync, which is generally after any PR is merged.
|
||||||
|
|
||||||
At the time of writing, this means that a changed translation may not appear until the following Gitea release.
|
At the time of writing, this means that a changed translation may not appear until the following Gitea release.
|
||||||
|
|
||||||
If you use a bleeding edge build, it should appear as soon as you update after the change is synced.
|
If you use a bleeding edge build, it should appear as soon as you update after the change is synced.
|
||||||
|
|
|
@ -26,7 +26,5 @@ menu:
|
||||||
上述 Crowdin 專案中列出的語言在翻譯超過 25% 後將被支援。
|
上述 Crowdin 專案中列出的語言在翻譯超過 25% 後將被支援。
|
||||||
|
|
||||||
翻譯被認可後將在下次 Crowdin 同步後進入到主儲存庫,通常是在任何合併請求被合併之後。
|
翻譯被認可後將在下次 Crowdin 同步後進入到主儲存庫,通常是在任何合併請求被合併之後。
|
||||||
|
|
||||||
這表示更改的翻譯要到下次 Gitea 發佈後才會出現。
|
這表示更改的翻譯要到下次 Gitea 發佈後才會出現。
|
||||||
|
|
||||||
如果您使用的是最新建置,它將會在同步完成、您更新後出現。
|
如果您使用的是最新建置,它將會在同步完成、您更新後出現。
|
||||||
|
|
|
@ -16,7 +16,6 @@ menu:
|
||||||
# Frequently Asked Questions <!-- omit in toc -->
|
# Frequently Asked Questions <!-- omit in toc -->
|
||||||
|
|
||||||
This page contains some common questions and answers.
|
This page contains some common questions and answers.
|
||||||
|
|
||||||
For more help resources, check all [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
|
For more help resources, check all [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
|
@ -26,17 +25,13 @@ For more help resources, check all [Support Options]({{< relref "doc/help/seek-h
|
||||||
## Difference between 1.x and 1.x.x downloads
|
## Difference between 1.x and 1.x.x downloads
|
||||||
|
|
||||||
Version 1.7.x will be used for this example.
|
Version 1.7.x will be used for this example.
|
||||||
|
|
||||||
**NOTE:** this example applies to Docker images as well!
|
**NOTE:** this example applies to Docker images as well!
|
||||||
|
|
||||||
On our [downloads page](https://dl.gitea.io/gitea/) you will see a 1.7 directory, as well as directories for 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, and 1.7.6.
|
On our [downloads page](https://dl.gitea.io/gitea/) you will see a 1.7 directory, as well as directories for 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, and 1.7.6.
|
||||||
|
|
||||||
The 1.7 and 1.7.0 directories are **not** the same. The 1.7 directory is built on each merged commit to the [`release/v1.7`](https://github.com/go-gitea/gitea/tree/release/v1.7) branch.
|
The 1.7 and 1.7.0 directories are **not** the same. The 1.7 directory is built on each merged commit to the [`release/v1.7`](https://github.com/go-gitea/gitea/tree/release/v1.7) branch.
|
||||||
|
|
||||||
The 1.7.0 directory, however, is a build that was created when the [`v1.7.0`](https://github.com/go-gitea/gitea/releases/tag/v1.7.0) tag was created.
|
The 1.7.0 directory, however, is a build that was created when the [`v1.7.0`](https://github.com/go-gitea/gitea/releases/tag/v1.7.0) tag was created.
|
||||||
|
|
||||||
This means that 1.x downloads will change as commits are merged to their respective branch (think of it as a separate "main" branch for each release).
|
This means that 1.x downloads will change as commits are merged to their respective branch (think of it as a separate "main" branch for each release).
|
||||||
|
|
||||||
On the other hand, 1.x.x downloads should never change.
|
On the other hand, 1.x.x downloads should never change.
|
||||||
|
|
||||||
## How to migrate from Gogs/GitHub/etc. to Gitea
|
## How to migrate from Gogs/GitHub/etc. to Gitea
|
||||||
|
@ -47,13 +42,10 @@ To migrate from Gogs to Gitea:
|
||||||
- [Gogs version 0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286)
|
- [Gogs version 0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286)
|
||||||
|
|
||||||
To migrate from GitHub to Gitea, you can use Gitea's built-in migration form.
|
To migrate from GitHub to Gitea, you can use Gitea's built-in migration form.
|
||||||
|
|
||||||
In order to migrate items such as issues, pull requests, etc. you will need to input at least your username.
|
In order to migrate items such as issues, pull requests, etc. you will need to input at least your username.
|
||||||
|
|
||||||
[Example (requires login)](https://try.gitea.io/repo/migrate)
|
[Example (requires login)](https://try.gitea.io/repo/migrate)
|
||||||
|
|
||||||
To migrate from GitLab to Gitea, you can use this non-affiliated tool:
|
To migrate from GitLab to Gitea, you can use this non-affiliated tool:
|
||||||
|
|
||||||
https://github.com/loganinak/MigrateGitlabToGogs
|
https://github.com/loganinak/MigrateGitlabToGogs
|
||||||
|
|
||||||
## Where does Gitea store what file
|
## Where does Gitea store what file
|
||||||
|
@ -91,9 +83,9 @@ There are a few places that could make this show incorrectly.
|
||||||
|
|
||||||
If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini`
|
If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini`
|
||||||
|
|
||||||
- `DISABLE_HTTP_GIT`: if set to true, there will be no HTTP/HTTPS link
|
`DISABLE_HTTP_GIT`: if set to true, there will be no HTTP/HTTPS link
|
||||||
- `DISABLE_SSH`: if set to true, there will be no SSH link
|
`DISABLE_SSH`: if set to true, there will be no SSH link
|
||||||
- `SSH_EXPOSE_ANONYMOUS`: if set to false, SSH links will be hidden for anonymous users
|
`SSH_EXPOSE_ANONYMOUS`: if set to false, SSH links will be hidden for anonymous users
|
||||||
|
|
||||||
## File upload fails with: 413 Request Entity Too Large
|
## File upload fails with: 413 Request Entity Too Large
|
||||||
|
|
||||||
|
@ -104,20 +96,18 @@ See the [reverse proxy guide]({{< relref "doc/usage/reverse-proxies.en-us.md" >}
|
||||||
## Custom Templates not loading or working incorrectly
|
## Custom Templates not loading or working incorrectly
|
||||||
|
|
||||||
Gitea's custom templates must be added to the correct location or Gitea will not find and use them.
|
Gitea's custom templates must be added to the correct location or Gitea will not find and use them.
|
||||||
|
|
||||||
The correct path for the template(s) will be relative to the `CustomPath`
|
The correct path for the template(s) will be relative to the `CustomPath`
|
||||||
|
|
||||||
1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration
|
1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration
|
||||||
|
|
||||||
If that doesn't exist, you can try `echo $GITEA_CUSTOM`
|
- If that doesn't exist, you can try `echo $GITEA_CUSTOM`
|
||||||
|
|
||||||
2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file)
|
2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-x-file)
|
||||||
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}}) page to add your template to the correct location.
|
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}}) page to add your template to the correct location.
|
||||||
|
|
||||||
## Active user vs login prohibited user
|
## Active user vs login prohibited user
|
||||||
|
|
||||||
In Gitea, an "active" user refers to a user that has activated their account via email.
|
In Gitea, an "active" user refers to a user that has activated their account via email.
|
||||||
|
|
||||||
A "login prohibited" user is a user that is not allowed to log in to Gitea anymore
|
A "login prohibited" user is a user that is not allowed to log in to Gitea anymore
|
||||||
|
|
||||||
## Setting up logging
|
## Setting up logging
|
||||||
|
@ -126,13 +116,11 @@ A "login prohibited" user is a user that is not allowed to log in to Gitea anymo
|
||||||
|
|
||||||
## What is Swagger?
|
## What is Swagger?
|
||||||
|
|
||||||
[Swagger](https://swagger.io/) is what Gitea uses for its API documentation.
|
[Swagger](https://swagger.io/) is what Gitea uses for its API.
|
||||||
|
All Gitea instances have the built-in API, though it can be disabled by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`
|
||||||
|
For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api-usage.en-us.md" >}})
|
||||||
|
|
||||||
All Gitea instances have the built-in API and there is no way to disable it completely.
|
[Swagger Example](https://try.gitea.io/api/swagger)
|
||||||
You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`.
|
|
||||||
For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api-usage.en-us.md" >}}).
|
|
||||||
|
|
||||||
You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
|
|
||||||
|
|
||||||
## Adjusting your server for public/private use
|
## Adjusting your server for public/private use
|
||||||
|
|
||||||
|
@ -152,7 +140,6 @@ You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your a
|
||||||
### Only allow/block certain OpenID providers
|
### Only allow/block certain OpenID providers
|
||||||
|
|
||||||
You can configure `WHITELISTED_URIS` or `BLACKLISTED_URIS` under `[openid]` in your `app.ini`
|
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
|
**NOTE:** whitelisted takes precedence, so if it is non-blank then blacklisted is ignored
|
||||||
|
|
||||||
### Issue only users
|
### Issue only users
|
||||||
|
@ -177,57 +164,46 @@ Gitea supports three official themes right now, `gitea` (light), `arc-green` (da
|
||||||
To add your own theme, currently the only way is to provide a complete theme (not just color overrides)
|
To add your own theme, currently the only way is to provide a complete theme (not just color overrides)
|
||||||
|
|
||||||
As an example, let's say our theme is `arc-blue` (this is a real theme, and can be found [in this issue](https://github.com/go-gitea/gitea/issues/6011))
|
As an example, let's say our theme is `arc-blue` (this is a real theme, and can be found [in this issue](https://github.com/go-gitea/gitea/issues/6011))
|
||||||
|
|
||||||
Name the `.css` file `theme-arc-blue.css` and add it to your custom folder in `custom/public/css`
|
Name the `.css` file `theme-arc-blue.css` and add it to your custom folder in `custom/public/css`
|
||||||
|
|
||||||
Allow users to use it by adding `arc-blue` to the list of `THEMES` in your `app.ini`
|
Allow users to use it by adding `arc-blue` to the list of `THEMES` in your `app.ini`
|
||||||
|
|
||||||
## SSHD vs built-in SSH
|
## SSHD vs built-in SSH
|
||||||
|
|
||||||
SSHD is the built-in SSH server on most Unix systems.
|
SSHD is the built-in SSH server on most Unix systems.
|
||||||
|
|
||||||
Gitea also provides its own SSH server, for usage when SSHD is not available.
|
Gitea also provides its own SSH server, for usage when SSHD is not available.
|
||||||
|
|
||||||
## Gitea is running slow
|
## Gitea is running slow
|
||||||
|
|
||||||
The most common culprit for this is loading federated avatars.
|
The most common culprit for this is loading federated avatars.
|
||||||
|
|
||||||
This can be turned off by setting `ENABLE_FEDERATED_AVATAR` to `false` in your `app.ini`
|
This can be turned off by setting `ENABLE_FEDERATED_AVATAR` to `false` in your `app.ini`
|
||||||
|
|
||||||
Another option that may need to be changed is setting `DISABLE_GRAVATAR` to `true` in your `app.ini`
|
Another option that may need to be changed is setting `DISABLE_GRAVATAR` to `true` in your `app.ini`
|
||||||
|
|
||||||
## Can't create repositories/files
|
## Can't create repositories/files
|
||||||
|
|
||||||
Make sure that Gitea has sufficient permissions to write to its home directory and data directory.
|
Make sure that Gitea has sufficient permissions to write to its home directory and data directory.
|
||||||
|
See [AppDataPath and RepoRootPath](#where-does-gitea-store-x-file)
|
||||||
See [AppDataPath and RepoRootPath](#where-does-gitea-store-what-file)
|
|
||||||
|
|
||||||
**Note for Arch users:** At the time of writing this, there is an issue with the Arch package's systemd file including this line:
|
**Note for Arch users:** At the time of writing this, there is an issue with the Arch package's systemd file including this line:
|
||||||
|
|
||||||
`ReadWritePaths=/etc/gitea/app.ini`
|
`ReadWritePaths=/etc/gitea/app.ini`
|
||||||
|
|
||||||
Which makes all other paths non-writeable to Gitea.
|
Which makes all other paths non-writeable to Gitea.
|
||||||
|
|
||||||
## Translation is incorrect/how to add more translations
|
## Translation is incorrect/how to add more translations
|
||||||
|
|
||||||
Our translations are currently crowd-sourced on our [Crowdin project](https://crowdin.com/project/gitea)
|
Our translations are currently crowd-sourced on our [Crowdin project](https://crowdin.com/project/gitea)
|
||||||
|
|
||||||
Whether you want to change a translation or add a new one, it will need to be there as all translations are overwritten in our CI via the Crowdin integration.
|
Whether you want to change a translation or add a new one, it will need to be there as all translations are overwritten in our CI via the Crowdin integration.
|
||||||
|
|
||||||
## Push Hook / Webhook aren't running
|
## Hooks aren't running
|
||||||
|
|
||||||
If you can push but can't see push activities on the home dashboard, or the push doesn't trigger webhook, there are a few possibilities:
|
If Gitea is not running hooks, a common cause is incorrect setup of SSH keys.
|
||||||
|
See [SSH Issues](#ssh-issues) for more information.
|
||||||
|
|
||||||
1. The git hooks are out of sync: run "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel
|
You can also try logging into the administration panel and running the `Resynchronize pre-receive, update and post-receive hooks of all repositories.` option.
|
||||||
2. The git repositories (and hooks) are stored on some filesystems (ex: mounted by NAS) which don't support script execution, make sure the filesystem supports `chmod a+x any-script`
|
|
||||||
3. If you are using docker, make sure Docker Server (not the client) >= 20.10.6
|
|
||||||
|
|
||||||
## SSH issues
|
## SSH issues
|
||||||
|
|
||||||
If you cannot reach repositories over `ssh`, but `https` works fine, consider looking into the following.
|
If you cannot reach repositories over `ssh`, but `https` works fine, consider looking into the following.
|
||||||
|
|
||||||
First, make sure you can access Gitea via SSH.
|
First, make sure you can access Gitea via SSH.
|
||||||
|
|
||||||
`ssh git@myremote.example`
|
`ssh git@myremote.example`
|
||||||
|
|
||||||
If the connection is successful, you should receive an error message like the following:
|
If the connection is successful, you should receive an error message like the following:
|
||||||
|
@ -261,7 +237,6 @@ following things:
|
||||||
- Make sure the repository exists and is correctly named.
|
- Make sure the repository exists and is correctly named.
|
||||||
- Check the permissions of the `.ssh` directory in the system user's home directory.
|
- Check the permissions of the `.ssh` directory in the system user's home directory.
|
||||||
- Verify that the correct public keys are added to `.ssh/authorized_keys`.
|
- Verify that the correct public keys are added to `.ssh/authorized_keys`.
|
||||||
|
|
||||||
Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the
|
Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the
|
||||||
Gitea admin panel.
|
Gitea admin panel.
|
||||||
- Read Gitea logs.
|
- Read Gitea logs.
|
||||||
|
@ -315,7 +290,6 @@ error: failed to push some refs to '<GIT_REPO_URL>'
|
||||||
```
|
```
|
||||||
|
|
||||||
Check the value of `LFS_HTTP_AUTH_EXPIRY` in your `app.ini` file.
|
Check the value of `LFS_HTTP_AUTH_EXPIRY` in your `app.ini` file.
|
||||||
|
|
||||||
By default, your LFS token will expire after 20 minutes. If you have a slow connection or a large file (or both), it may not finish uploading within the time limit.
|
By default, your LFS token will expire after 20 minutes. If you have a slow connection or a large file (or both), it may not finish uploading within the time limit.
|
||||||
|
|
||||||
You may want to set this value to `60m` or `120m`.
|
You may want to set this value to `60m` or `120m`.
|
||||||
|
@ -333,20 +307,16 @@ There is no setting for password resets. It is enabled when a [mail service]({{<
|
||||||
- As an **admin**, you can change any user's password (and optionally force them to change it on next login)...
|
- As an **admin**, you can change any user's password (and optionally force them to change it on next login)...
|
||||||
- By navigating to your `Site Administration -> User Accounts` page and editing a user.
|
- By navigating to your `Site Administration -> User Accounts` page and editing a user.
|
||||||
- By using the [admin CLI commands]({{< relref "doc/usage/command-line.en-us.md#admin" >}}).
|
- By using the [admin CLI commands]({{< relref "doc/usage/command-line.en-us.md#admin" >}}).
|
||||||
|
|
||||||
Keep in mind most commands will also need a [global flag]({{< relref "doc/usage/command-line.en-us.md#global-options" >}}) to point the CLI at the correct configuration.
|
Keep in mind most commands will also need a [global flag]({{< relref "doc/usage/command-line.en-us.md#global-options" >}}) to point the CLI at the correct configuration.
|
||||||
- As a **user** you can change it...
|
- As a **user** you can change it...
|
||||||
- In your account `Settings -> Account` page (this method **requires** you to know your current password).
|
- In your account `Settings -> Account` page (this method **requires** you to know your current password).
|
||||||
- By using the `Forgot Password` link.
|
- By using the `Forgot Password` link.
|
||||||
|
|
||||||
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service]({{< relref "doc/usage/email-setup.en-us.md" >}}).
|
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service]({{< relref "doc/usage/email-setup.en-us.md" >}}).
|
||||||
|
|
||||||
## Why is my markdown broken
|
## Why is my markdown broken
|
||||||
|
|
||||||
In Gitea version `1.11` we moved to [goldmark](https://github.com/yuin/goldmark) for markdown rendering, which is [CommonMark](https://commonmark.org/) compliant.
|
In Gitea version `1.11` we moved to [goldmark](https://github.com/yuin/goldmark) for markdown rendering, which is [CommonMark](https://commonmark.org/) compliant.
|
||||||
|
|
||||||
If you have markdown that worked as you expected prior to version `1.11` and after upgrading it's not working anymore, please look through the CommonMark spec to see whether the problem is due to a bug or non-compliant syntax.
|
If you have markdown that worked as you expected prior to version `1.11` and after upgrading it's not working anymore, please look through the CommonMark spec to see whether the problem is due to a bug or non-compliant syntax.
|
||||||
|
|
||||||
If it is the latter, _usually_ there is a compliant alternative listed in the spec.
|
If it is the latter, _usually_ there is a compliant alternative listed in the spec.
|
||||||
|
|
||||||
## Upgrade errors with MySQL
|
## Upgrade errors with MySQL
|
||||||
|
@ -363,9 +333,7 @@ is too small. Gitea requires that the `ROWFORMAT` for its tables is `DYNAMIC`.
|
||||||
If you are receiving an error line containing `Error 1071: Specified key was too long; max key length is 1000 bytes...`
|
If you are receiving an error line containing `Error 1071: Specified key was too long; max key length is 1000 bytes...`
|
||||||
then you are attempting to run Gitea on tables which use the ISAM engine. While this may have worked by chance in previous versions of Gitea, it has never been officially supported and
|
then you are attempting to run Gitea on tables which use the ISAM engine. While this may have worked by chance in previous versions of Gitea, it has never been officially supported and
|
||||||
you must use InnoDB. You should run `ALTER TABLE table_name ENGINE=InnoDB;` for each table in the database.
|
you must use InnoDB. You should run `ALTER TABLE table_name ENGINE=InnoDB;` for each table in the database.
|
||||||
|
|
||||||
If you are using MySQL 5, another possible fix is
|
If you are using MySQL 5, another possible fix is
|
||||||
|
|
||||||
```mysql
|
```mysql
|
||||||
SET GLOBAL innodb_file_format=Barracuda;
|
SET GLOBAL innodb_file_format=Barracuda;
|
||||||
SET GLOBAL innodb_file_per_table=1;
|
SET GLOBAL innodb_file_per_table=1;
|
||||||
|
@ -392,9 +360,7 @@ Gitea requires the system or browser to have one of the supported Emoji fonts in
|
||||||
|
|
||||||
Stdout on systemd goes to the journal by default. Try using `journalctl`, `journalctl -u gitea`, or `journalctl <path-to-gitea-binary>`.
|
Stdout on systemd goes to the journal by default. Try using `journalctl`, `journalctl -u gitea`, or `journalctl <path-to-gitea-binary>`.
|
||||||
|
|
||||||
Similarly, stdout on docker can be viewed using `docker logs <container>`.
|
Similarly stdout on docker can be viewed using `docker logs <container>`
|
||||||
|
|
||||||
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
|
|
||||||
|
|
||||||
## Initial logging
|
## Initial logging
|
||||||
|
|
||||||
|
@ -415,7 +381,7 @@ unchanged in the database schema. This may lead to warning such as:
|
||||||
2020/08/02 11:32:29 ...rm/session_schema.go:360:Sync2() [W] Table user Column keep_activity_private db default is , struct default is 0
|
2020/08/02 11:32:29 ...rm/session_schema.go:360:Sync2() [W] Table user Column keep_activity_private db default is , struct default is 0
|
||||||
```
|
```
|
||||||
|
|
||||||
These can safely be ignored, but you are able to stop these warnings by getting Gitea to recreate these tables using:
|
These can safely be ignored but you may able to stop these warnings by getting Gitea to recreate these tables using:
|
||||||
|
|
||||||
```
|
```
|
||||||
gitea doctor recreate-table user
|
gitea doctor recreate-table user
|
||||||
|
@ -437,9 +403,3 @@ gitea doctor recreate-table
|
||||||
```
|
```
|
||||||
|
|
||||||
It is highly recommended to back-up your database before running these commands.
|
It is highly recommended to back-up your database before running these commands.
|
||||||
|
|
||||||
## Why are tabs/indents wrong when viewing files
|
|
||||||
|
|
||||||
If you are using Cloudflare, turn off the auto-minify option in the dashboard.
|
|
||||||
|
|
||||||
`Speed` -> `Optimization` -> Uncheck `HTML` within the `Auto-Minify` settings.
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
date: "2019-11-12T16:00:00+02:00"
|
|
||||||
title: "Search"
|
|
||||||
slug: "search"
|
|
||||||
weight: 4
|
|
||||||
toc: false
|
|
||||||
draft: false
|
|
||||||
sitemap:
|
|
||||||
priority : 0.1
|
|
||||||
layout: "search"
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
This file exists solely to respond to /search URL with the related `search` layout template.
|
|
||||||
|
|
||||||
No content shown here is rendered, all content is based in the template layouts/doc/search.html
|
|
||||||
|
|
||||||
Setting a very low sitemap priority will tell search engines this is not important content.
|
|
|
@ -5,6 +5,12 @@ slug: "search"
|
||||||
weight: 4
|
weight: 4
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
|
menu:
|
||||||
|
sidebar:
|
||||||
|
parent: "help"
|
||||||
|
name: "Search"
|
||||||
|
weight: 4
|
||||||
|
identifier: "search"
|
||||||
sitemap:
|
sitemap:
|
||||||
priority : 0.1
|
priority : 0.1
|
||||||
layout: "search"
|
layout: "search"
|
||||||
|
|
|
@ -5,6 +5,12 @@ slug: "search"
|
||||||
weight: 4
|
weight: 4
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
|
menu:
|
||||||
|
sidebar:
|
||||||
|
parent: "help"
|
||||||
|
name: "Chercher"
|
||||||
|
weight: 4
|
||||||
|
identifier: "search"
|
||||||
sitemap:
|
sitemap:
|
||||||
priority : 0.1
|
priority : 0.1
|
||||||
layout: "search"
|
layout: "search"
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
date: "2019-11-12T16:00:00+02:00"
|
|
||||||
title: "Search"
|
|
||||||
slug: "search"
|
|
||||||
weight: 4
|
|
||||||
toc: false
|
|
||||||
draft: false
|
|
||||||
sitemap:
|
|
||||||
priority : 0.1
|
|
||||||
layout: "search"
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
This file exists solely to respond to /search URL with the related `search` layout template.
|
|
||||||
|
|
||||||
No content shown here is rendered, all content is based in the template layouts/doc/search.html
|
|
||||||
|
|
||||||
Setting a very low sitemap priority will tell search engines this is not important content.
|
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
date: "2019-11-12T16:00:00+02:00"
|
|
||||||
title: "Search"
|
|
||||||
slug: "search"
|
|
||||||
weight: 4
|
|
||||||
toc: false
|
|
||||||
draft: false
|
|
||||||
sitemap:
|
|
||||||
priority : 0.1
|
|
||||||
layout: "search"
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
This file exists solely to respond to /search URL with the related `search` layout template.
|
|
||||||
|
|
||||||
No content shown here is rendered, all content is based in the template layouts/doc/search.html
|
|
||||||
|
|
||||||
Setting a very low sitemap priority will tell search engines this is not important content.
|
|
|
@ -5,6 +5,12 @@ slug: "search"
|
||||||
weight: 4
|
weight: 4
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
|
menu:
|
||||||
|
sidebar:
|
||||||
|
parent: "help"
|
||||||
|
name: "搜索"
|
||||||
|
weight: 4
|
||||||
|
identifier: "search"
|
||||||
sitemap:
|
sitemap:
|
||||||
priority : 0.1
|
priority : 0.1
|
||||||
layout: "search"
|
layout: "search"
|
||||||
|
|
|
@ -5,6 +5,12 @@ slug: "search"
|
||||||
weight: 4
|
weight: 4
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
|
menu:
|
||||||
|
sidebar:
|
||||||
|
parent: "help"
|
||||||
|
name: "搜尋"
|
||||||
|
weight: 4
|
||||||
|
identifier: "search"
|
||||||
sitemap:
|
sitemap:
|
||||||
priority : 0.1
|
priority : 0.1
|
||||||
layout: "search"
|
layout: "search"
|
||||||
|
|
|
@ -20,43 +20,20 @@ menu:
|
||||||
|
|
||||||
**NOTE:** When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need:
|
**NOTE:** When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need:
|
||||||
|
|
||||||
1. Your `app.ini` (with any sensitive data scrubbed as necessary).
|
1. Your `app.ini` (with any sensitive data scrubbed as necessary)
|
||||||
2. The Gitea logs, and any other appropriate log files for the situation.
|
2. The `gitea.log` (and any other appropriate log files for the situation)
|
||||||
- When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs.
|
* e.g. If the error is related to the database, the `xorm.log` might be helpful
|
||||||
- When using docker, use `docker logs --tail 1000 <gitea-container>` to collect logs.
|
3. Any error messages you are seeing
|
||||||
- By default, the logs are outputted to console. If you need to collect logs from files,
|
|
||||||
you could copy the following config into your `app.ini` (remove all other `[log]` sections),
|
|
||||||
then you can find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`).
|
|
||||||
|
|
||||||
```ini
|
|
||||||
; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
|
|
||||||
[log]
|
|
||||||
LEVEL=debug
|
|
||||||
MODE=console,file
|
|
||||||
ROUTER=console,file
|
|
||||||
XORM=console,file
|
|
||||||
ENABLE_XORM_LOG=true
|
|
||||||
FILE_NAME=gitea.log
|
|
||||||
[log.file.router]
|
|
||||||
FILE_NAME=router.log
|
|
||||||
[log.file.xorm]
|
|
||||||
FILE_NAME=xorm.log
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Any error messages you are seeing.
|
|
||||||
4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue.
|
4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue.
|
||||||
- This will greatly improve the chance that the root of the issue can be quickly discovered and resolved.
|
* This will greatly improve the chance that the root of the issue can be quickly discovered and resolved.
|
||||||
5. If you meet slow/hanging/deadlock problems, please report the stack trace when the problem occurs:
|
5. If you meet slow/hanging/deadlock problems, please report the stack trace when the problem occurs:
|
||||||
1. Enable pprof in `app.ini` and restart Gitea
|
1. Enable pprof in `app.ini` and restart Gitea
|
||||||
|
```
|
||||||
```ini
|
|
||||||
[server]
|
[server]
|
||||||
ENABLE_PPROF = true
|
ENABLE_PPROF = true
|
||||||
```
|
```
|
||||||
|
2. Trigger the bug, when Gitea gets stuck, use curl or browser to visit: `http://127.0.0.1:6060/debug/pprof/goroutine?debug=1` (IP is `127.0.0.1` and port is `6060`)
|
||||||
2. Trigger the bug, when Gitea gets stuck, use curl or browser to visit: `http://127.0.0.1:6060/debug/pprof/goroutine?debug=1` (IP must be `127.0.0.1` and port must be `6060`).
|
3. Report the output (the stack trace doesn't contain sensitive data)
|
||||||
3. If you are using Docker, please use `docker exec -it <container-name> curl "http://127.0.0.1:6060/debug/pprof/goroutine?debug=1"`.
|
|
||||||
4. Report the output (the stack trace doesn't contain sensitive data)
|
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ menu:
|
||||||
|
|
||||||
1. 您的 `app.ini` (必要時清除掉任何機密資訊)
|
1. 您的 `app.ini` (必要時清除掉任何機密資訊)
|
||||||
2. `gitea.log` (以及任何有關的日誌檔案)
|
2. `gitea.log` (以及任何有關的日誌檔案)
|
||||||
- 例:如果錯誤和資料庫相關,提供 `xorm.log` 可能會有幫助
|
* 例:如果錯誤和資料庫相關,提供 `xorm.log` 可能會有幫助
|
||||||
3. 您看到的任何錯誤訊息
|
3. 您看到的任何錯誤訊息
|
||||||
4. 儘可能地在 [try.gitea.io](https://try.gitea.io) 觸發您的問題並記下步驟,以便其他人能重現那個問題。
|
4. 儘可能地在 [try.gitea.io](https://try.gitea.io) 觸發您的問題並記下步驟,以便其他人能重現那個問題。
|
||||||
- 這將讓我們更有機會快速地找出問題的根源並解決它。
|
* 這將讓我們更有機會快速地找出問題的根源並解決它。
|
||||||
5. 堆棧跟踪,[請參考英文文檔](https://docs.gitea.io/en-us/seek-help/)
|
5. 堆棧跟踪,[請參考英文文檔](https://docs.gitea.io/en-us/seek-help/)
|
||||||
|
|
||||||
## 錯誤回報
|
## 錯誤回報
|
||||||
|
|
|
@ -24,31 +24,14 @@ embedded assets. This can be different for older releases.
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
You can find the file matching your platform from the [downloads page](https://dl.gitea.io/gitea/) after navigating to the version you want to download.
|
Choose the file matching the destination platform from the [downloads page](https://dl.gitea.io/gitea/), copy the URL and replace the URL within the commands below:
|
||||||
|
|
||||||
### Choosing the right file
|
|
||||||
|
|
||||||
**For Linux**, you will likely want `linux-amd64`. It's for 64-bit Intel/AMD platforms, but there are other platforms available, including `arm64` (e.g. Raspberry PI 4), `386` (i.e. 32-bit), `arm-5`, and `arm-6`.
|
|
||||||
|
|
||||||
**For Windows**, you will likely want `windows-4.0-amd64`. It's for all modern versions of Windows, but there is also a `386` platform available designed for older, 32-bit versions of Windows.
|
|
||||||
|
|
||||||
*Note: there is also a `gogit-windows` file available that was created to help with some [performance problems](https://github.com/go-gitea/gitea/pull/15482) reported by some Windows users on older systems/versions. You should consider using this file if you're experiencing performance issues, and let us know if it improves performance.*
|
|
||||||
|
|
||||||
**For macOS**, you should choose `darwin-arm64` if your hardware uses Apple Silicon, or `darwin-amd64` for Intel.
|
|
||||||
|
|
||||||
### Downloading with wget
|
|
||||||
|
|
||||||
Copy the commands below and replace the URL within the one you wish to download.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64
|
wget -O gitea https://dl.gitea.io/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64
|
||||||
chmod +x gitea
|
chmod +x gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the above command will download Gitea {{< version >}} for 64-bit Linux.
|
|
||||||
|
|
||||||
## Verify GPG signature
|
## 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.
|
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.
|
To validate the binary, download the signature file which ends in `.asc` for the binary you downloaded and use the GPG command line tool.
|
||||||
|
|
||||||
|
@ -73,8 +56,7 @@ Check that Git is installed on the server. If it is not, install it first. Gitea
|
||||||
git --version
|
git --version
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a user to run Gitea (e.g. `git`)
|
Create user to run Gitea (ex. `git`)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
adduser \
|
adduser \
|
||||||
--system \
|
--system \
|
||||||
|
@ -97,39 +79,29 @@ chown root:git /etc/gitea
|
||||||
chmod 770 /etc/gitea
|
chmod 770 /etc/gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
> **NOTE:** `/etc/gitea` is temporarily set with write permissions for user `git` so that the web installer can write the configuration file. After the installation is finished, it is recommended to set permissions to read-only using:
|
**NOTE:** `/etc/gitea` is temporary set with write rights for user `git` so that Web installer could write configuration file. After installation is done, it is recommended to set rights to read-only using:
|
||||||
>
|
```
|
||||||
> ```sh
|
chmod 750 /etc/gitea
|
||||||
> chmod 750 /etc/gitea
|
chmod 640 /etc/gitea/app.ini
|
||||||
> chmod 640 /etc/gitea/app.ini
|
```
|
||||||
> ```
|
If you don't want the web installer to be able to write the config file at all, it is also possible to make the config file read-only for the Gitea user (owner/group `root:git`, mode `0640`), and set `INSTALL_LOCK = true`. In that case all database configuration details must be set beforehand in the config file, as well as the `SECRET_KEY` and `INTERNAL_TOKEN` values. See the [command line documentation]({{< relref "doc/usage/command-line.en-us.md" >}}) for information on using `gitea generate secret INTERNAL_TOKEN`.
|
||||||
|
|
||||||
If you don't want the web installer to be able to write to the config file, it is possible to make the config file read-only for the Gitea user (owner/group `root:git`, mode `0640`) however you will need to edit your config file manually to:
|
|
||||||
|
|
||||||
* Set `INSTALL_LOCK= true`,
|
|
||||||
* Ensure all database configuration details are set correctly
|
|
||||||
* Ensure that the `SECRET_KEY` and `INTERNAL_TOKEN` values are set. (You may want to use the `gitea generate secret` to generate these secret keys.)
|
|
||||||
* Ensure that any other secret keys you need are set.
|
|
||||||
|
|
||||||
See the [command line documentation]({{< relref "doc/usage/command-line.en-us.md" >}}) for information on using `gitea generate secret`.
|
|
||||||
|
|
||||||
### Configure Gitea's working directory
|
### Configure Gitea's working directory
|
||||||
|
|
||||||
**NOTE:** If you plan on running Gitea as a Linux service, you can skip this step, as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
|
**NOTE:** If you plan on running Gitea as a Linux service, you can skip this step as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
|
||||||
|
```
|
||||||
```sh
|
|
||||||
export GITEA_WORK_DIR=/var/lib/gitea/
|
export GITEA_WORK_DIR=/var/lib/gitea/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Copy the Gitea binary to a global location
|
### Copy Gitea binary to global location
|
||||||
|
|
||||||
```sh
|
```
|
||||||
cp gitea /usr/local/bin/gitea
|
cp gitea /usr/local/bin/gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running Gitea
|
## Running Gitea
|
||||||
|
|
||||||
After you complete the above steps, you can run Gitea two ways:
|
After the above steps, two options to run Gitea are:
|
||||||
|
|
||||||
### 1. Creating a service file to start Gitea automatically (recommended)
|
### 1. Creating a service file to start Gitea automatically (recommended)
|
||||||
|
|
||||||
|
@ -137,31 +109,32 @@ See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md"
|
||||||
|
|
||||||
### 2. Running from command-line/terminal
|
### 2. Running from command-line/terminal
|
||||||
|
|
||||||
```sh
|
```
|
||||||
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
|
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||||
```
|
```
|
||||||
|
|
||||||
## Updating to a new version
|
## Updating to a new version
|
||||||
|
|
||||||
You can update to a new version of Gitea by stopping Gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.
|
You can update to a new version of Gitea by stopping Gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.
|
||||||
The binary file name should not be changed during the update to avoid problems in existing repositories.
|
The binary file name should not be changed during the update to avoid problems
|
||||||
|
in existing repositories.
|
||||||
|
|
||||||
It is recommended that you make a [backup]({{< relref "doc/usage/backup-and-restore.en-us.md" >}}) before updating your installation.
|
It is recommended you do a [backup]({{< relref "doc/usage/backup-and-restore.en-us.md" >}}) before updating your installation.
|
||||||
|
|
||||||
If you have carried out the installation steps as described above, the binary should
|
If you have carried out the installation steps as described above, the binary should
|
||||||
have the generic name `gitea`. Do not change this, i.e. to include the version number.
|
have the generic name `gitea`. Do not change this, i.e. to include the version number.
|
||||||
|
|
||||||
### 1. Restarting Gitea with systemd (recommended)
|
### 1. Restarting Gitea with systemd (recommended)
|
||||||
|
|
||||||
As we explained before, we recommend to use systemd as the service manager. In this case, `systemctl restart gitea` should be fine.
|
As explained before, we recommend to use systemd as service manager. In this case ```systemctl restart gitea``` should be enough.
|
||||||
|
|
||||||
### 2. Restarting Gitea without systemd
|
### 2. Restarting Gitea without systemd
|
||||||
|
|
||||||
To restart your Gitea instance, we recommend to use SIGHUP signal. If you know your Gitea PID, use `kill -1 $GITEA_PID`, otherwise you can use `killall -1 gitea`.
|
To restart your Gitea instance, we recommend to use SIGHUP signal. If you know your Gitea PID use ```kill -1 $GITEA_PID``` otherwise you can use ```killall -1 gitea``` or ```pkill -1 gitea```
|
||||||
|
|
||||||
To gracefully stop the Gitea instance, a simple `kill $GITEA_PID` or `killall gitea` is enough.
|
To gracefully stop the Gitea instance, a simple ```kill $GITEA_PID``` or ```killall gitea``` is enough.
|
||||||
|
|
||||||
**NOTE:** We don't recommend to use the SIGKILL signal (`-9`); you may be forcefully stopping some of Gitea's internal tasks, and it will not gracefully stop (tasks in queues, indexers, etc.)
|
**NOTE:** We don't recommend to use SIGKILL signal (know also as `-9`), you may be forcefully stopping some of Gitea internal tasks and it will not gracefully stop (tasks in queues, indexers processes, etc.)
|
||||||
|
|
||||||
See below for troubleshooting instructions to repair broken repositories after
|
See below for troubleshooting instructions to repair broken repositories after
|
||||||
an update of your Gitea version.
|
an update of your Gitea version.
|
||||||
|
@ -171,31 +144,31 @@ an update of your Gitea version.
|
||||||
### Old glibc versions
|
### Old glibc versions
|
||||||
|
|
||||||
Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to load the
|
Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to load the
|
||||||
Gitea binary, usually producing an error such as `./gitea: /lib/x86_64-linux-gnu/libc.so.6:
|
Gitea binary, usually producing an error such as ```./gitea: /lib/x86_64-linux-gnu/libc.so.6:
|
||||||
version 'GLIBC\_2.14' not found (required by ./gitea)`. This is due to the integrated
|
version `GLIBC\_2.14' not found (required by ./gitea)```. This is due to the integrated
|
||||||
SQLite support in the binaries provided by dl.gitea.io. In this situation, it is usually
|
SQLite support in the binaries provided by dl.gitea.io. In this situation, it is usually
|
||||||
possible to [install from source]({{< relref "from-source.en-us.md" >}}), without including
|
possible to [install from source]({{< relref "from-source.en-us.md" >}}) without SQLite
|
||||||
SQLite support.
|
support.
|
||||||
|
|
||||||
### Running Gitea on another port
|
### Running Gitea on another port
|
||||||
|
|
||||||
For errors like `702 runWeb()] [E] Failed to start server: listen tcp 0.0.0.0:3000:
|
For errors like `702 runWeb()] [E] Failed to start server: listen tcp 0.0.0.0:3000:
|
||||||
bind: address already in use`, Gitea needs to be started on another free port. This
|
bind: address already in use` Gitea needs to be started on another free port. This
|
||||||
is possible using `./gitea web -p $PORT`. It's possible another instance of Gitea
|
is possible using `./gitea web -p $PORT`. It's possible another instance of Gitea
|
||||||
is already running.
|
is already running.
|
||||||
|
|
||||||
### Running Gitea on Raspbian
|
### Running Gitea on Raspbian
|
||||||
|
|
||||||
As of v1.8, there is a problem with the arm7 version of Gitea, and it doesn't run on Raspberry Pis and similar devices.
|
As of v1.8, there is a problem with the arm7 version of Gitea and it doesn't run on Raspberry Pi and similar devices.
|
||||||
|
|
||||||
It is recommended to switch to the arm6 version, which has been tested and shown to work on Raspberry Pis and similar devices.
|
It is therefore recommended to switch to the arm6 version which has been tested and shown to work on Raspberry Pi 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
|
### 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,
|
If the binary file name has been changed during the update to a new version of Gitea,
|
||||||
Git Hooks in existing repositories will not work any more. In that case, a Git
|
Git Hooks in existing repositories will not work any more. In that case, a Git
|
||||||
error will be displayed when pushing to the repository.
|
error will be displayed when pushing to the repository.
|
||||||
|
|
||||||
|
@ -208,9 +181,9 @@ binary.
|
||||||
|
|
||||||
To solve this, go to the admin options and run the task `Resynchronize pre-receive,
|
To solve this, go to the admin options and run the task `Resynchronize pre-receive,
|
||||||
update and post-receive hooks of all repositories` to update all hooks to contain
|
update and post-receive hooks of all repositories` to update all hooks to contain
|
||||||
the new binary path. Please note that this overwrites all Git Hooks, including ones
|
the new binary path. Please note that this overwrite all Git Hooks including ones
|
||||||
with customizations made.
|
with customizations made.
|
||||||
|
|
||||||
If you aren't using the Gitea built-in SSH server, you will also need to re-write
|
If you aren't using the built-in to Gitea SSH server you will also need to re-write
|
||||||
the authorized key file by running the `Update the '.ssh/authorized_keys' file with
|
the authorized key file by running the `Update the '.ssh/authorized_keys' file with
|
||||||
Gitea SSH keys.` task in the admin options.
|
Gitea SSH keys.` task in the admin options.
|
||||||
|
|
|
@ -47,9 +47,9 @@ pacman -S gitea
|
||||||
|
|
||||||
There is a [Gitea Snap](https://snapcraft.io/gitea) package which follows the latest stable version.
|
There is a [Gitea Snap](https://snapcraft.io/gitea) package which follows the latest stable version.
|
||||||
|
|
||||||
```sh
|
``sh
|
||||||
snap install gitea
|
snap install gitea
|
||||||
```
|
``
|
||||||
|
|
||||||
## SUSE and openSUSE
|
## SUSE and openSUSE
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ choco install gitea
|
||||||
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:
|
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:
|
||||||
|
|
||||||
```
|
```
|
||||||
brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
|
brew tap go-gitea/gitea
|
||||||
brew install gitea
|
brew install gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ Depending on requirements, the following build tags can be included.
|
||||||
- `pam`: Enable support for PAM (Linux Pluggable Authentication Modules). Can
|
- `pam`: Enable support for PAM (Linux Pluggable Authentication Modules). Can
|
||||||
be used to authenticate local users or extend authentication to methods
|
be used to authenticate local users or extend authentication to methods
|
||||||
available to PAM.
|
available to PAM.
|
||||||
- `gogit`: (EXPERIMENTAL) Use go-git variants of Git commands.
|
* `gogit`: (EXPERIMENTAL) Use go-git variants of Git commands.
|
||||||
|
|
||||||
Bundling assets into the binary using the `bindata` build tag is recommended for
|
Bundling assets into the binary using the `bindata` build tag is recommended for
|
||||||
production deployments. It is possible to serve the static assets directly via a reverse proxy,
|
production deployments. It is possible to serve the static assets directly via a reverse proxy,
|
||||||
|
|
|
@ -30,6 +30,7 @@ cd $GOPATH/src/code.gitea.io/gitea
|
||||||
|
|
||||||
Maintenant, il est temps de décider quelle version de Gitea vous souhaitez compiler et installer. Actuellement, ils existent plusieurs options possibles. Si vous voulez compiler notre branche `master`, vous pouvez directement passer à la [section compilation](#compilation), cette branche représente la dernière version en cours de développement et n'a pas vocation à être utiliser en production.
|
Maintenant, il est temps de décider quelle version de Gitea vous souhaitez compiler et installer. Actuellement, ils existent plusieurs options possibles. Si vous voulez compiler notre branche `master`, vous pouvez directement passer à la [section compilation](#compilation), cette branche représente la dernière version en cours de développement et n'a pas vocation à être utiliser en production.
|
||||||
|
|
||||||
|
|
||||||
Si vous souhaitez compiler la dernière version stable, utilisez les étiquettes ou les différentes branches disponibles. Vous pouvez voir les branches disponibles et comment utiliser cette branche avec ces commandes:
|
Si vous souhaitez compiler la dernière version stable, utilisez les étiquettes ou les différentes branches disponibles. Vous pouvez voir les branches disponibles et comment utiliser cette branche avec ces commandes:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -15,35 +15,29 @@ menu:
|
||||||
|
|
||||||
# 从源代码安装
|
# 从源代码安装
|
||||||
|
|
||||||
首先你需要安装Golang,关于Golang的安装,参见[官方文档](https://golang.google.cn/doc/install)。
|
首先你需要安装Golang,关于Golang的安装,参见官方文档 [install instructions](https://golang.org/doc/install)。
|
||||||
|
|
||||||
其次你需要[安装Node.js](https://nodejs.org/zh-cn/download/),Node.js 和 npm 将用于构建 Gitea 前端。
|
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 下载
|
## 下载
|
||||||
|
|
||||||
你需要获取Gitea的源码,最方便的方式是使用 `git` 命令。执行以下命令:
|
你需要获取Gitea的源码,最方便的方式是使用 go 命令。执行以下命令:
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/go-gitea/gitea
|
go get -d -u code.gitea.io/gitea
|
||||||
cd gitea
|
cd $GOPATH/src/code.gitea.io/gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
然后你可以选择编译和安装的版本,当前你有多个选择。如果你想编译 `main` 版本,你可以直接跳到 [编译](#编译) 部分,这是我们的开发分支,虽然也很稳定但不建议您在正式产品中使用。
|
然后你可以选择编译和安装的版本,当前你有多个选择。如果你想编译 `master` 版本,你可以直接跳到 [编译](#build) 部分,这是我们的开发分支,虽然也很稳定但不建议您在正式产品中使用。
|
||||||
|
|
||||||
如果你想编译最新稳定分支,你可以执行以下命令签出源码:
|
如果你想编译最新稳定分支,你可以执行以下命令签出源码:
|
||||||
|
|
||||||
```bash
|
```
|
||||||
git branch -a
|
git branch -a
|
||||||
git checkout v{{< version >}}
|
git checkout v{{< version >}}
|
||||||
```
|
```
|
||||||
|
|
||||||
最后,你也可以直接使用标签版本如 `v{{< version >}}`。你可以执行以下命令列出可用的版本并选择某个版本签出:
|
最后,你也可以直接使用标签版本如 `v{{< version >}}`。你可以执行以下命令列出可用的版本并选择某个版本签出:
|
||||||
|
|
||||||
```bash
|
```
|
||||||
git tag -l
|
git tag -l
|
||||||
git checkout v{{< version >}}
|
git checkout v{{< version >}}
|
||||||
```
|
```
|
||||||
|
@ -52,18 +46,18 @@ git checkout v{{< version >}}
|
||||||
|
|
||||||
要从源代码进行编译,以下依赖程序必须事先安装好:
|
要从源代码进行编译,以下依赖程序必须事先安装好:
|
||||||
|
|
||||||
- `go` {{< min-go-version >}} 或以上版本, 详见[这里](https://golang.google.cn/doc/install)
|
- `go` {{< min-go-version >}} 或以上版本, 详见 [here](https://golang.org/dl/)
|
||||||
- `node` {{< min-node-version >}} 或以上版本,并且安装 `npm`, 详见[这里](https://nodejs.org/zh-cn/download/)
|
- `node` {{< min-node-version >}} 或以上版本,并且安装 `npm`, 详见 [here](https://nodejs.org/en/download/)
|
||||||
- `make`, 详见[这里]({{< relref "make.zh-cn.md" >}})</a>
|
- `make`, 详见 <a href='{{< relref "make.zh-cn.md" >}}'>这里</a>
|
||||||
|
|
||||||
各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/main/Makefile)
|
各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/master/Makefile)
|
||||||
可以用来使编译过程更方便。
|
可以用来使编译过程更方便。
|
||||||
|
|
||||||
按照您的编译需求,以下 tags 可以使用:
|
按照您的编译需求,以下 tags 可以使用:
|
||||||
|
|
||||||
- `bindata`: 这个编译选项将会把运行Gitea所需的所有外部资源都打包到可执行文件中,这样部署将非常简单因为除了可执行程序将不再需要任何其他文件。
|
* `bindata`: 这个编译选项将会把运行Gitea所需的所有外部资源都打包到可执行文件中,这样部署将非常简单因为除了可执行程序将不再需要任何其他文件。
|
||||||
- `sqlite sqlite_unlock_notify`: 这个编译选项将启用SQLite3数据库的支持,建议只在少数人使用时使用这个模式。
|
* `sqlite sqlite_unlock_notify`: 这个编译选项将启用SQLite3数据库的支持,建议只在少数人使用时使用这个模式。
|
||||||
- `pam`: 这个编译选项将会启用 PAM (Linux Pluggable Authentication Modules) 认证,如果你使用这一认证模式的话需要开启这个选项。
|
* `pam`: 这个编译选项将会启用 PAM (Linux Pluggable Authentication Modules) 认证,如果你使用这一认证模式的话需要开启这个选项。
|
||||||
|
|
||||||
使用 bindata 可以打包资源文件到二进制可以使开发和测试更容易,你可以根据自己的需求决定是否打包资源文件。
|
使用 bindata 可以打包资源文件到二进制可以使开发和测试更容易,你可以根据自己的需求决定是否打包资源文件。
|
||||||
要包含资源文件,请使用 `bindata` tag:
|
要包含资源文件,请使用 `bindata` tag:
|
||||||
|
@ -82,26 +76,10 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build
|
||||||
|
|
||||||
在执行了以上步骤之后,你将会获得 `gitea` 的二进制文件,在你复制到部署的机器之前可以先测试一下。在命令行执行完后,你可以 `Ctrl + C` 关掉程序。
|
在执行了以上步骤之后,你将会获得 `gitea` 的二进制文件,在你复制到部署的机器之前可以先测试一下。在命令行执行完后,你可以 `Ctrl + C` 关掉程序。
|
||||||
|
|
||||||
```bash
|
```
|
||||||
./gitea web
|
./gitea web
|
||||||
```
|
```
|
||||||
|
|
||||||
## 交叉编译
|
|
||||||
|
|
||||||
Go 编译器支持交叉编译到不同的目标架构。有关 Go 支持的目标架构列表,请参见 [Optional environment variables](https://go.dev/doc/install/source#environment)。
|
|
||||||
|
|
||||||
交叉构建适用于 Linux ARM64 的 Gitea:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
GOOS=linux GOARCH=arm64 make build
|
|
||||||
```
|
|
||||||
|
|
||||||
交叉构建适用于 Linux ARM64 的 Gitea,并且带上 Gitea 发行版采用的编译选项:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sqlite_unlock_notify" make build
|
|
||||||
```
|
|
||||||
|
|
||||||
## 需要帮助?
|
## 需要帮助?
|
||||||
|
|
||||||
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
|
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
|
||||||
|
|
|
@ -26,7 +26,7 @@ go get -d -u code.gitea.io/gitea
|
||||||
cd $GOPATH/src/code.gitea.io/gitea
|
cd $GOPATH/src/code.gitea.io/gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
現在該決定您要編譯或安裝的 Gitea 版本,您有很多可以選擇。如果您想編譯 `master` 版本,你可以直接跳到[編譯章節](#編譯),這是我們開發分支,雖然很穩定,但是不建議用在正式環境。
|
現在該決定您要編譯或安裝的 Gitea 版本,您有很多可以選擇。如果您想編譯 `master` 版本,你可以直接跳到[編譯章節](#build),這是我們開發分支,雖然很穩定,但是不建議用在正式環境。
|
||||||
|
|
||||||
假如您想要編譯最新穩定版本,可以執行底下命令切換到正確版本:
|
假如您想要編譯最新穩定版本,可以執行底下命令切換到正確版本:
|
||||||
|
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
---
|
|
||||||
date: "2020-03-19T19:27:00+02:00"
|
|
||||||
title: "在 Kubernetes 安装 Gitea"
|
|
||||||
slug: "install-on-kubernetes"
|
|
||||||
weight: 10
|
|
||||||
toc: false
|
|
||||||
draft: false
|
|
||||||
menu:
|
|
||||||
sidebar:
|
|
||||||
parent: "installation"
|
|
||||||
name: "Kubernetes"
|
|
||||||
weight: 50
|
|
||||||
identifier: "install-on-kubernetes"
|
|
||||||
---
|
|
||||||
|
|
||||||
# 使用 Helm 在 Kubernetes 云原生环境中安装 Gitea
|
|
||||||
|
|
||||||
Gitea 已经提供了便于在 Kubernetes 云原生环境中安装所需的 Helm Chart
|
|
||||||
|
|
||||||
默认安装指令为:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
helm repo add gitea https://dl.gitea.io/charts
|
|
||||||
helm repo update
|
|
||||||
helm install gitea gitea/gitea
|
|
||||||
```
|
|
||||||
|
|
||||||
如果采用默认安装指令,Helm 会部署单实例的 Gitea, PostgreSQL, Memcached。若您想实现自定义安装(包括配置 Gitea 集群、NGINX Ingress、MySQL、MariaDB、持久存储等),请前往阅读:[Gitea Helm Chart](https://gitea.com/gitea/helm-chart/)
|
|
||||||
|
|
||||||
您也可以通过 `helm show` 命令导出 `README.md` 和配置文件 `values.yaml` 进行学习和编辑,例如:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
helm show values gitea/gitea > values.yaml
|
|
||||||
helm show readme gitea/gitea > README.md
|
|
||||||
|
|
||||||
# 使用自定义的配置文件 values.yaml
|
|
||||||
helm install gitea -f values.yaml gitea/gitea
|
|
||||||
```
|
|
||||||
|
|
||||||
## 运行状况检查接口
|
|
||||||
|
|
||||||
Gitea 附带了一个运行状况检查接口 `/api/healthz`,你可以像这样在 Kubernetes 中配置它:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/healthz
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 200
|
|
||||||
timeoutSeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 10
|
|
||||||
```
|
|
||||||
|
|
||||||
成功的运行状况检查响应代码为 HTTP `200`,下面是示例:
|
|
||||||
|
|
||||||
```
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
"status": "pass",
|
|
||||||
"description": "Gitea: Git with a cup of tea",
|
|
||||||
"checks": {
|
|
||||||
"cache:ping": [
|
|
||||||
{
|
|
||||||
"status": "pass",
|
|
||||||
"time": "2022-02-19T09:16:08Z"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"database:ping": [
|
|
||||||
{
|
|
||||||
"status": "pass",
|
|
||||||
"time": "2022-02-19T09:16:08Z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
有关更多信息,请参考 Kubernetes 文档 [配置存活、就绪和启动探测器](https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
|
|
|
@ -26,7 +26,7 @@ helm install gitea gitea-charts/gitea
|
||||||
|
|
||||||
若您想自訂安裝(包括使用 kubernetes ingress),請前往完整的 [Gitea helm chart configuration details](https://gitea.com/gitea/helm-chart/)
|
若您想自訂安裝(包括使用 kubernetes ingress),請前往完整的 [Gitea helm chart configuration details](https://gitea.com/gitea/helm-chart/)
|
||||||
|
|
||||||
## 運行狀況檢查終端節點
|
##運行狀況檢查終端節點
|
||||||
|
|
||||||
Gitea 附帶了一個運行狀況檢查端點 `/api/healthz`,你可以像這樣在 kubernetes 中配置它:
|
Gitea 附帶了一個運行狀況檢查端點 `/api/healthz`,你可以像這樣在 kubernetes 中配置它:
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,12 @@ Change the user, home directory, and other required startup values. Change the
|
||||||
PORT or remove the -p flag if default port is used.
|
PORT or remove the -p flag if default port is used.
|
||||||
|
|
||||||
Enable and start Gitea at boot:
|
Enable and start Gitea at boot:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo systemctl enable gitea
|
sudo systemctl enable gitea
|
||||||
sudo systemctl start gitea
|
sudo systemctl start gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have systemd version 220 or later, you can enable and immediately start Gitea at once by:
|
If you have systemd version 220 or later, you can enable and immediately start Gitea at once by:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo systemctl enable gitea --now
|
sudo systemctl enable gitea --now
|
||||||
```
|
```
|
||||||
|
@ -42,13 +40,11 @@ sudo systemctl enable gitea --now
|
||||||
#### Using supervisor
|
#### Using supervisor
|
||||||
|
|
||||||
Install supervisor by running below command in terminal:
|
Install supervisor by running below command in terminal:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt install supervisor
|
sudo apt install supervisor
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a log dir for the supervisor logs:
|
Create a log dir for the supervisor logs:
|
||||||
|
|
||||||
```
|
```
|
||||||
# assuming Gitea is installed in /home/git/gitea/
|
# assuming Gitea is installed in /home/git/gitea/
|
||||||
mkdir /home/git/gitea/log/supervisor
|
mkdir /home/git/gitea/log/supervisor
|
||||||
|
@ -62,14 +58,12 @@ Using your favorite editor, change the user (`git`) and home
|
||||||
or remove the -p flag if default port is used.
|
or remove the -p flag if default port is used.
|
||||||
|
|
||||||
Lastly enable and start supervisor at boot:
|
Lastly enable and start supervisor at boot:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo systemctl enable supervisor
|
sudo systemctl enable supervisor
|
||||||
sudo systemctl start supervisor
|
sudo systemctl start supervisor
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have systemd version 220 or later, you can enable and immediately start supervisor by:
|
If you have systemd version 220 or later, you can enable and immediately start supervisor by:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo systemctl enable supervisor --now
|
sudo systemctl enable supervisor --now
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,7 +18,6 @@ menu:
|
||||||
#### systemd 方式
|
#### systemd 方式
|
||||||
|
|
||||||
在 terminal 中执行以下命令:
|
在 terminal 中执行以下命令:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo vim /etc/systemd/system/gitea.service
|
sudo vim /etc/systemd/system/gitea.service
|
||||||
```
|
```
|
||||||
|
@ -28,29 +27,26 @@ sudo vim /etc/systemd/system/gitea.service
|
||||||
修改 user,home 目录以及其他必须的初始化参数,如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。
|
修改 user,home 目录以及其他必须的初始化参数,如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。
|
||||||
|
|
||||||
激活 gitea 并将它作为系统自启动服务:
|
激活 gitea 并将它作为系统自启动服务:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo systemctl enable gitea
|
sudo systemctl enable gitea
|
||||||
sudo systemctl start gitea
|
sudo systemctl start gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### 使用 supervisor
|
#### 使用 supervisor
|
||||||
|
|
||||||
在 terminal 中执行以下命令安装 supervisor:
|
在 terminal 中执行以下命令安装 supervisor:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt install supervisor
|
sudo apt install supervisor
|
||||||
```
|
```
|
||||||
|
|
||||||
为 supervisor 配置日志路径:
|
为 supervisor 配置日志路径:
|
||||||
|
|
||||||
```
|
```
|
||||||
# assuming gitea is installed in /home/git/gitea/
|
# assuming gitea is installed in /home/git/gitea/
|
||||||
mkdir /home/git/gitea/log/supervisor
|
mkdir /home/git/gitea/log/supervisor
|
||||||
```
|
```
|
||||||
|
|
||||||
在文件编辑器中打开 supervisor 的配置文件:
|
在文件编辑器中打开 supervisor 的配置文件:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo vim /etc/supervisor/supervisord.conf
|
sudo vim /etc/supervisor/supervisord.conf
|
||||||
```
|
```
|
||||||
|
@ -61,7 +57,6 @@ sudo vim /etc/supervisor/supervisord.conf
|
||||||
将 user(git) 和 home(/home/git) 设置为与上文部署中匹配的值。如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。
|
将 user(git) 和 home(/home/git) 设置为与上文部署中匹配的值。如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。
|
||||||
|
|
||||||
最后激活 supervisor 并将它作为系统自启动服务:
|
最后激活 supervisor 并将它作为系统自启动服务:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo systemctl enable supervisor
|
sudo systemctl enable supervisor
|
||||||
sudo systemctl start supervisor
|
sudo systemctl start supervisor
|
||||||
|
|
|
@ -49,16 +49,6 @@ Open "Windows Services", search for the service named "gitea", right-click it an
|
||||||
"Run". If everything is OK, Gitea will be reachable on `http://localhost:3000` (or the port
|
"Run". If everything is OK, Gitea will be reachable on `http://localhost:3000` (or the port
|
||||||
that was configured).
|
that was configured).
|
||||||
|
|
||||||
## Adding startup dependencies
|
|
||||||
|
|
||||||
To add a startup dependency to the Gitea Windows service (eg Mysql, Mariadb), as an Administrator, then run the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
sc.exe config gitea depend= mariadb
|
|
||||||
```
|
|
||||||
|
|
||||||
This will ensure that when the Windows machine restarts, the automatic starting of Gitea is postponed until the database is ready and thus mitigate failed startups.
|
|
||||||
|
|
||||||
## Unregister as a service
|
## Unregister as a service
|
||||||
|
|
||||||
To unregister Gitea as a service, open a command prompt (cmd) as an Administrator and run:
|
To unregister Gitea as a service, open a command prompt (cmd) as an Administrator and run:
|
||||||
|
|
|
@ -247,7 +247,6 @@ files; for named volumes, this is done through another container or by direct ac
|
||||||
:exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation:
|
:exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation:
|
||||||
|
|
||||||
To upgrade your installation to the latest release:
|
To upgrade your installation to the latest release:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Edit `docker-compose.yml` to update the version, if you have one specified
|
# Edit `docker-compose.yml` to update the version, if you have one specified
|
||||||
# Pull new images
|
# Pull new images
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue