mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-05 18:32:41 +09:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09814117e3 | ||
|
|
499c5594c3 | ||
|
|
ecfbcced46 | ||
|
|
892e24aaf1 | ||
|
|
666038a06d | ||
|
|
54614767a2 | ||
|
|
e42c5afadb | ||
|
|
72b55c8094 | ||
|
|
a12d036a68 | ||
|
|
65d6bdf0be | ||
|
|
c598741f01 | ||
|
|
bc73e6a85c | ||
|
|
a8445e9320 | ||
|
|
0f73be0ae3 | ||
|
|
4033d95dbf | ||
|
|
43213b816d | ||
|
|
a55924aaf4 | ||
|
|
782b137682 | ||
|
|
5992365fc1 | ||
|
|
3b518a3af5 | ||
|
|
08cdc0da3d | ||
|
|
3e07c54be3 | ||
|
|
e2596b0a99 | ||
|
|
a424f6d4f8 | ||
|
|
59713541b6 | ||
|
|
8d9193680d | ||
|
|
ab4fd9aa1f |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -4,6 +4,34 @@ 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.20.2](https://github.com/go-gitea/gitea/releases/tag/1.20.2) - 2023-07-29
|
||||||
|
|
||||||
|
* ENHANCEMENTS
|
||||||
|
* Calculate MAX_WORKERS default value by CPU number (#26177) (#26183)
|
||||||
|
* Display deprecated warning in admin panel pages as well as in the log file (#26094) (#26154)
|
||||||
|
* BUGFIXES
|
||||||
|
* Fix allowed user types setting problem (#26200) (#26206)
|
||||||
|
* Fix handling of plenty Nuget package versions (#26075) (#26173)
|
||||||
|
* Fix UI regression of asciinema player (#26159) (#26162)
|
||||||
|
* Fix LFS object list style (#26133) (#26147)
|
||||||
|
* Fix allowed user types setting problem (#26200) (#26206)
|
||||||
|
* Prevent primary key update on migration (#26192) (#26199)
|
||||||
|
* Fix bug when pushing to a pull request which enabled dismiss approval automatically (#25882) (#26158)
|
||||||
|
* Fix bugs in LFS meta garbage collection (#26122) (#26157)
|
||||||
|
* Update xorm version (#26128) (#26150)
|
||||||
|
* Remove "misc" scope check from public API endpoints (#26134) (#26149)
|
||||||
|
* Fix CLI allowing creation of access tokens with existing name (#26071) (#26144)
|
||||||
|
* Fix incorrect router logger (#26137) (#26143)
|
||||||
|
* Improve commit graph alignment and truncating (#26112) (#26127)
|
||||||
|
* Avoid writing config file if not installed (#26107) (#26113)
|
||||||
|
* Fix escape problems in the branch selector (#25875) (#26103)
|
||||||
|
* Fix handling of Debian files with trailing slash (#26087) (#26098)
|
||||||
|
* Fix Missing 404 swagger response docs for /admin/users/{username} (#26086) (#26089)
|
||||||
|
* Use stderr as fallback if the log file can't be opened (#26074) (#26083)
|
||||||
|
* Increase table cell horizontal padding (#26140) (#26142)
|
||||||
|
* Fix wrong workflow status when rerun a job in an already finished workflow (#26119) (#26124)
|
||||||
|
* Fix duplicated url prefix on issue context menu (#26066) (#26067)
|
||||||
|
|
||||||
## [1.20.1](https://github.com/go-gitea/gitea/releases/tag/1.20.1) - 2023-07-22
|
## [1.20.1](https://github.com/go-gitea/gitea/releases/tag/1.20.1) - 2023-07-22
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
- [Backport PRs](#backport-prs)
|
- [Backport PRs](#backport-prs)
|
||||||
- [Documentation](#documentation)
|
- [Documentation](#documentation)
|
||||||
- [API v1](#api-v1)
|
- [API v1](#api-v1)
|
||||||
- [GitHub API compatability](#github-api-compatability)
|
- [GitHub API compatibility](#github-api-compatibility)
|
||||||
- [Adding/Maintaining API routes](#addingmaintaining-api-routes)
|
- [Adding/Maintaining API routes](#addingmaintaining-api-routes)
|
||||||
- [When to use what HTTP method](#when-to-use-what-http-method)
|
- [When to use what HTTP method](#when-to-use-what-http-method)
|
||||||
- [Requirements for API routes](#requirements-for-api-routes)
|
- [Requirements for API routes](#requirements-for-api-routes)
|
||||||
@@ -339,7 +339,7 @@ If you add a new feature or change an existing aspect of Gitea, the documentatio
|
|||||||
|
|
||||||
The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest).
|
The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest).
|
||||||
|
|
||||||
### GitHub API compatability
|
### GitHub API compatibility
|
||||||
|
|
||||||
Gitea's API should use the same endpoints and fields as the GitHub API as far as possible, unless there are good reasons to deviate. \
|
Gitea's API should use the same endpoints and fields as the GitHub 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. \
|
||||||
|
|||||||
19
Makefile
19
Makefile
@@ -203,7 +203,6 @@ help:
|
|||||||
@echo " - clean delete backend and integration files"
|
@echo " - clean delete backend and integration files"
|
||||||
@echo " - clean-all delete backend, frontend and integration files"
|
@echo " - clean-all delete backend, frontend and integration files"
|
||||||
@echo " - deps install dependencies"
|
@echo " - deps install dependencies"
|
||||||
@echo " - deps-docs install docs dependencies"
|
|
||||||
@echo " - deps-frontend install frontend dependencies"
|
@echo " - deps-frontend install frontend dependencies"
|
||||||
@echo " - deps-backend install backend dependencies"
|
@echo " - deps-backend install backend dependencies"
|
||||||
@echo " - deps-tools install tool dependencies"
|
@echo " - deps-tools install tool dependencies"
|
||||||
@@ -375,11 +374,11 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
|
|||||||
|
|
||||||
.PHONY: lint-js
|
.PHONY: lint-js
|
||||||
lint-js: node_modules
|
lint-js: 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 --ext js,vue web_src/js build *.config.js tests/e2e
|
||||||
|
|
||||||
.PHONY: lint-js-fix
|
.PHONY: lint-js-fix
|
||||||
lint-js-fix: node_modules
|
lint-js-fix: node_modules
|
||||||
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e --fix
|
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e --fix
|
||||||
|
|
||||||
.PHONY: lint-css
|
.PHONY: lint-css
|
||||||
lint-css: node_modules
|
lint-css: node_modules
|
||||||
@@ -889,20 +888,14 @@ release-sources: | $(DIST_DIRS)
|
|||||||
|
|
||||||
.PHONY: release-docs
|
.PHONY: release-docs
|
||||||
release-docs: | $(DIST_DIRS) docs
|
release-docs: | $(DIST_DIRS) docs
|
||||||
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs/public .
|
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs: deps-docs
|
docs:
|
||||||
cd docs; make trans-copy clean build-offline;
|
cd docs; bash scripts/trans-copy.sh;
|
||||||
|
|
||||||
.PHONY: deps-docs
|
|
||||||
deps-docs:
|
|
||||||
@hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
|
||||||
curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mkdir -p ~/go/bin && mv /tmp/hugo ~/go/bin/hugo && chmod +x ~/go/bin/hugo; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps: deps-frontend deps-backend deps-tools deps-docs
|
deps: deps-frontend deps-backend deps-tools
|
||||||
|
|
||||||
.PHONY: deps-frontend
|
.PHONY: deps-frontend
|
||||||
deps-frontend: node_modules
|
deps-frontend: node_modules
|
||||||
|
|||||||
@@ -55,17 +55,28 @@ func runGenerateAccessToken(c *cli.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
accessTokenScope, err := auth_model.AccessTokenScope(c.String("scopes")).Normalize()
|
// construct token with name and user so we can make sure it is unique
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
t := &auth_model.AccessToken{
|
t := &auth_model.AccessToken{
|
||||||
Name: c.String("token-name"),
|
Name: c.String("token-name"),
|
||||||
UID: user.ID,
|
UID: user.ID,
|
||||||
Scope: accessTokenScope,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exist, err := auth_model.AccessTokenByNameExists(t)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if exist {
|
||||||
|
return fmt.Errorf("access token name has been used already")
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure the scopes are valid
|
||||||
|
accessTokenScope, err := auth_model.AccessTokenScope(c.String("scopes")).Normalize()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("invalid access token scope provided: %w", err)
|
||||||
|
}
|
||||||
|
t.Scope = accessTokenScope
|
||||||
|
|
||||||
|
// create the token
|
||||||
if err := auth_model.NewAccessToken(t); err != nil {
|
if err := auth_model.NewAccessToken(t); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1414,8 +1414,8 @@ LEVEL = Info
|
|||||||
;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
|
;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
|
||||||
;SET_NAME = "_unique"
|
;SET_NAME = "_unique"
|
||||||
;;
|
;;
|
||||||
;; Dynamically scale the worker pool to at this many workers
|
;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
|
||||||
;MAX_WORKERS = 10
|
;MAX_WORKERS = ; (dynamic)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
THEME := themes/gitea
|
|
||||||
PUBLIC := public
|
|
||||||
ARCHIVE := https://dl.gitea.com/theme/main.tar.gz
|
|
||||||
|
|
||||||
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.111.3
|
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: build
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
rm -rf $(PUBLIC) $(THEME)
|
|
||||||
|
|
||||||
.PHONY: trans-copy
|
|
||||||
trans-copy:
|
|
||||||
bash scripts/trans-copy.sh
|
|
||||||
|
|
||||||
.PHONY: server
|
|
||||||
server: $(THEME)
|
|
||||||
go run $(HUGO_PACKAGE) server
|
|
||||||
|
|
||||||
.PHONY: build
|
|
||||||
build: $(THEME)
|
|
||||||
go run $(HUGO_PACKAGE) --cleanDestinationDir
|
|
||||||
|
|
||||||
.PHONY: build-offline
|
|
||||||
build-offline: $(THEME)
|
|
||||||
go run $(HUGO_PACKAGE) --baseURL="/" --cleanDestinationDir
|
|
||||||
|
|
||||||
.PHONY: update
|
|
||||||
update: $(THEME)
|
|
||||||
|
|
||||||
$(THEME): $(THEME)/theme.toml
|
|
||||||
$(THEME)/theme.toml:
|
|
||||||
mkdir -p $$(dirname $@)
|
|
||||||
curl -L -s $(ARCHIVE) | tar xz -C $$(dirname $@)
|
|
||||||
@@ -3,36 +3,7 @@
|
|||||||
[](https://discord.gg/Gitea)
|
[](https://discord.gg/Gitea)
|
||||||
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
## Hosting
|
These docs are ingested by our [docs repo](https://gitea.com/gitea/gitea-docusaurus).
|
||||||
|
|
||||||
These pages are hosted using [netlifycms](https://www.netlifycms.org/) and get
|
|
||||||
automatically updated on every push to the `master` branch.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
These pages use the [Hugo](https://gohugo.io/) static site generator.
|
|
||||||
If you are planning to contribute you'll want to download and install Hugo on
|
|
||||||
your local machine.
|
|
||||||
|
|
||||||
The installation of Hugo is out of the scope of this document, so please take
|
|
||||||
the [official install instructions](https://gohugo.io/overview/installing/) to
|
|
||||||
get Hugo up and running.
|
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
To generate the website and serve it on [localhost:1313](http://localhost:1313)
|
|
||||||
just execute this command and stop it with `Ctrl+C`:
|
|
||||||
|
|
||||||
```
|
|
||||||
make server
|
|
||||||
```
|
|
||||||
|
|
||||||
When you are done with your changes just create a pull request, after merging
|
|
||||||
the pull request the website will be updated automatically.
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Fork -> Patch -> Push -> Pull Request
|
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
|
|||||||
@@ -4,27 +4,7 @@
|
|||||||
[](https://discord.gg/Gitea)
|
[](https://discord.gg/Gitea)
|
||||||
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
## 关于托管方式
|
https://gitea.com/gitea/gitea-docusaurus
|
||||||
|
|
||||||
本页面托管在我们 Docker 容器内的基础设施上, 它会在每次推送到 `master` 分支的时候自动更新,如果你想自己管理这个页面,你可以从我们的 Docker 镜像 [gitea/docs](https://hub.docker.com/r/gitea/docs/) 中获取它。
|
|
||||||
|
|
||||||
## 安装 Hugo
|
|
||||||
|
|
||||||
本页面使用了 [Hugo](https://github.com/spf13/hugo) 静态页面生成工具,如果您有维护它的意愿,则需要在本地计算机上下载并安装 Hugo。Hugo 的安装教程不在本文档的讲述范围之内,详情请参见 [官方文档](https://gohugo.io/overview/installing/)。
|
|
||||||
|
|
||||||
## 如何部署
|
|
||||||
|
|
||||||
在 [localhost:1313](http://localhost:1313) 处构建和运行网站的命令如下,如果需要停止可以使用组合键 `Ctrl+C`:
|
|
||||||
|
|
||||||
```
|
|
||||||
make server
|
|
||||||
```
|
|
||||||
|
|
||||||
完成更改后,只需创建一个 Pull Request (PR),该 PR 一经合并网站将自动更新。
|
|
||||||
|
|
||||||
## 如何贡献您的代码
|
|
||||||
|
|
||||||
Fork -> Patch -> Push -> Pull Request
|
|
||||||
|
|
||||||
## 关于我们
|
## 关于我们
|
||||||
|
|
||||||
|
|||||||
@@ -1,174 +0,0 @@
|
|||||||
/* global Fuse, Mark */
|
|
||||||
|
|
||||||
function ready(fn) {
|
|
||||||
if (document.readyState !== 'loading') {
|
|
||||||
fn();
|
|
||||||
} else {
|
|
||||||
document.addEventListener('DOMContentLoaded', fn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ready(doSearch);
|
|
||||||
|
|
||||||
const summaryInclude = 60;
|
|
||||||
const fuseOptions = {
|
|
||||||
shouldSort: true,
|
|
||||||
includeMatches: true,
|
|
||||||
matchAllTokens: true,
|
|
||||||
threshold: 0, // for parsing diacritics
|
|
||||||
tokenize: true,
|
|
||||||
location: 0,
|
|
||||||
distance: 100,
|
|
||||||
maxPatternLength: 32,
|
|
||||||
minMatchCharLength: 1,
|
|
||||||
keys: [{
|
|
||||||
name: 'title',
|
|
||||||
weight: 0.8
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'contents',
|
|
||||||
weight: 0.5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'tags',
|
|
||||||
weight: 0.3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'categories',
|
|
||||||
weight: 0.3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
function param(name) {
|
|
||||||
return decodeURIComponent((window.location.search.split(`${name}=`)[1] || '').split('&')[0]).replace(/\+/g, ' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
const searchQuery = param('s');
|
|
||||||
|
|
||||||
function doSearch() {
|
|
||||||
if (searchQuery) {
|
|
||||||
document.getElementById('search-query').value = searchQuery;
|
|
||||||
executeSearch(searchQuery);
|
|
||||||
} else {
|
|
||||||
const para = document.createElement('P');
|
|
||||||
para.textContent = 'Please enter a word or phrase above';
|
|
||||||
document.getElementById('search-results').append(para);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getJSON(url, fn) {
|
|
||||||
const request = new XMLHttpRequest();
|
|
||||||
request.open('GET', url, true);
|
|
||||||
request.addEventListener('load', () => {
|
|
||||||
if (request.status >= 200 && request.status < 400) {
|
|
||||||
const data = JSON.parse(request.responseText);
|
|
||||||
fn(data);
|
|
||||||
} else {
|
|
||||||
console.error(`Target reached on ${url} with error ${request.status}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
request.addEventListener('error', () => {
|
|
||||||
console.error(`Connection error ${request.status}`);
|
|
||||||
});
|
|
||||||
request.send();
|
|
||||||
}
|
|
||||||
|
|
||||||
function executeSearch(searchQuery) {
|
|
||||||
getJSON(`/${document.LANG}/index.json`, (data) => {
|
|
||||||
const pages = data;
|
|
||||||
const fuse = new Fuse(pages, fuseOptions);
|
|
||||||
const result = fuse.search(searchQuery);
|
|
||||||
document.getElementById('search-results').innerHTML = '';
|
|
||||||
if (result.length > 0) {
|
|
||||||
populateResults(result);
|
|
||||||
} else {
|
|
||||||
const para = document.createElement('P');
|
|
||||||
para.textContent = 'No matches found';
|
|
||||||
document.getElementById('search-results').append(para);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function populateResults(result) {
|
|
||||||
for (const [key, value] of result.entries()) {
|
|
||||||
const content = value.item.contents;
|
|
||||||
let snippet = '';
|
|
||||||
const snippetHighlights = [];
|
|
||||||
if (fuseOptions.tokenize) {
|
|
||||||
snippetHighlights.push(searchQuery);
|
|
||||||
for (const mvalue of value.matches) {
|
|
||||||
if (mvalue.key === 'tags' || mvalue.key === 'categories') {
|
|
||||||
snippetHighlights.push(mvalue.value);
|
|
||||||
} else if (mvalue.key === 'contents') {
|
|
||||||
const ind = content.toLowerCase().indexOf(searchQuery.toLowerCase());
|
|
||||||
const start = ind - summaryInclude > 0 ? ind - summaryInclude : 0;
|
|
||||||
const end = ind + searchQuery.length + summaryInclude < content.length ? ind + searchQuery.length + summaryInclude : content.length;
|
|
||||||
snippet += content.substring(start, end);
|
|
||||||
if (ind > -1) {
|
|
||||||
snippetHighlights.push(content.substring(ind, ind + searchQuery.length));
|
|
||||||
} else {
|
|
||||||
snippetHighlights.push(mvalue.value.substring(mvalue.indices[0][0], mvalue.indices[0][1] - mvalue.indices[0][0] + 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (snippet.length < 1) {
|
|
||||||
snippet += content.substring(0, summaryInclude * 2);
|
|
||||||
}
|
|
||||||
// pull template from hugo template definition
|
|
||||||
const templateDefinition = document.getElementById('search-result-template').innerHTML;
|
|
||||||
// replace values
|
|
||||||
const output = render(templateDefinition, {
|
|
||||||
key,
|
|
||||||
title: value.item.title,
|
|
||||||
link: value.item.permalink,
|
|
||||||
tags: value.item.tags,
|
|
||||||
categories: value.item.categories,
|
|
||||||
snippet
|
|
||||||
});
|
|
||||||
document.getElementById('search-results').append(htmlToElement(output));
|
|
||||||
|
|
||||||
for (const snipvalue of snippetHighlights) {
|
|
||||||
new Mark(document.getElementById(`summary-${key}`)).mark(snipvalue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function render(templateString, data) {
|
|
||||||
let conditionalMatches, copy;
|
|
||||||
const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*\}/g;
|
|
||||||
// since loop below depends on re.lastIndex, we use a copy to capture any manipulations whilst inside the loop
|
|
||||||
copy = templateString;
|
|
||||||
while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) {
|
|
||||||
if (data[conditionalMatches[1]]) {
|
|
||||||
// valid key, remove conditionals, leave content.
|
|
||||||
copy = copy.replace(conditionalMatches[0], conditionalMatches[2]);
|
|
||||||
} else {
|
|
||||||
// not valid, remove entire section
|
|
||||||
copy = copy.replace(conditionalMatches[0], '');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
templateString = copy;
|
|
||||||
// now any conditionals removed we can do simple substitution
|
|
||||||
let key, find, re;
|
|
||||||
for (key of Object.keys(data)) {
|
|
||||||
find = `\\$\\{\\s*${key}\\s*\\}`;
|
|
||||||
re = new RegExp(find, 'g');
|
|
||||||
templateString = templateString.replace(re, data[key]);
|
|
||||||
}
|
|
||||||
return templateString;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* By Mark Amery: https://stackoverflow.com/a/35385518
|
|
||||||
* @param {String} HTML representing a single element
|
|
||||||
* @return {Element}
|
|
||||||
*/
|
|
||||||
function htmlToElement(html) {
|
|
||||||
const template = document.createElement('template');
|
|
||||||
html = html.trim(); // Never return a text node of whitespace as the result
|
|
||||||
template.innerHTML = html;
|
|
||||||
return template.content.firstChild;
|
|
||||||
}
|
|
||||||
369
docs/config.yaml
369
docs/config.yaml
@@ -1,369 +0,0 @@
|
|||||||
baseurl: https://docs.gitea.io/
|
|
||||||
languageCode: en-us
|
|
||||||
title: Docs
|
|
||||||
theme: gitea
|
|
||||||
|
|
||||||
defaultContentLanguage: en-us
|
|
||||||
defaultContentLanguageInSubdir: true
|
|
||||||
enableMissingTranslationPlaceholders: true
|
|
||||||
enableEmoji: true
|
|
||||||
|
|
||||||
permalinks:
|
|
||||||
post: /:year/:month/:title/
|
|
||||||
doc: /:sections[1:]/:slug/
|
|
||||||
page: /:slug/
|
|
||||||
default: /:slug/
|
|
||||||
|
|
||||||
params:
|
|
||||||
description: Git with a cup of tea
|
|
||||||
author: The Gitea Authors
|
|
||||||
website: https://docs.gitea.io
|
|
||||||
version: 1.19.0 # FIXME: this version was used as "latest stable release", but it always gets outdated and doesn't make sense
|
|
||||||
minGoVersion: 1.20
|
|
||||||
goVersion: 1.20
|
|
||||||
minNodeVersion: 16
|
|
||||||
search: nav
|
|
||||||
repo: "https://github.com/go-gitea/gitea"
|
|
||||||
docContentPath: "docs/content"
|
|
||||||
|
|
||||||
markup:
|
|
||||||
tableOfContents:
|
|
||||||
startLevel: 1
|
|
||||||
endLevel: 9
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
home:
|
|
||||||
- HTML
|
|
||||||
- RSS
|
|
||||||
- JSON
|
|
||||||
|
|
||||||
menu:
|
|
||||||
page:
|
|
||||||
- name: Website
|
|
||||||
url: https://gitea.io/en-us/
|
|
||||||
weight: 10
|
|
||||||
pre: home
|
|
||||||
- name: Docs
|
|
||||||
url: /en-us/
|
|
||||||
weight: 20
|
|
||||||
pre: question
|
|
||||||
post: active
|
|
||||||
- name: API
|
|
||||||
url: https://try.gitea.io/api/swagger
|
|
||||||
weight: 45
|
|
||||||
pre: plug
|
|
||||||
- name: Blog
|
|
||||||
url: https://blog.gitea.io/
|
|
||||||
weight: 30
|
|
||||||
pre: rss
|
|
||||||
- name: Shop
|
|
||||||
url: https://shop.gitea.io/
|
|
||||||
weight: 40
|
|
||||||
pre: shopping-cart
|
|
||||||
- name: Translation
|
|
||||||
url: https://crowdin.com/project/gitea
|
|
||||||
weight: 41
|
|
||||||
pre: language
|
|
||||||
- name: Downloads
|
|
||||||
url: https://dl.gitea.io/
|
|
||||||
weight: 50
|
|
||||||
pre: download
|
|
||||||
- name: GitHub
|
|
||||||
url: https://github.com/go-gitea/
|
|
||||||
weight: 60
|
|
||||||
pre: github
|
|
||||||
- name: Discord Chat
|
|
||||||
url: https://discord.gg/Gitea
|
|
||||||
weight: 70
|
|
||||||
pre: comment
|
|
||||||
- name: Forum
|
|
||||||
url: https://discourse.gitea.io/
|
|
||||||
weight: 80
|
|
||||||
pre: group
|
|
||||||
|
|
||||||
languages:
|
|
||||||
en-us:
|
|
||||||
weight: 0
|
|
||||||
languageName: English
|
|
||||||
|
|
||||||
zh-cn:
|
|
||||||
weight: 1
|
|
||||||
languageName: 中文(简体)
|
|
||||||
menu:
|
|
||||||
page:
|
|
||||||
- name: 网站
|
|
||||||
url: https://gitea.io/zh-cn/
|
|
||||||
weight: 10
|
|
||||||
pre: home
|
|
||||||
- name: 文档
|
|
||||||
url: /zh-cn/
|
|
||||||
weight: 20
|
|
||||||
pre: question
|
|
||||||
post: active
|
|
||||||
- name: API
|
|
||||||
url: https://try.gitea.io/api/swagger
|
|
||||||
weight: 45
|
|
||||||
pre: plug
|
|
||||||
- name: 博客
|
|
||||||
url: https://blog.gitea.io/
|
|
||||||
weight: 30
|
|
||||||
pre: rss
|
|
||||||
- name: 导入
|
|
||||||
url: https://code.gitea.io/
|
|
||||||
weight: 40
|
|
||||||
pre: code
|
|
||||||
- name: 翻译
|
|
||||||
url: https://crowdin.com/project/gitea
|
|
||||||
weight: 41
|
|
||||||
pre: language
|
|
||||||
- name: 下载
|
|
||||||
url: https://dl.gitea.io/
|
|
||||||
weight: 50
|
|
||||||
pre: download
|
|
||||||
- name: GitHub
|
|
||||||
url: https://github.com/go-gitea/
|
|
||||||
weight: 60
|
|
||||||
pre: github
|
|
||||||
- name: Discord Chat
|
|
||||||
url: https://discord.gg/Gitea
|
|
||||||
weight: 70
|
|
||||||
pre: comment
|
|
||||||
- name: Forum
|
|
||||||
url: https://discourse.gitea.io/
|
|
||||||
weight: 80
|
|
||||||
pre: group
|
|
||||||
|
|
||||||
zh-tw:
|
|
||||||
weight: 2
|
|
||||||
languageName: 中文(繁體)
|
|
||||||
menu:
|
|
||||||
page:
|
|
||||||
- name: 網站
|
|
||||||
url: https://gitea.io/zh-tw/
|
|
||||||
weight: 10
|
|
||||||
pre: home
|
|
||||||
- name: 文件
|
|
||||||
url: /zh-tw/
|
|
||||||
weight: 20
|
|
||||||
pre: question
|
|
||||||
post: active
|
|
||||||
- name: API
|
|
||||||
url: https://try.gitea.io/api/swagger
|
|
||||||
weight: 45
|
|
||||||
pre: plug
|
|
||||||
- name: 部落格
|
|
||||||
url: https://blog.gitea.io/
|
|
||||||
weight: 30
|
|
||||||
pre: rss
|
|
||||||
- name: 商店
|
|
||||||
url: https://shop.gitea.io/
|
|
||||||
weight: 40
|
|
||||||
pre: shopping-cart
|
|
||||||
- name: 翻譯
|
|
||||||
url: https://crowdin.com/project/gitea
|
|
||||||
weight: 41
|
|
||||||
pre: language
|
|
||||||
- name: 下載
|
|
||||||
url: https://dl.gitea.io/
|
|
||||||
weight: 50
|
|
||||||
pre: download
|
|
||||||
- name: GitHub
|
|
||||||
url: https://github.com/go-gitea/
|
|
||||||
weight: 60
|
|
||||||
pre: github
|
|
||||||
- name: Discord 聊天室
|
|
||||||
url: https://discord.gg/Gitea
|
|
||||||
weight: 70
|
|
||||||
pre: comment
|
|
||||||
- name: 討論區
|
|
||||||
url: https://discourse.gitea.io/
|
|
||||||
weight: 80
|
|
||||||
pre: group
|
|
||||||
|
|
||||||
pt-br:
|
|
||||||
weight: 3
|
|
||||||
languageName: Português Brasileiro
|
|
||||||
menu:
|
|
||||||
page:
|
|
||||||
- name: Página inicial
|
|
||||||
url: https://gitea.io/pt-br/
|
|
||||||
weight: 10
|
|
||||||
pre: home
|
|
||||||
- name: Documentação
|
|
||||||
url: /pt-br/
|
|
||||||
weight: 20
|
|
||||||
pre: question
|
|
||||||
post: active
|
|
||||||
- name: API
|
|
||||||
url: https://try.gitea.io/api/swagger
|
|
||||||
weight: 45
|
|
||||||
pre: plug
|
|
||||||
- name: Blog
|
|
||||||
url: https://blog.gitea.io/
|
|
||||||
weight: 30
|
|
||||||
pre: rss
|
|
||||||
- name: Código-fonte
|
|
||||||
url: https://code.gitea.io/
|
|
||||||
weight: 40
|
|
||||||
pre: code
|
|
||||||
- name: Translation
|
|
||||||
url: https://crowdin.com/project/gitea
|
|
||||||
weight: 41
|
|
||||||
pre: language
|
|
||||||
- name: Downloads
|
|
||||||
url: https://dl.gitea.io/
|
|
||||||
weight: 50
|
|
||||||
pre: download
|
|
||||||
- name: GitHub
|
|
||||||
url: https://github.com/go-gitea/
|
|
||||||
weight: 60
|
|
||||||
pre: github
|
|
||||||
- name: Chat no Discord
|
|
||||||
url: https://discord.gg/Gitea
|
|
||||||
weight: 70
|
|
||||||
pre: comment
|
|
||||||
- name: Forum
|
|
||||||
url: https://discourse.gitea.io/
|
|
||||||
weight: 80
|
|
||||||
pre: group
|
|
||||||
|
|
||||||
nl-nl:
|
|
||||||
weight: 4
|
|
||||||
languageName: Nederlands
|
|
||||||
menu:
|
|
||||||
page:
|
|
||||||
- name: Website
|
|
||||||
url: https://gitea.io/nl-nl/
|
|
||||||
weight: 10
|
|
||||||
pre: home
|
|
||||||
- name: Docs
|
|
||||||
url: /nl-nl/
|
|
||||||
weight: 20
|
|
||||||
pre: question
|
|
||||||
post: active
|
|
||||||
- name: API
|
|
||||||
url: https://try.gitea.io/api/swagger
|
|
||||||
weight: 45
|
|
||||||
pre: plug
|
|
||||||
- name: Blog
|
|
||||||
url: https://blog.gitea.io/
|
|
||||||
weight: 30
|
|
||||||
pre: rss
|
|
||||||
- name: Code
|
|
||||||
url: https://code.gitea.io/
|
|
||||||
weight: 40
|
|
||||||
pre: code
|
|
||||||
- name: Translation
|
|
||||||
url: https://crowdin.com/project/gitea
|
|
||||||
weight: 41
|
|
||||||
pre: language
|
|
||||||
- name: Downloads
|
|
||||||
url: https://dl.gitea.io/
|
|
||||||
weight: 50
|
|
||||||
pre: download
|
|
||||||
- name: GitHub
|
|
||||||
url: https://github.com/go-gitea/
|
|
||||||
weight: 60
|
|
||||||
pre: github
|
|
||||||
- name: Discord Chat
|
|
||||||
url: https://discord.gg/Gitea
|
|
||||||
weight: 70
|
|
||||||
pre: comment
|
|
||||||
- name: Forum
|
|
||||||
url: https://discourse.gitea.io/
|
|
||||||
weight: 80
|
|
||||||
pre: group
|
|
||||||
|
|
||||||
fr-fr:
|
|
||||||
weight: 5
|
|
||||||
languageName: Français
|
|
||||||
menu:
|
|
||||||
page:
|
|
||||||
- name: Site
|
|
||||||
url: https://gitea.io/en-us/
|
|
||||||
weight: 10
|
|
||||||
pre: home
|
|
||||||
post: active
|
|
||||||
- name: Documentation
|
|
||||||
url: /fr-fr/
|
|
||||||
weight: 20
|
|
||||||
pre: question
|
|
||||||
- name: API
|
|
||||||
url: https://try.gitea.io/api/swagger
|
|
||||||
weight: 45
|
|
||||||
pre: plug
|
|
||||||
- name: Blog
|
|
||||||
url: https://blog.gitea.io/
|
|
||||||
weight: 30
|
|
||||||
pre: rss
|
|
||||||
- name: Code
|
|
||||||
url: https://code.gitea.io/
|
|
||||||
weight: 40
|
|
||||||
pre: code
|
|
||||||
- name: Translation
|
|
||||||
url: https://crowdin.com/project/gitea
|
|
||||||
weight: 41
|
|
||||||
pre: language
|
|
||||||
- name: Téléchargement
|
|
||||||
url: https://dl.gitea.io/
|
|
||||||
weight: 50
|
|
||||||
pre: download
|
|
||||||
- name: GitHub
|
|
||||||
url: https://github.com/go-gitea/
|
|
||||||
weight: 60
|
|
||||||
pre: github
|
|
||||||
- name: Discord Chat
|
|
||||||
url: https://discord.gg/Gitea
|
|
||||||
weight: 70
|
|
||||||
pre: comment
|
|
||||||
- name: Forum
|
|
||||||
url: https://discourse.gitea.io/
|
|
||||||
weight: 80
|
|
||||||
pre: group
|
|
||||||
|
|
||||||
de-de:
|
|
||||||
weight: 6
|
|
||||||
languageName: Deutsch
|
|
||||||
menu:
|
|
||||||
page:
|
|
||||||
- name: Webseite
|
|
||||||
url: https://gitea.io/en-us/
|
|
||||||
weight: 10
|
|
||||||
pre: home
|
|
||||||
post: active
|
|
||||||
- name: Dokumentation
|
|
||||||
url: /de-de/
|
|
||||||
weight: 20
|
|
||||||
pre: question
|
|
||||||
- name: API
|
|
||||||
url: https://try.gitea.io/api/swagger
|
|
||||||
weight: 45
|
|
||||||
pre: plug
|
|
||||||
- name: Blog
|
|
||||||
url: https://blog.gitea.io/
|
|
||||||
weight: 30
|
|
||||||
pre: rss
|
|
||||||
- name: Code
|
|
||||||
url: https://code.gitea.io/
|
|
||||||
weight: 40
|
|
||||||
pre: code
|
|
||||||
- name: Übersetzung
|
|
||||||
url: https://crowdin.com/project/gitea
|
|
||||||
weight: 41
|
|
||||||
pre: language
|
|
||||||
- name: Downloads
|
|
||||||
url: https://dl.gitea.io/
|
|
||||||
weight: 50
|
|
||||||
pre: download
|
|
||||||
- name: GitHub
|
|
||||||
url: https://github.com/go-gitea/
|
|
||||||
weight: 60
|
|
||||||
pre: github
|
|
||||||
- name: Discord Chat
|
|
||||||
url: https://discord.gg/Gitea
|
|
||||||
weight: 70
|
|
||||||
pre: comment
|
|
||||||
- name: Forum
|
|
||||||
url: https://discourse.gitea.io/
|
|
||||||
weight: 80
|
|
||||||
pre: group
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2023-04-27T14:00:00+08:00"
|
date: "2023-04-27T14:00:00+08:00"
|
||||||
title: "Actions"
|
title: "Actions"
|
||||||
slug: "actions"
|
slug: "actions"
|
||||||
weight: 36
|
sidebar_position: 36
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Usage - Actions"
|
name: "Usage - Actions"
|
||||||
weight: 31
|
sidebar_position: 31
|
||||||
identifier: "actions"
|
identifier: "actions"
|
||||||
---
|
---
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "Administration"
|
title: "Administration"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Administration"
|
name: "Administration"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
collapse: true
|
collapse: true
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2017-08-23T09:00:00+02:00"
|
date: "2017-08-23T09:00:00+02:00"
|
||||||
title: "Avancé"
|
title: "Avancé"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Avancé"
|
name: "Avancé"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "运维"
|
title: "运维"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "运维"
|
name: "运维"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "運維"
|
title: "運維"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "運維"
|
name: "運維"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-12-28"
|
date: "2019-12-28"
|
||||||
title: "Adding Legal Pages"
|
title: "Adding Legal Pages"
|
||||||
slug: adding-legal-pages
|
slug: adding-legal-pages
|
||||||
weight: 110
|
sidebar_position: 110
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -12,7 +12,7 @@ menu:
|
|||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Adding Legal Pages"
|
name: "Adding Legal Pages"
|
||||||
identifier: "adding-legal-pages"
|
identifier: "adding-legal-pages"
|
||||||
weight: 110
|
sidebar_position: 110
|
||||||
---
|
---
|
||||||
|
|
||||||
Some jurisdictions (such as EU), requires certain legal pages (e.g. Privacy Policy) to be added to website. Follow these steps to add them to your Gitea instance.
|
Some jurisdictions (such as EU), requires certain legal pages (e.g. Privacy Policy) to be added to website. Follow these steps to add them to your Gitea instance.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "添加法律页面"
|
title: "添加法律页面"
|
||||||
slug: adding-legal-pages
|
slug: adding-legal-pages
|
||||||
weight: 110
|
sidebar_position: 110
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -12,7 +12,7 @@ menu:
|
|||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "添加法律页面"
|
name: "添加法律页面"
|
||||||
identifier: "adding-legal-pages"
|
identifier: "adding-legal-pages"
|
||||||
weight: 110
|
sidebar_position: 110
|
||||||
---
|
---
|
||||||
|
|
||||||
一些法域(例如欧盟)要求在网站上添加特定的法律页面(例如隐私政策)。按照以下步骤将它们添加到你的 Gitea 实例中。
|
一些法域(例如欧盟)要求在网站上添加特定的法律页面(例如隐私政策)。按照以下步骤将它们添加到你的 Gitea 实例中。
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2017-01-01T16:00:00+02:00"
|
date: "2017-01-01T16:00:00+02:00"
|
||||||
title: "Backup and Restore"
|
title: "Backup and Restore"
|
||||||
slug: "backup-and-restore"
|
slug: "backup-and-restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Backup and Restore"
|
name: "Backup and Restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
identifier: "backup-and-restore"
|
identifier: "backup-and-restore"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -20,10 +20,6 @@ menu:
|
|||||||
Gitea currently has a `dump` command that will save the installation to a ZIP file. This
|
Gitea currently has a `dump` command that will save the installation to a ZIP file. This
|
||||||
file can be unpacked and used to restore an instance.
|
file can be unpacked and used to restore an instance.
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Backup Consistency
|
## Backup Consistency
|
||||||
|
|
||||||
To ensure the consistency of the Gitea instance, it must be shutdown during backup.
|
To ensure the consistency of the Gitea instance, it must be shutdown during backup.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-06-06T09:33:00+08:00"
|
date: "2018-06-06T09:33:00+08:00"
|
||||||
title: "备份与恢复"
|
title: "备份与恢复"
|
||||||
slug: "backup-and-restore"
|
slug: "backup-and-restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "备份与恢复"
|
name: "备份与恢复"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
identifier: "backup-and-restore"
|
identifier: "backup-and-restore"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2017-01-01T16:00:00+02:00"
|
date: "2017-01-01T16:00:00+02:00"
|
||||||
title: "用法: 備份與還原"
|
title: "用法: 備份與還原"
|
||||||
slug: "backup-and-restore"
|
slug: "backup-and-restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "備份與還原"
|
name: "備份與還原"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
identifier: "backup-and-restore"
|
identifier: "backup-and-restore"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2020-01-25T21:00:00-03:00"
|
date: "2020-01-25T21:00:00-03:00"
|
||||||
title: "Embedded data extraction tool"
|
title: "Embedded data extraction tool"
|
||||||
slug: "cmd-embedded"
|
slug: "cmd-embedded"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,19 +11,15 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Embedded data extraction tool"
|
name: "Embedded data extraction tool"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "cmd-embedded"
|
identifier: "cmd-embedded"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Embedded data extraction tool
|
# Embedded data extraction tool
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea's executable contains all the resources required to run: templates, images, style-sheets
|
Gitea's executable contains all the resources required to run: templates, images, style-sheets
|
||||||
and translations. Any of them can be overridden by placing a replacement in a matching path
|
and translations. Any of them can be overridden by placing a replacement in a matching path
|
||||||
inside the `custom` directory (see [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}})).
|
inside the `custom` directory (see [Customizing Gitea](administration/customizing-gitea.md)).
|
||||||
|
|
||||||
To obtain a copy of the embedded resources ready for editing, the `embedded` command from the CLI
|
To obtain a copy of the embedded resources ready for editing, the `embedded` command from the CLI
|
||||||
can be used from the OS shell interface.
|
can be used from the OS shell interface.
|
||||||
@@ -87,7 +83,7 @@ The default is the current directory.
|
|||||||
The `--custom` flag tells Gitea to extract the files directly into the `custom` directory.
|
The `--custom` flag tells Gitea to extract the files directly into the `custom` directory.
|
||||||
For this to work, the command needs to know the location of the `app.ini` configuration
|
For this to work, the command needs to know the location of the `app.ini` configuration
|
||||||
file (`--config`) and, depending of the configuration, be ran from the directory where
|
file (`--config`) and, depending of the configuration, be ran from the directory where
|
||||||
Gitea normally starts. See [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) for details.
|
Gitea normally starts. See [Customizing Gitea](administration/customizing-gitea.md) for details.
|
||||||
|
|
||||||
The `--overwrite` flag allows any existing files in the destination directory to be overwritten.
|
The `--overwrite` flag allows any existing files in the destination directory to be overwritten.
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "嵌入资源提取工具"
|
title: "嵌入资源提取工具"
|
||||||
slug: "cmd-embedded"
|
slug: "cmd-embedded"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,17 +11,13 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "嵌入资源提取工具"
|
name: "嵌入资源提取工具"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "cmd-embedded"
|
identifier: "cmd-embedded"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 嵌入资源提取工具
|
# 嵌入资源提取工具
|
||||||
|
|
||||||
**目录**
|
Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置](administration/customizing-gitea.md))。
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}}))。
|
|
||||||
|
|
||||||
要获取嵌入资源的副本以进行编辑,可以使用 CLI 中的 `embedded` 命令,通过操作系统的 shell 执行。
|
要获取嵌入资源的副本以进行编辑,可以使用 CLI 中的 `embedded` 命令,通过操作系统的 shell 执行。
|
||||||
|
|
||||||
@@ -75,7 +71,7 @@ gitea [--config {file}] embedded extract [--destination {dir}|--custom] [--overw
|
|||||||
|
|
||||||
`--destination` 选项用于指定提取文件的目标目录。默认为当前目录。
|
`--destination` 选项用于指定提取文件的目标目录。默认为当前目录。
|
||||||
|
|
||||||
`--custom` 标志告知 Gitea 直接将文件提取到 `custom` 目录中。为使其正常工作,该命令需要知道 `app.ini` 配置文件的位置(通过 `--config` 指定),并且根据配置的不同,需要从 Gitea 通常启动的目录运行。有关详细信息,请参阅 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})。
|
`--custom` 标志告知 Gitea 直接将文件提取到 `custom` 目录中。为使其正常工作,该命令需要知道 `app.ini` 配置文件的位置(通过 `--config` 指定),并且根据配置的不同,需要从 Gitea 通常启动的目录运行。有关详细信息,请参阅 [自定义 Gitea 配置](administration/customizing-gitea.md)。
|
||||||
|
|
||||||
`--overwrite` 标志允许覆盖目标目录中的任何现有文件。
|
`--overwrite` 标志允许覆盖目标目录中的任何现有文件。
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2017-01-01T16:00:00+02:00"
|
date: "2017-01-01T16:00:00+02:00"
|
||||||
title: "Gitea Command Line"
|
title: "Gitea Command Line"
|
||||||
slug: "command-line"
|
slug: "command-line"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Command Line"
|
name: "Command Line"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
identifier: "command-line"
|
identifier: "command-line"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Command Line
|
# Command Line
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
`gitea [global options] command [command or global options] [arguments...]`
|
`gitea [global options] command [command or global options] [arguments...]`
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "Gitea 命令行"
|
title: "Gitea 命令行"
|
||||||
slug: "command-line"
|
slug: "command-line"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Gitea 命令行"
|
name: "Gitea 命令行"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
identifier: "command-line"
|
identifier: "command-line"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 命令行
|
# 命令行
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 用法
|
## 用法
|
||||||
|
|
||||||
`gitea [全局选项] 命令 [命令或全局选项] [参数...]`
|
`gitea [全局选项] 命令 [命令或全局选项] [参数...]`
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-26T16:00:00+02:00"
|
date: "2016-12-26T16:00:00+02:00"
|
||||||
title: "Config Cheat Sheet"
|
title: "Config Cheat Sheet"
|
||||||
slug: "config-cheat-sheet"
|
slug: "config-cheat-sheet"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Config Cheat Sheet"
|
name: "Config Cheat Sheet"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
identifier: "config-cheat-sheet"
|
identifier: "config-cheat-sheet"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -35,8 +35,6 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||||||
|
|
||||||
**Note:** A full restart is required for Gitea configuration changes to take effect.
|
**Note:** A full restart is required for Gitea configuration changes to take effect.
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Default Configuration (non-`app.ini` configuration)
|
## Default Configuration (non-`app.ini` configuration)
|
||||||
|
|
||||||
These values are environment-dependent but form the basis of a lot of values. They will be
|
These values are environment-dependent but form the basis of a lot of values. They will be
|
||||||
@@ -82,7 +80,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
|
|||||||
- `SCRIPT_TYPE`: **bash**: The script type this server supports. Usually this is `bash`,
|
- `SCRIPT_TYPE`: **bash**: The script type this server supports. Usually this is `bash`,
|
||||||
but some users report that only `sh` is available.
|
but some users report that only `sh` is available.
|
||||||
- `DETECTED_CHARSETS_ORDER`: **UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr**: Tie-break order of detected charsets - if the detected charsets have equal confidence, charsets earlier in the list will be chosen in preference to those later. Adding `defaults` will place the unnamed charsets at that point.
|
- `DETECTED_CHARSETS_ORDER`: **UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr**: Tie-break order of detected charsets - if the detected charsets have equal confidence, charsets earlier in the list will be chosen in preference to those later. Adding `defaults` will place the unnamed charsets at that point.
|
||||||
- `ANSI_CHARSET`: **\<empty\>**: Default ANSI charset to override non-UTF-8 charsets to.
|
- `ANSI_CHARSET`: **_empty_**: Default ANSI charset to override non-UTF-8 charsets to.
|
||||||
- `FORCE_PRIVATE`: **false**: Force every new repository to be private.
|
- `FORCE_PRIVATE`: **false**: Force every new repository to be private.
|
||||||
- `DEFAULT_PRIVATE`: **last**: Default private when creating a new repository.
|
- `DEFAULT_PRIVATE`: **last**: Default private when creating a new repository.
|
||||||
\[last, private, public\]
|
\[last, private, public\]
|
||||||
@@ -97,7 +95,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
|
|||||||
default SSH port is used.
|
default SSH port is used.
|
||||||
- `GO_GET_CLONE_URL_PROTOCOL`: **https**: Value for the "go get" request returns the repository url as https or ssh
|
- `GO_GET_CLONE_URL_PROTOCOL`: **https**: Value for the "go get" request returns the repository url as https or ssh
|
||||||
default is https.
|
default is https.
|
||||||
- `ACCESS_CONTROL_ALLOW_ORIGIN`: **\<empty\>**: Value for Access-Control-Allow-Origin header,
|
- `ACCESS_CONTROL_ALLOW_ORIGIN`: **_empty_**: Value for Access-Control-Allow-Origin header,
|
||||||
default is not to present. **WARNING**: This maybe harmful to you website if you do not
|
default is not to present. **WARNING**: This maybe harmful to you website if you do not
|
||||||
give it a right value.
|
give it a right value.
|
||||||
- `DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH`: **false**: Close an issue if a commit on a non default branch marks it as closed.
|
- `DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH`: **false**: Close an issue if a commit on a non default branch marks it as closed.
|
||||||
@@ -147,13 +145,13 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
|
|||||||
|
|
||||||
- `ENABLED`: **true**: Whether repository file uploads are enabled
|
- `ENABLED`: **true**: Whether repository file uploads are enabled
|
||||||
- `TEMP_PATH`: **data/tmp/uploads**: Path for uploads (content gets deleted on Gitea restart)
|
- `TEMP_PATH`: **data/tmp/uploads**: Path for uploads (content gets deleted on Gitea restart)
|
||||||
- `ALLOWED_TYPES`: **\<empty\>**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
|
- `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
|
||||||
- `FILE_MAX_SIZE`: **3**: Max size of each file in megabytes.
|
- `FILE_MAX_SIZE`: **3**: Max size of each file in megabytes.
|
||||||
- `MAX_FILES`: **5**: Max number of files per upload
|
- `MAX_FILES`: **5**: Max number of files per upload
|
||||||
|
|
||||||
### Repository - Release (`repository.release`)
|
### Repository - Release (`repository.release`)
|
||||||
|
|
||||||
- `ALLOWED_TYPES`: **\<empty\>**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
|
- `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
|
||||||
- `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface
|
- `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface
|
||||||
- For settings related to file attachments on releases, see the `attachment` section.
|
- For settings related to file attachments on releases, see the `attachment` section.
|
||||||
|
|
||||||
@@ -291,7 +289,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- `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.
|
||||||
This is useful if the internal and the external URL don't match (e.g. in Docker).
|
This is useful if the internal and the external URL don't match (e.g. in Docker).
|
||||||
- `STATIC_URL_PREFIX`: **\<empty\>**:
|
- `STATIC_URL_PREFIX`: **_empty_**:
|
||||||
Overwrite this option to request static resources from a different URL.
|
Overwrite this option to request static resources from a different URL.
|
||||||
This includes CSS files, images, JS files and web fonts.
|
This includes CSS files, images, JS files and web fonts.
|
||||||
Avatar images are dynamic resources and still served by Gitea.
|
Avatar images are dynamic resources and still served by Gitea.
|
||||||
@@ -334,7 +332,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- `SSH_ROOT_PATH`: **~/.ssh**: Root path of SSH directory.
|
- `SSH_ROOT_PATH`: **~/.ssh**: Root path of SSH directory.
|
||||||
- `SSH_CREATE_AUTHORIZED_KEYS_FILE`: **true**: Gitea will create a authorized_keys file by default when it is not using the internal ssh server. If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
|
- `SSH_CREATE_AUTHORIZED_KEYS_FILE`: **true**: Gitea will create a authorized_keys file by default when it is not using the internal ssh server. If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
|
||||||
- `SSH_AUTHORIZED_KEYS_BACKUP`: **true**: Enable SSH Authorized Key Backup when rewriting all keys, default is true.
|
- `SSH_AUTHORIZED_KEYS_BACKUP`: **true**: Enable SSH Authorized Key Backup when rewriting all keys, default is true.
|
||||||
- `SSH_TRUSTED_USER_CA_KEYS`: **\<empty\>**: Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. Multiple keys should be comma separated. E.g.`ssh-<algorithm> <key>` or `ssh-<algorithm> <key1>, ssh-<algorithm> <key2>`. For more information see `TrustedUserCAKeys` in the sshd config man pages. When empty no file will be created and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` will default to `off`.
|
- `SSH_TRUSTED_USER_CA_KEYS`: **_empty_**: Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. Multiple keys should be comma separated. E.g.`ssh-<algorithm> <key>` or `ssh-<algorithm> <key1>, ssh-<algorithm> <key2>`. For more information see `TrustedUserCAKeys` in the sshd config man pages. When empty no file will be created and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` will default to `off`.
|
||||||
- `SSH_TRUSTED_USER_CA_KEYS_FILENAME`: **`RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem**: Absolute path of the `TrustedUserCaKeys` file Gitea will manage. If you're running your own ssh server and you want to use the Gitea managed file you'll also need to modify your sshd_config to point to this file. The official docker image will automatically work without further configuration.
|
- `SSH_TRUSTED_USER_CA_KEYS_FILENAME`: **`RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem**: Absolute path of the `TrustedUserCaKeys` file Gitea will manage. If you're running your own ssh server and you want to use the Gitea managed file you'll also need to modify your sshd_config to point to this file. The official docker image will automatically work without further configuration.
|
||||||
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set.
|
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set.
|
||||||
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
||||||
@@ -345,7 +343,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect
|
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect
|
||||||
- `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: For the built-in SSH server, choose the keypairs to offer as the host key. The private key should be at `SSH_SERVER_HOST_KEY` and the public `SSH_SERVER_HOST_KEY.pub`. Relative paths are made absolute relative to the `APP_DATA_PATH`. If no key exists a 4096 bit RSA key will be created for you.
|
- `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: For the built-in SSH server, choose the keypairs to offer as the host key. The private key should be at `SSH_SERVER_HOST_KEY` and the public `SSH_SERVER_HOST_KEY.pub`. Relative paths are made absolute relative to the `APP_DATA_PATH`. If no key exists a 4096 bit RSA key will be created for you.
|
||||||
- `SSH_KEY_TEST_PATH`: **/tmp**: Directory to create temporary files in when testing public keys using ssh-keygen, default is the system temporary directory.
|
- `SSH_KEY_TEST_PATH`: **/tmp**: Directory to create temporary files in when testing public keys using ssh-keygen, default is the system temporary directory.
|
||||||
- `SSH_KEYGEN_PATH`: **\<empty\>**: Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself.
|
- `SSH_KEYGEN_PATH`: **_empty_**: Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself.
|
||||||
- `SSH_EXPOSE_ANONYMOUS`: **false**: Enable exposure of SSH clone URL to anonymous visitors, default is false.
|
- `SSH_EXPOSE_ANONYMOUS`: **false**: Enable exposure of SSH clone URL to anonymous visitors, default is false.
|
||||||
- `SSH_PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the SSH connections. (Set to
|
- `SSH_PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the SSH connections. (Set to
|
||||||
-1 to disable all timeouts.)
|
-1 to disable all timeouts.)
|
||||||
@@ -364,7 +362,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- `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.
|
||||||
- `LFS_CONTENT_PATH`: **%(APP_DATA_PATH)s/lfs**: Default LFS content path. (if it is on local storage.) **DEPRECATED** use settings in `[lfs]`.
|
- `LFS_CONTENT_PATH`: **%(APP_DATA_PATH)s/lfs**: Default LFS content path. (if it is on local storage.) **DEPRECATED** use settings in `[lfs]`.
|
||||||
- `LFS_JWT_SECRET`: **\<empty\>**: LFS authentication secret, change this a unique string.
|
- `LFS_JWT_SECRET`: **_empty_**: LFS authentication secret, change this a unique string.
|
||||||
- `LFS_HTTP_AUTH_EXPIRY`: **24h**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail.
|
- `LFS_HTTP_AUTH_EXPIRY`: **24h**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail.
|
||||||
- `LFS_MAX_FILE_SIZE`: **0**: Maximum allowed LFS file size in bytes (Set to 0 for no limit).
|
- `LFS_MAX_FILE_SIZE`: **0**: Maximum allowed LFS file size in bytes (Set to 0 for no limit).
|
||||||
- `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.
|
||||||
@@ -373,7 +371,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- `REDIRECTOR_USE_PROXY_PROTOCOL`: **%(USE_PROXY_PROTOCOL)s**: expect PROXY protocol header on connections to https redirector.
|
- `REDIRECTOR_USE_PROXY_PROTOCOL`: **%(USE_PROXY_PROTOCOL)s**: 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.
|
||||||
- `SSL_CURVE_PREFERENCES`: **X25519,P256**: Set the preferred curves,
|
- `SSL_CURVE_PREFERENCES`: **X25519,P256**: Set the preferred curves,
|
||||||
- `SSL_CIPHER_SUITES`: **ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305**: Set the preferred cipher suites.
|
- `SSL_CIPHER_SUITES`: **ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305**: Set the preferred cipher suites.
|
||||||
- If there is no hardware support for AES suites, by default the ChaCha suites will be preferred over the AES suites.
|
- If there is no hardware support for AES suites, by default the ChaCha suites will be preferred over the AES suites.
|
||||||
@@ -409,11 +407,11 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- "ecdhe_rsa_with_chacha20_poly1305" is an alias for "ecdhe_rsa_with_chacha20_poly1305_sha256"
|
- "ecdhe_rsa_with_chacha20_poly1305" is an alias for "ecdhe_rsa_with_chacha20_poly1305_sha256"
|
||||||
- "ecdhe_ecdsa_with_chacha20_poly1305" is alias for "ecdhe_ecdsa_with_chacha20_poly1305_sha256"
|
- "ecdhe_ecdsa_with_chacha20_poly1305" is alias for "ecdhe_ecdsa_with_chacha20_poly1305_sha256"
|
||||||
- `ENABLE_ACME`: **false**: Flag to enable automatic certificate management via an ACME capable Certificate Authority (CA) server (default: Lets Encrypt). If enabled, `CERT_FILE` and `KEY_FILE` are ignored, and the CA must resolve `DOMAIN` to this gitea server. Ensure that DNS records are set and either port `80` or port `443` are accessible by the CA server (the public internet by default), and redirected to the appropriate ports `PORT_TO_REDIRECT` or `HTTP_PORT` respectively.
|
- `ENABLE_ACME`: **false**: Flag to enable automatic certificate management via an ACME capable Certificate Authority (CA) server (default: Lets Encrypt). If enabled, `CERT_FILE` and `KEY_FILE` are ignored, and the CA must resolve `DOMAIN` to this gitea server. Ensure that DNS records are set and either port `80` or port `443` are accessible by the CA server (the public internet by default), and redirected to the appropriate ports `PORT_TO_REDIRECT` or `HTTP_PORT` respectively.
|
||||||
- `ACME_URL`: **\<empty\>**: The CA's ACME directory URL, e.g. for a self-hosted [smallstep CA server](https://github.com/smallstep/certificates), it can look like `https://ca.example.com/acme/acme/directory`. If left empty, it defaults to using Let's Encerypt's production CA (check `LETSENCRYPT_ACCEPTTOS` as well).
|
- `ACME_URL`: **_empty_**: The CA's ACME directory URL, e.g. for a self-hosted [smallstep CA server](https://github.com/smallstep/certificates), it can look like `https://ca.example.com/acme/acme/directory`. If left empty, it defaults to using Let's Encerypt's production CA (check `LETSENCRYPT_ACCEPTTOS` as well).
|
||||||
- `ACME_ACCEPTTOS`: **false**: This is an explicit check that you accept the terms of service of the ACME provider. The default is Lets Encrypt [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf).
|
- `ACME_ACCEPTTOS`: **false**: This is an explicit check that you accept the terms of service of the ACME provider. The default is Lets Encrypt [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf).
|
||||||
- `ACME_DIRECTORY`: **https**: Directory that the certificate manager will use to cache information such as certs and private keys.
|
- `ACME_DIRECTORY`: **https**: Directory that the certificate manager will use to cache information such as certs and private keys.
|
||||||
- `ACME_EMAIL`: **\<empty\>**: Email used for the ACME registration. Usually it is to notify about problems with issued certificates.
|
- `ACME_EMAIL`: **_empty_**: Email used for the ACME registration. Usually it is to notify about problems with issued certificates.
|
||||||
- `ACME_CA_ROOT`: **\<empty\>**: The CA's root certificate. If left empty, it defaults to using the system's trust chain.
|
- `ACME_CA_ROOT`: **_empty_**: The CA's root certificate. If left empty, it defaults to using the system's trust chain.
|
||||||
- `ALLOW_GRACEFUL_RESTARTS`: **true**: Perform a graceful restart on SIGHUP
|
- `ALLOW_GRACEFUL_RESTARTS`: **true**: Perform a graceful restart on SIGHUP
|
||||||
- `GRACEFUL_HAMMER_TIME`: **60s**: After a restart the parent process will stop accepting new connections and will allow requests to finish before stopping. Shutdown will be forced if it takes longer than this time.
|
- `GRACEFUL_HAMMER_TIME`: **60s**: After a restart the parent process will stop accepting new connections and will allow requests to finish before stopping. Shutdown will be forced if it takes longer than this time.
|
||||||
- `STARTUP_TIMEOUT`: **0**: Shutsdown the server if startup takes longer than the provided time. On Windows setting this sends a waithint to the SVC host to tell the SVC host startup may take some time. Please note startup is determined by the opening of the listeners - HTTP/HTTPS/SSH. Indexers may take longer to startup and can have their own timeouts.
|
- `STARTUP_TIMEOUT`: **0**: Shutsdown the server if startup takes longer than the provided time. On Windows setting this sends a waithint to the SVC host to tell the SVC host startup may take some time. Please note startup is determined by the opening of the listeners - HTTP/HTTPS/SSH. Indexers may take longer to startup and can have their own timeouts.
|
||||||
@@ -424,8 +422,8 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- `HOST`: **127.0.0.1:3306**: Database host address and port or absolute path for unix socket \[mysql, postgres\] (ex: /var/run/mysqld/mysqld.sock).
|
- `HOST`: **127.0.0.1:3306**: Database host address and port or absolute path for unix socket \[mysql, postgres\] (ex: /var/run/mysqld/mysqld.sock).
|
||||||
- `NAME`: **gitea**: Database name.
|
- `NAME`: **gitea**: Database name.
|
||||||
- `USER`: **root**: Database username.
|
- `USER`: **root**: Database username.
|
||||||
- `PASSWD`: **\<empty\>**: Database user password. Use \`your password\` or """your password""" for quoting if you use special characters in the password.
|
- `PASSWD`: **_empty_**: Database user password. Use \`your password\` or """your password""" for quoting if you use special characters in the password.
|
||||||
- `SCHEMA`: **\<empty\>**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand,
|
- `SCHEMA`: **_empty_**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand,
|
||||||
the user must have creation privileges on it, and the user search path must be set to the look into the schema first
|
the user must have creation privileges on it, and the user search path must be set to the look into the schema first
|
||||||
(e.g. `ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;`).
|
(e.g. `ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;`).
|
||||||
- `SSL_MODE`: **disable**: SSL/TLS encryption mode for connecting to the database. This option is only applied for PostgreSQL and MySQL.
|
- `SSL_MODE`: **disable**: SSL/TLS encryption mode for connecting to the database. This option is only applied for PostgreSQL and MySQL.
|
||||||
@@ -487,7 +485,7 @@ Configuration at `[queue]` will set defaults for queues with overrides for indiv
|
|||||||
- `CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. For `redis-cluster` use `redis+cluster://127.0.0.1:6379/0`. Options can be set using query params. Similarly, LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR`
|
- `CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. For `redis-cluster` use `redis+cluster://127.0.0.1:6379/0`. Options can be set using query params. Similarly, LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR`
|
||||||
- `QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overridden in the specific `queue.name` section.
|
- `QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overridden in the specific `queue.name` section.
|
||||||
- `SET_NAME`: **_unique**: The suffix that will be added to the default redis and disk queue `set` name for unique queues. Individual queues will default to **`name`**`QUEUE_NAME`_`SET_NAME`_ but can be overridden in the specific `queue.name` section.
|
- `SET_NAME`: **_unique**: The suffix that will be added to the default redis and disk queue `set` name for unique queues. Individual queues will default to **`name`**`QUEUE_NAME`_`SET_NAME`_ but can be overridden in the specific `queue.name` section.
|
||||||
- `MAX_WORKERS`: **10**: Maximum number of worker go-routines for the queue.
|
- `MAX_WORKERS`: **(dynamic)**: Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
|
||||||
|
|
||||||
Gitea creates the following non-unique queues:
|
Gitea creates the following non-unique queues:
|
||||||
|
|
||||||
@@ -514,7 +512,7 @@ And the following unique queues:
|
|||||||
|
|
||||||
- `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 key is VERY IMPORTANT, if you lost it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
|
||||||
- `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.
|
- `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
|
||||||
@@ -540,7 +538,7 @@ And the following unique queues:
|
|||||||
- `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, pbkdf2_v1, pbkdf2_hi, scrypt, bcrypt\], argon2 and scrypt will spend significant amounts of memory.
|
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, pbkdf2_v1, pbkdf2_hi, scrypt, bcrypt\], argon2 and scrypt will spend significant amounts of memory.
|
||||||
- Note: The default parameters for `pbkdf2` hashing have changed - the previous settings are available as `pbkdf2_v1` but are not recommended.
|
- Note: The default parameters for `pbkdf2` hashing have changed - the previous settings are available as `pbkdf2_v1` but are not recommended.
|
||||||
- The hash functions may be tuned by using `$` after the algorithm:
|
- The hash functions may be tuned by using `$` after the algorithm:
|
||||||
@@ -571,23 +569,23 @@ And the following unique queues:
|
|||||||
## 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 both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied
|
||||||
|
|
||||||
## OpenID (`openid`)
|
## OpenID (`openid`)
|
||||||
|
|
||||||
- `ENABLE_OPENID_SIGNIN`: **false**: Allow authentication in via OpenID.
|
- `ENABLE_OPENID_SIGNIN`: **false**: Allow authentication in via OpenID.
|
||||||
- `ENABLE_OPENID_SIGNUP`: **! DISABLE\_REGISTRATION**: Allow registering via OpenID.
|
- `ENABLE_OPENID_SIGNUP`: **! DISABLE\_REGISTRATION**: Allow registering via OpenID.
|
||||||
- `WHITELISTED_URIS`: **\<empty\>**: If non-empty, list of POSIX regex patterns matching
|
- `WHITELISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching
|
||||||
OpenID URI's to permit.
|
OpenID URI's to permit.
|
||||||
- `BLACKLISTED_URIS`: **\<empty\>**: If non-empty, list of POSIX regex patterns matching
|
- `BLACKLISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching
|
||||||
OpenID URI's to block.
|
OpenID URI's to block.
|
||||||
|
|
||||||
## 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:
|
||||||
- userid - use the userid / sub attribute
|
- userid - use the userid / sub attribute
|
||||||
@@ -651,8 +649,8 @@ And the following unique queues:
|
|||||||
- `ENABLE_TIMETRACKING`: **true**: Enable Timetracking feature.
|
- `ENABLE_TIMETRACKING`: **true**: Enable Timetracking feature.
|
||||||
- `DEFAULT_ENABLE_TIMETRACKING`: **true**: Allow repositories to use timetracking by default.
|
- `DEFAULT_ENABLE_TIMETRACKING`: **true**: Allow repositories to use timetracking by default.
|
||||||
- `DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME`: **true**: Only allow users with write permissions to track time.
|
- `DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME`: **true**: Only allow users with write permissions to track time.
|
||||||
- `EMAIL_DOMAIN_ALLOWLIST`: **\<empty\>**: If non-empty, comma separated list of domain names that can only be used to register on this instance, wildcard is supported.
|
- `EMAIL_DOMAIN_ALLOWLIST`: **_empty_**: If non-empty, comma separated list of domain names that can only be used to register on this instance, wildcard is supported.
|
||||||
- `EMAIL_DOMAIN_BLOCKLIST`: **\<empty\>**: If non-empty, comma separated list of domain names that cannot be used to register on this instance, wildcard is supported.
|
- `EMAIL_DOMAIN_BLOCKLIST`: **_empty_**: If non-empty, comma separated list of domain names that cannot be used to register on this instance, wildcard is supported.
|
||||||
- `SHOW_REGISTRATION_BUTTON`: **! DISABLE\_REGISTRATION**: Show Registration Button
|
- `SHOW_REGISTRATION_BUTTON`: **! DISABLE\_REGISTRATION**: Show Registration Button
|
||||||
- `SHOW_MILESTONES_DASHBOARD_PAGE`: **true** Enable this to show the milestones dashboard page - a view of all the user's milestones
|
- `SHOW_MILESTONES_DASHBOARD_PAGE`: **true** Enable this to show the milestones dashboard page - a view of all the user's milestones
|
||||||
- `AUTO_WATCH_NEW_REPOS`: **true**: Enable this to let all organisation users watch new repos when they are created
|
- `AUTO_WATCH_NEW_REPOS`: **true**: Enable this to let all organisation users watch new repos when they are created
|
||||||
@@ -696,8 +694,8 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
|
|||||||
- Wildcard hosts: `*.mydomain.com`, `192.168.100.*`
|
- Wildcard hosts: `*.mydomain.com`, `192.168.100.*`
|
||||||
- `SKIP_TLS_VERIFY`: **false**: Allow insecure certification.
|
- `SKIP_TLS_VERIFY`: **false**: Allow insecure certification.
|
||||||
- `PAGING_NUM`: **10**: Number of webhook history events that are shown in one page.
|
- `PAGING_NUM`: **10**: Number of webhook history events that are shown in one page.
|
||||||
- `PROXY_URL`: **\<empty\>**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy. If not given, will use global proxy setting.
|
- `PROXY_URL`: **_empty_**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy. If not given, will use global proxy setting.
|
||||||
- `PROXY_HOSTS`: **\<empty\>`**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. If not given, will use global proxy setting.
|
- `PROXY_HOSTS`: **_empty_`**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. If not given, will use global proxy setting.
|
||||||
|
|
||||||
## Mailer (`mailer`)
|
## Mailer (`mailer`)
|
||||||
|
|
||||||
@@ -708,14 +706,14 @@ 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)
|
[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`._
|
- `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`._
|
||||||
- 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.
|
- 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.
|
||||||
- **sendmail** Use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
|
- **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.
|
- **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`.
|
- 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`.
|
- Enabling dummy will ignore all settings except `ENABLED`, `SUBJECT_PREFIX` and `FROM`.
|
||||||
- `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`._
|
- `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`._
|
||||||
- `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`._
|
- `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`._
|
||||||
- 25: insecure SMTP
|
- 25: insecure SMTP
|
||||||
- 465: SMTP Secure
|
- 465: SMTP Secure
|
||||||
- 587: StartTLS
|
- 587: StartTLS
|
||||||
@@ -723,16 +721,16 @@ and
|
|||||||
- `CLIENT_CERT_FILE`: **custom/mailer/cert.pem**: Client certificate file.
|
- `CLIENT_CERT_FILE`: **custom/mailer/cert.pem**: Client certificate file.
|
||||||
- `CLIENT_KEY_FILE`: **custom/mailer/key.pem**: Client key 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.
|
- `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/administration/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 SMTP host is localhost. See [Email Setup](administration/email-setup.md) for more information.
|
||||||
- `ENABLE_HELO`: **true**: Enable HELO operation.
|
- `ENABLE_HELO`: **true**: Enable HELO operation.
|
||||||
- `HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname.
|
- `HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname.
|
||||||
- `FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \<email@example.com\> format.
|
- `FROM`: **_empty_**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \<email@example.com\> format.
|
||||||
- `ENVELOPE_FROM`: **\<empty\>**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address.
|
- `ENVELOPE_FROM`: **_empty_**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address.
|
||||||
- `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).
|
- `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_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]`
|
||||||
@@ -741,11 +739,11 @@ and
|
|||||||
## Incoming Email (`email.incoming`)
|
## Incoming Email (`email.incoming`)
|
||||||
|
|
||||||
- `ENABLED`: **false**: Enable handling of incoming emails.
|
- `ENABLED`: **false**: Enable handling of incoming emails.
|
||||||
- `REPLY_TO_ADDRESS`: **\<empty\>**: The email address including the `%{token}` placeholder that will be replaced per user/action. Example: `incoming+%{token}@example.com`. The placeholder must appear in the user part of the address (before the `@`).
|
- `REPLY_TO_ADDRESS`: **_empty_**: The email address including the `%{token}` placeholder that will be replaced per user/action. Example: `incoming+%{token}@example.com`. The placeholder must appear in the user part of the address (before the `@`).
|
||||||
- `HOST`: **\<empty\>**: IMAP server host.
|
- `HOST`: **_empty_**: IMAP server host.
|
||||||
- `PORT`: **\<empty\>**: IMAP server port.
|
- `PORT`: **_empty_**: IMAP server port.
|
||||||
- `USERNAME`: **\<empty\>**: Username of the receiving account.
|
- `USERNAME`: **_empty_**: Username of the receiving account.
|
||||||
- `PASSWORD`: **\<empty\>**: Password of the receiving account.
|
- `PASSWORD`: **_empty_**: Password of the receiving account.
|
||||||
- `USE_TLS`: **false**: Whether the IMAP server uses TLS.
|
- `USE_TLS`: **false**: Whether the IMAP server uses TLS.
|
||||||
- `SKIP_TLS_VERIFY`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe.
|
- `SKIP_TLS_VERIFY`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe.
|
||||||
- `MAILBOX`: **INBOX**: The mailbox name where incoming mail will end up.
|
- `MAILBOX`: **INBOX**: The mailbox name where incoming mail will end up.
|
||||||
@@ -757,7 +755,7 @@ and
|
|||||||
- `ENABLED`: **true**: Enable the cache.
|
- `ENABLED`: **true**: Enable the cache.
|
||||||
- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `redis-cluster`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.)
|
- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `redis-cluster`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.)
|
||||||
- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only.
|
- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only.
|
||||||
- `HOST`: **\<empty\>**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue.
|
- `HOST`: **_empty_**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue.
|
||||||
- Redis: `redis://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
|
- Redis: `redis://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
|
||||||
- Redis-cluster `redis+cluster://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
|
- Redis-cluster `redis+cluster://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
|
||||||
- Memcache: `127.0.0.1:9090;127.0.0.1:9091`
|
- Memcache: `127.0.0.1:9090;127.0.0.1:9091`
|
||||||
@@ -778,7 +776,7 @@ and
|
|||||||
- `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID.
|
- `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID.
|
||||||
- `GC_INTERVAL_TIME`: **86400**: GC interval in seconds.
|
- `GC_INTERVAL_TIME`: **86400**: GC interval in seconds.
|
||||||
- `SESSION_LIFE_TIME`: **86400**: Session life time in seconds, default is 86400 (1 day)
|
- `SESSION_LIFE_TIME`: **86400**: Session life time in seconds, default is 86400 (1 day)
|
||||||
- `DOMAIN`: **\<empty\>**: Sets the cookie Domain
|
- `DOMAIN`: **_empty_**: Sets the cookie Domain
|
||||||
- `SAME_SITE`: **lax** \[strict, lax, none\]: Set the SameSite setting for the cookie.
|
- `SAME_SITE`: **lax** \[strict, lax, none\]: Set the SameSite setting for the cookie.
|
||||||
|
|
||||||
## Picture (`picture`)
|
## Picture (`picture`)
|
||||||
@@ -833,12 +831,12 @@ Default templates for project boards:
|
|||||||
|
|
||||||
## Log (`log`)
|
## Log (`log`)
|
||||||
|
|
||||||
- `ROOT_PATH`: **\<empty\>**: Root path for log files.
|
- `ROOT_PATH`: **_empty_**: Root path for log files.
|
||||||
- `MODE`: **console**: Logging mode. For multiple modes, use a comma to separate values. You can configure each mode in per mode log subsections `\[log.writer-mode-name\]`.
|
- `MODE`: **console**: Logging mode. For multiple modes, use a comma to separate values. You can configure each mode in per mode log subsections `\[log.writer-mode-name\]`.
|
||||||
- `LEVEL`: **Info**: General log level. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
|
- `LEVEL`: **Info**: General log level. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
|
||||||
- `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces (rarely useful, do not set it). \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
|
- `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces (rarely useful, do not set it). \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
|
||||||
- `ENABLE_SSH_LOG`: **false**: save ssh log to log file
|
- `ENABLE_SSH_LOG`: **false**: save ssh log to log file
|
||||||
- `logger.access.MODE`: **\<empty\>**: The "access" logger
|
- `logger.access.MODE`: **_empty_**: The "access" logger
|
||||||
- `logger.router.MODE`: **,**: The "router" logger, a single comma means it will use the default MODE above
|
- `logger.router.MODE`: **,**: The "router" logger, a single comma means it will use the default MODE above
|
||||||
- `logger.xorm.MODE`: **,**: The "xorm" logger
|
- `logger.xorm.MODE`: **,**: The "xorm" logger
|
||||||
|
|
||||||
@@ -852,7 +850,7 @@ Default templates for project boards:
|
|||||||
- `ResponseWriter`: the responseWriter from the request.
|
- `ResponseWriter`: the responseWriter from the request.
|
||||||
- `RequestID`: the value matching REQUEST_ID_HEADERS(default: `-`, if not matched).
|
- `RequestID`: the value matching REQUEST_ID_HEADERS(default: `-`, if not matched).
|
||||||
- You must be very careful to ensure that this template does not throw errors or panics as this template runs outside the panic/recovery script.
|
- You must be very careful to ensure that this template does not throw errors or panics as this template runs outside the panic/recovery script.
|
||||||
- `REQUEST_ID_HEADERS`: **\<empty\>**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log.
|
- `REQUEST_ID_HEADERS`: **_empty_**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log.
|
||||||
- e.g.
|
- e.g.
|
||||||
- In the Request Header: X-Request-ID: **test-id-123**
|
- In the Request Header: X-Request-ID: **test-id-123**
|
||||||
- Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
|
- Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
|
||||||
@@ -920,7 +918,7 @@ Default templates for project boards:
|
|||||||
|
|
||||||
- `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check.
|
- `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check.
|
||||||
- `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout.
|
- `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout.
|
||||||
- `ARGS`: **\<empty\>**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck
|
- `ARGS`: **_empty_**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck
|
||||||
|
|
||||||
#### Cron - Repository Statistics Check (`cron.check_repo_stats`)
|
#### Cron - Repository Statistics Check (`cron.check_repo_stats`)
|
||||||
|
|
||||||
@@ -962,7 +960,7 @@ Default templates for project boards:
|
|||||||
- `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`.
|
||||||
- `TIMEOUT`: **60s**: Time duration syntax for garbage collection execution timeout.
|
- `TIMEOUT`: **60s**: Time duration syntax for garbage collection execution timeout.
|
||||||
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
- `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices.
|
||||||
- `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`)
|
||||||
|
|
||||||
@@ -1044,7 +1042,7 @@ Default templates for project boards:
|
|||||||
- `MAX_GIT_DIFF_FILES`: **100**: Max number of files shown in diff view.
|
- `MAX_GIT_DIFF_FILES`: **100**: Max number of files shown in diff view.
|
||||||
- `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.
|
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)
|
||||||
@@ -1077,7 +1075,7 @@ This section only does "set" config, a removed config key from this section won'
|
|||||||
- `ENABLED`: **false**: Enables /metrics endpoint for prometheus.
|
- `ENABLED`: **false**: Enables /metrics endpoint for prometheus.
|
||||||
- `ENABLED_ISSUE_BY_LABEL`: **false**: Enable issue by label metrics with format `gitea_issues_by_label{label="bug"} 2`.
|
- `ENABLED_ISSUE_BY_LABEL`: **false**: Enable issue by label metrics with format `gitea_issues_by_label{label="bug"} 2`.
|
||||||
- `ENABLED_ISSUE_BY_REPOSITORY`: **false**: Enable issue by repository metrics with format `gitea_issues_by_repository{repository="org/repo"} 5`.
|
- `ENABLED_ISSUE_BY_REPOSITORY`: **false**: Enable issue by repository metrics with format `gitea_issues_by_repository{repository="org/repo"} 5`.
|
||||||
- `TOKEN`: **\<empty\>**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`.
|
- `TOKEN`: **_empty_**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`.
|
||||||
|
|
||||||
## API (`api`)
|
## API (`api`)
|
||||||
|
|
||||||
@@ -1094,7 +1092,7 @@ This section only does "set" config, a removed config key from this section won'
|
|||||||
- `REFRESH_TOKEN_EXPIRATION_TIME`: **730**: Lifetime of an OAuth2 refresh token in hours
|
- `REFRESH_TOKEN_EXPIRATION_TIME`: **730**: Lifetime of an OAuth2 refresh token in hours
|
||||||
- `INVALIDATE_REFRESH_TOKENS`: **false**: Check if refresh token has already been used
|
- `INVALIDATE_REFRESH_TOKENS`: **false**: Check if refresh token has already been used
|
||||||
- `JWT_SIGNING_ALGORITHM`: **RS256**: Algorithm used to sign OAuth2 tokens. Valid values: \[`HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`\]
|
- `JWT_SIGNING_ALGORITHM`: **RS256**: Algorithm used to sign OAuth2 tokens. Valid values: \[`HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`\]
|
||||||
- `JWT_SECRET`: **\<empty\>**: OAuth2 authentication secret for access and refresh tokens, change this to a unique string. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `HS256`, `HS384` or `HS512`.
|
- `JWT_SECRET`: **_empty_**: OAuth2 authentication secret for access and refresh tokens, change this to a unique string. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `HS256`, `HS384` or `HS512`.
|
||||||
- `JWT_SIGNING_PRIVATE_KEY_FILE`: **jwt/private.pem**: Private key file path used to sign OAuth2 tokens. The path is relative to `APP_DATA_PATH`. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `RS256`, `RS384`, `RS512`, `ES256`, `ES384` or `ES512`. The file must contain a RSA or ECDSA private key in the PKCS8 format. If no key exists a 4096 bit key will be created for you.
|
- `JWT_SIGNING_PRIVATE_KEY_FILE`: **jwt/private.pem**: Private key file path used to sign OAuth2 tokens. The path is relative to `APP_DATA_PATH`. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `RS256`, `RS384`, `RS512`, `ES256`, `ES384` or `ES512`. The file must contain a RSA or ECDSA private key in the PKCS8 format. If no key exists a 4096 bit key will be created for you.
|
||||||
- `MAX_TOKEN_LENGTH`: **32767**: Maximum length of token/cookie to accept from OAuth2 provider
|
- `MAX_TOKEN_LENGTH`: **32767**: Maximum length of token/cookie to accept from OAuth2 provider
|
||||||
|
|
||||||
@@ -1121,7 +1119,7 @@ IS_INPUT_FILE = false
|
|||||||
|
|
||||||
- ENABLED: **false** Enable markup support; set to **true** to enable this renderer.
|
- ENABLED: **false** Enable markup support; set to **true** to enable this renderer.
|
||||||
- NEED\_POSTPROCESS: **true** set to **true** to replace links / sha1 and etc.
|
- NEED\_POSTPROCESS: **true** set to **true** to replace links / sha1 and etc.
|
||||||
- FILE\_EXTENSIONS: **\<empty\>** List of file extensions that should be rendered by an external
|
- FILE\_EXTENSIONS: **_empty_** List of file extensions that should be rendered by an external
|
||||||
command. Multiple extensions needs a comma as splitter.
|
command. Multiple extensions needs a comma as splitter.
|
||||||
- RENDER\_COMMAND: External command to render all matching extensions.
|
- RENDER\_COMMAND: External command to render all matching extensions.
|
||||||
- IS\_INPUT\_FILE: **false** Input is not a standard input but a file param followed `RENDER_COMMAND`.
|
- IS\_INPUT\_FILE: **false** Input is not a standard input but a file param followed `RENDER_COMMAND`.
|
||||||
@@ -1180,8 +1178,8 @@ 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. Wildcard is supported: `github.com, *.github.com`.
|
||||||
- `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. Wildcard is supported.
|
||||||
- `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. If a domain is allowed by `ALLOWED_DOMAINS`, this option will be ignored.
|
||||||
- `SKIP_TLS_VERIFY`: **false**: Allow skip tls verify
|
- `SKIP_TLS_VERIFY`: **false**: Allow skip tls verify
|
||||||
|
|
||||||
@@ -1360,8 +1358,8 @@ is `data/repo-archive` and the default of `MINIO_BASE_PATH` is `repo-archive/`.
|
|||||||
## Proxy (`proxy`)
|
## Proxy (`proxy`)
|
||||||
|
|
||||||
- `PROXY_ENABLED`: **false**: Enable the proxy if true, all requests to external via HTTP will be affected, if false, no proxy will be used even environment http_proxy/https_proxy
|
- `PROXY_ENABLED`: **false**: Enable the proxy if true, all requests to external via HTTP will be affected, if false, no proxy will be used even environment http_proxy/https_proxy
|
||||||
- `PROXY_URL`: **\<empty\>**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy
|
- `PROXY_URL`: **_empty_**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy
|
||||||
- `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.
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-26T16:00:00+02:00"
|
date: "2016-12-26T16:00:00+02:00"
|
||||||
title: "配置说明"
|
title: "配置说明"
|
||||||
slug: "config-cheat-sheet"
|
slug: "config-cheat-sheet"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "配置说明"
|
name: "配置说明"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
identifier: "config-cheat-sheet"
|
identifier: "config-cheat-sheet"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -26,8 +26,6 @@ menu:
|
|||||||
|
|
||||||
此文档的内容可能过于陈旧或者错误,请参考英文文档。
|
此文档的内容可能过于陈旧或者错误,请参考英文文档。
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Overall (`DEFAULT`)
|
## Overall (`DEFAULT`)
|
||||||
|
|
||||||
- `APP_NAME`: 应用名称,改成你希望的名字。
|
- `APP_NAME`: 应用名称,改成你希望的名字。
|
||||||
@@ -46,7 +44,7 @@ menu:
|
|||||||
|
|
||||||
### Repository - Release (`repository.release`)
|
### Repository - Release (`repository.release`)
|
||||||
|
|
||||||
- `ALLOWED_TYPES`: **\<empty\>**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。
|
- `ALLOWED_TYPES`: **_empty_**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。
|
||||||
- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。
|
- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。
|
||||||
|
|
||||||
## UI (`ui`)
|
## UI (`ui`)
|
||||||
@@ -187,7 +185,7 @@ menu:
|
|||||||
- `ENABLED`: **true**: 是否启用。
|
- `ENABLED`: **true**: 是否启用。
|
||||||
- `ADAPTER`: **memory**: 缓存引擎,可以为 `memory`, `redis` 或 `memcache`。
|
- `ADAPTER`: **memory**: 缓存引擎,可以为 `memory`, `redis` 或 `memcache`。
|
||||||
- `INTERVAL`: **60**: 只对内存缓存有效,GC间隔,单位秒。
|
- `INTERVAL`: **60**: 只对内存缓存有效,GC间隔,单位秒。
|
||||||
- `HOST`: **\<empty\>**: 针对redis和memcache有效,主机地址和端口。
|
- `HOST`: **_empty_**: 针对redis和memcache有效,主机地址和端口。
|
||||||
- Redis: `network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180`
|
- Redis: `network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180`
|
||||||
- Memache: `127.0.0.1:9090;127.0.0.1:9091`
|
- Memache: `127.0.0.1:9090;127.0.0.1:9091`
|
||||||
- `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 -1 则禁用缓存。
|
- `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 -1 则禁用缓存。
|
||||||
@@ -392,8 +390,8 @@ ALLOW_DATA_URI_IMAGES = true
|
|||||||
|
|
||||||
- `MAX_ATTEMPTS`: **3**: 在迁移过程中的 http/https 请求重试次数。
|
- `MAX_ATTEMPTS`: **3**: 在迁移过程中的 http/https 请求重试次数。
|
||||||
- `RETRY_BACKOFF`: **3**: 等待下一次重试的时间,单位秒。
|
- `RETRY_BACKOFF`: **3**: 等待下一次重试的时间,单位秒。
|
||||||
- `ALLOWED_DOMAINS`: **\<empty\>**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。
|
- `ALLOWED_DOMAINS`: **_empty_**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。
|
||||||
- `BLOCKED_DOMAINS`: **\<empty\>**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。
|
- `BLOCKED_DOMAINS`: **_empty_**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。
|
||||||
- `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918
|
- `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918
|
||||||
- `SKIP_TLS_VERIFY`: **false**: 允许忽略 TLS 认证
|
- `SKIP_TLS_VERIFY`: **false**: 允许忽略 TLS 认证
|
||||||
|
|
||||||
@@ -515,8 +513,8 @@ Repository archive 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配
|
|||||||
## Proxy (`proxy`)
|
## Proxy (`proxy`)
|
||||||
|
|
||||||
- `PROXY_ENABLED`: **false**: 是否启用全局代理。如果为否,则不使用代理,环境变量中的代理也不使用
|
- `PROXY_ENABLED`: **false**: 是否启用全局代理。如果为否,则不使用代理,环境变量中的代理也不使用
|
||||||
- `PROXY_URL`: **\<empty\>**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy
|
- `PROXY_URL`: **_empty_**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy
|
||||||
- `PROXY_HOSTS`: **\<empty\>**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站
|
- `PROXY_HOSTS`: **_empty_**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站
|
||||||
|
|
||||||
i.e.
|
i.e.
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2017-04-15T14:56:00+02:00"
|
date: "2017-04-15T14:56:00+02:00"
|
||||||
title: "Customizing Gitea"
|
title: "Customizing Gitea"
|
||||||
slug: "customizing-gitea"
|
slug: "customizing-gitea"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -12,7 +12,7 @@ menu:
|
|||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Customizing Gitea"
|
name: "Customizing Gitea"
|
||||||
identifier: "customizing-gitea"
|
identifier: "customizing-gitea"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
---
|
---
|
||||||
|
|
||||||
# Customizing Gitea
|
# Customizing Gitea
|
||||||
@@ -48,10 +48,6 @@ is set under the "Configuration" tab on the site administration page.
|
|||||||
|
|
||||||
**Note:** Gitea must perform a full restart to see configuration changes.
|
**Note:** Gitea must perform a full restart to see configuration changes.
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Serving custom public files
|
## Serving custom public files
|
||||||
|
|
||||||
To make Gitea serve custom public files (like pages and images), use the folder
|
To make Gitea serve custom public files (like pages and images), use the folder
|
||||||
@@ -86,7 +82,7 @@ directory at the top of this document).
|
|||||||
Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://golang.org/pkg/html/template/),
|
Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://golang.org/pkg/html/template/),
|
||||||
which can be modified by placing replacements below the `$GITEA_CUSTOM/templates` directory.
|
which can be modified by placing replacements below the `$GITEA_CUSTOM/templates` directory.
|
||||||
|
|
||||||
To obtain any embedded file (including templates), the [`gitea embedded` tool]({{< relref "doc/administration/cmd-embedded.en-us.md" >}}) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using).
|
To obtain any embedded file (including templates), the [`gitea embedded` tool](administration/cmd-embedded.md) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using).
|
||||||
|
|
||||||
Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and
|
Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and
|
||||||
shouldn't be touched without fully understanding these components.
|
shouldn't be touched without fully understanding these components.
|
||||||
@@ -314,7 +310,7 @@ The [legacy file format](https://github.com/go-gitea/gitea/blob/main/options/lab
|
|||||||
|
|
||||||
`#hex-color label name ; label description`
|
`#hex-color label name ; label description`
|
||||||
|
|
||||||
For more information, see the [labels documentation]({{< relref "doc/usage/labels.en-us.md" >}}).
|
For more information, see the [labels documentation](usage/labels.md).
|
||||||
|
|
||||||
### Licenses
|
### Licenses
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2017-04-15T14:56:00+02:00"
|
date: "2017-04-15T14:56:00+02:00"
|
||||||
title: "自定义 Gitea 配置"
|
title: "自定义 Gitea 配置"
|
||||||
slug: "customizing-gitea"
|
slug: "customizing-gitea"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "自定义 Gitea 配置"
|
name: "自定义 Gitea 配置"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
identifier: "customizing-gitea"
|
identifier: "customizing-gitea"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-10-15T10:10:00+05:00"
|
date: "2019-10-15T10:10:00+05:00"
|
||||||
title: "Email setup"
|
title: "Email setup"
|
||||||
slug: "email-setup"
|
slug: "email-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Email setup"
|
name: "Email setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "email-setup"
|
identifier: "email-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Email setup
|
# Email setup
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea has mailer functionality for sending transactional emails (such as registration confirmation). It can be configured to either use Sendmail (or compatible MTAs like Postfix and msmtp) or directly use SMTP server.
|
Gitea has mailer functionality for sending transactional emails (such as registration confirmation). It can be configured to either use Sendmail (or compatible MTAs like Postfix and msmtp) or directly use SMTP server.
|
||||||
|
|
||||||
## Using Sendmail
|
## Using Sendmail
|
||||||
@@ -35,7 +31,7 @@ Note: For Internet-facing sites consult documentation of your MTA for instructio
|
|||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = sendmail
|
PROTOCOL = sendmail
|
||||||
SENDMAIL_PATH = /usr/sbin/sendmail
|
SENDMAIL_PATH = /usr/sbin/sendmail
|
||||||
SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent an email address being interpreted as an option.
|
SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent an email address being interpreted as an option.
|
||||||
```
|
```
|
||||||
@@ -48,10 +44,9 @@ Directly use SMTP server as relay. This option is useful if you don't want to se
|
|||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtps
|
||||||
SMTP_ADDR = mail.mydomain.com
|
SMTP_ADDR = mail.mydomain.com
|
||||||
SMTP_PORT = 587
|
SMTP_PORT = 587
|
||||||
IS_TLS_ENABLED = true
|
|
||||||
USER = gitea@mydomain.com
|
USER = gitea@mydomain.com
|
||||||
PASSWD = `password`
|
PASSWD = `password`
|
||||||
```
|
```
|
||||||
@@ -60,7 +55,7 @@ Restart Gitea for the configuration changes to take effect.
|
|||||||
|
|
||||||
To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration.
|
To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration.
|
||||||
|
|
||||||
For the full list of options check the [Config Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}})
|
For the full list of options check the [Config Cheat Sheet](administration/config-cheat-sheet.md)
|
||||||
|
|
||||||
Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
|
Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
|
||||||
|
|
||||||
@@ -84,7 +79,7 @@ SMTP_PORT = 465
|
|||||||
FROM = example.user@gmail.com
|
FROM = example.user@gmail.com
|
||||||
USER = example.user
|
USER = example.user
|
||||||
PASSWD = `***`
|
PASSWD = `***`
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtp
|
||||||
IS_TLS_ENABLED = true
|
IS_TLS_ENABLED = true
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "Email 设置"
|
title: "Email 设置"
|
||||||
slug: "email-setup"
|
slug: "email-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Email 设置"
|
name: "Email 设置"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "email-setup"
|
identifier: "email-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Email 设置
|
# Email 设置
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮件)。它可以配置为使用 Sendmail(或兼容的 MTA,例如 Postfix 和 msmtp)或直接使用 SMTP 服务器。
|
Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮件)。它可以配置为使用 Sendmail(或兼容的 MTA,例如 Postfix 和 msmtp)或直接使用 SMTP 服务器。
|
||||||
|
|
||||||
## 使用 Sendmail
|
## 使用 Sendmail
|
||||||
@@ -35,7 +31,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮
|
|||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = sendmail
|
PROTOCOL = sendmail
|
||||||
SENDMAIL_PATH = /usr/sbin/sendmail
|
SENDMAIL_PATH = /usr/sbin/sendmail
|
||||||
SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 将防止电子邮件地址被解释为选项。
|
SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 将防止电子邮件地址被解释为选项。
|
||||||
```
|
```
|
||||||
@@ -48,10 +44,9 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--"
|
|||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtps
|
||||||
SMTP_ADDR = mail.mydomain.com
|
SMTP_ADDR = mail.mydomain.com
|
||||||
SMTP_PORT = 587
|
SMTP_PORT = 587
|
||||||
IS_TLS_ENABLED = true
|
|
||||||
USER = gitea@mydomain.com
|
USER = gitea@mydomain.com
|
||||||
PASSWD = `password`
|
PASSWD = `password`
|
||||||
```
|
```
|
||||||
@@ -84,8 +79,7 @@ SMTP_PORT = 465
|
|||||||
FROM = example.user@gmail.com
|
FROM = example.user@gmail.com
|
||||||
USER = example.user
|
USER = example.user
|
||||||
PASSWD = `***`
|
PASSWD = `***`
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtps
|
||||||
IS_TLS_ENABLED = true
|
|
||||||
```
|
```
|
||||||
|
|
||||||
请注意,您需要创建并使用一个 [应用密码](https://support.google.com/accounts/answer/185833?hl=en) 并在您的 Google 帐户上启用 2FA。您将无法直接使用您的 Google 帐户密码。
|
请注意,您需要创建并使用一个 [应用密码](https://support.google.com/accounts/answer/185833?hl=en) 并在您的 Google 帐户上启用 2FA。您将无法直接使用您的 Google 帐户密码。
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2017-04-08T11:34:00+02:00"
|
date: "2017-04-08T11:34:00+02:00"
|
||||||
title: "Environment variables"
|
title: "Environment variables"
|
||||||
slug: "environment-variables"
|
slug: "environment-variables"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Environment variables"
|
name: "Environment variables"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
identifier: "environment-variables"
|
identifier: "environment-variables"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
This is an inventory of Gitea environment variables. They change Gitea behaviour.
|
This is an inventory of Gitea environment variables. They change Gitea behaviour.
|
||||||
|
|
||||||
Initialize them before Gitea command to be effective, for example:
|
Initialize them before Gitea command to be effective, for example:
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2017-04-08T11:34:00+02:00"
|
date: "2017-04-08T11:34:00+02:00"
|
||||||
title: "环境变量清单"
|
title: "环境变量清单"
|
||||||
slug: "environment-variables"
|
slug: "environment-variables"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "环境变量清单"
|
name: "环境变量清单"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
identifier: "environment-variables"
|
identifier: "environment-variables"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-11-23:00:00+02:00"
|
date: "2018-11-23:00:00+02:00"
|
||||||
title: "External renderers"
|
title: "External renderers"
|
||||||
slug: "external-renderers"
|
slug: "external-renderers"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "External renderers"
|
name: "External renderers"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
identifier: "external-renderers"
|
identifier: "external-renderers"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Custom files rendering configuration
|
# Custom files rendering configuration
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea supports custom file renderings (i.e., Jupyter notebooks, asciidoc, etc.) through external binaries,
|
Gitea supports custom file renderings (i.e., Jupyter notebooks, asciidoc, etc.) through external binaries,
|
||||||
it is just a matter of:
|
it is just a matter of:
|
||||||
|
|
||||||
@@ -36,7 +32,7 @@ In order to get file rendering through external binaries, their associated packa
|
|||||||
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
|
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
|
||||||
|
|
||||||
```docker
|
```docker
|
||||||
FROM gitea/gitea:{{< version >}}
|
FROM gitea/gitea:@version@
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
COPY custom/app.ini /data/gitea/conf/app.ini
|
COPY custom/app.ini /data/gitea/conf/app.ini
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "外部渲染器"
|
title: "外部渲染器"
|
||||||
slug: "external-renderers"
|
slug: "external-renderers"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,23 +11,19 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "外部渲染器"
|
name: "外部渲染器"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
identifier: "external-renderers"
|
identifier: "external-renderers"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 自定义文件渲染配置
|
# 自定义文件渲染配置
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter notebooks、asciidoc 等),只需要进行以下步骤:
|
Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter notebooks、asciidoc 等),只需要进行以下步骤:
|
||||||
|
|
||||||
- 安装外部二进制文件
|
- 安装外部二进制文件
|
||||||
- 在您的 `app.ini` 文件中添加一些配置
|
- 在您的 `app.ini` 文件中添加一些配置
|
||||||
- 重新启动 Gitea 实例
|
- 重新启动 Gitea 实例
|
||||||
|
|
||||||
此功能支持整个文件的渲染。如果您想要在 Markdown 中渲染代码块,您需要使用 JavaScript 进行一些操作。请参阅 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}}) 页面上的一些示例。
|
此功能支持整个文件的渲染。如果您想要在 Markdown 中渲染代码块,您需要使用 JavaScript 进行一些操作。请参阅 [自定义 Gitea 配置](administration/customizing-gitea.md) 页面上的一些示例。
|
||||||
|
|
||||||
## 安装外部二进制文件
|
## 安装外部二进制文件
|
||||||
|
|
||||||
@@ -35,7 +31,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no
|
|||||||
如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容:
|
如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容:
|
||||||
|
|
||||||
```docker
|
```docker
|
||||||
FROM gitea/gitea:{{< version >}}
|
FROM gitea/gitea:@version@
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
COPY custom/app.ini /data/gitea/conf/app.ini
|
COPY custom/app.ini /data/gitea/conf/app.ini
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-05-11T11:00:00+02:00"
|
date: "2018-05-11T11:00:00+02:00"
|
||||||
title: "Fail2ban Setup "
|
title: "Fail2ban Setup "
|
||||||
slug: "fail2ban-setup"
|
slug: "fail2ban-setup"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Fail2ban setup"
|
name: "Fail2ban setup"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
identifier: "fail2ban-setup"
|
identifier: "fail2ban-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2022-08-01T00:00:00+00:00"
|
date: "2022-08-01T00:00:00+00:00"
|
||||||
title: "设置 Fail2ban"
|
title: "设置 Fail2ban"
|
||||||
slug: "fail2ban-setup"
|
slug: "fail2ban-setup"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "设置 Fail2ban"
|
name: "设置 Fail2ban"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
identifier: "fail2ban-setup"
|
identifier: "fail2ban-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-10-06T08:00:00+05:00"
|
date: "2019-10-06T08:00:00+05:00"
|
||||||
title: "Git LFS setup"
|
title: "Git LFS setup"
|
||||||
slug: "git-lfs-setup"
|
slug: "git-lfs-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Git LFS setup"
|
name: "Git LFS setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "git-lfs-setup"
|
identifier: "git-lfs-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "Git LFS 设置"
|
title: "Git LFS 设置"
|
||||||
slug: "git-lfs-setup"
|
slug: "git-lfs-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Git LFS 设置"
|
name: "Git LFS 设置"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "git-lfs-setup"
|
identifier: "git-lfs-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-06-02T11:00:00+02:00"
|
date: "2018-06-02T11:00:00+02:00"
|
||||||
title: "HTTPS setup"
|
title: "HTTPS setup"
|
||||||
slug: "https-setup"
|
slug: "https-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,22 +11,18 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "HTTPS setup"
|
name: "HTTPS setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "https-setup"
|
identifier: "https-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
# HTTPS setup to encrypt connections to Gitea
|
# HTTPS setup to encrypt connections to Gitea
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Using the built-in server
|
## Using the built-in server
|
||||||
|
|
||||||
Before you enable HTTPS, make sure that you have valid SSL/TLS certificates.
|
Before you enable HTTPS, make sure that you have valid SSL/TLS certificates.
|
||||||
You could use self-generated certificates for evaluation and testing. Please run `gitea cert --host [HOST]` to generate a self signed certificate.
|
You could use self-generated certificates for evaluation and testing. Please run `gitea cert --host [HOST]` to generate a self signed certificate.
|
||||||
|
|
||||||
If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}).
|
If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide](administration/reverse-proxies.md).
|
||||||
|
|
||||||
To use Gitea's built-in HTTPS support, you must change your `app.ini` file:
|
To use Gitea's built-in HTTPS support, you must change your `app.ini` file:
|
||||||
|
|
||||||
@@ -2,29 +2,25 @@
|
|||||||
date: "2023-04-09T11:00:00+02:00"
|
date: "2023-04-09T11:00:00+02:00"
|
||||||
title: "HTTPS配置"
|
title: "HTTPS配置"
|
||||||
slug: "https-setup"
|
slug: "https-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "HTTPS setup"
|
name: "HTTPS setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "https-setup"
|
identifier: "https-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
# HTTPS setup to encrypt connections to Gitea
|
# HTTPS setup to encrypt connections to Gitea
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 使用内置服务器
|
## 使用内置服务器
|
||||||
|
|
||||||
在启用HTTPS之前,确保您拥有有效的SSL/TLS证书。
|
在启用HTTPS之前,确保您拥有有效的SSL/TLS证书。
|
||||||
建议在测试和评估情况下使用自签名证书,请运行 `gitea cert --host [HOST]` 以生成自签名证书
|
建议在测试和评估情况下使用自签名证书,请运行 `gitea cert --host [HOST]` 以生成自签名证书
|
||||||
|
|
||||||
如果您在服务器上使用阿帕奇(Apache)或Nginx,建议参考 [反向代理指南]({{< relref "doc/administration/reverse-proxies.zh-cn.md" >}})。
|
如果您在服务器上使用阿帕奇(Apache)或Nginx,建议参考 [反向代理指南](administration/reverse-proxies.md)。
|
||||||
|
|
||||||
要使用Gitea内置HTTPS支持,您必须编辑`app.ini`文件。
|
要使用Gitea内置HTTPS支持,您必须编辑`app.ini`文件。
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-02T17:06:00+01:00"
|
date: "2019-04-02T17:06:00+01:00"
|
||||||
title: "Logging Configuration"
|
title: "Logging Configuration"
|
||||||
slug: "logging-config"
|
slug: "logging-config"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Logging Configuration"
|
name: "Logging Configuration"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "logging-config"
|
identifier: "logging-config"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -25,13 +25,9 @@ The logging configuration of Gitea mainly consists of 3 types of components:
|
|||||||
|
|
||||||
There is a fully functional log output by default, so it is not necessary to define one.
|
There is a fully functional log output by default, so it is not necessary to define one.
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Collecting Logs for Help
|
## Collecting Logs for Help
|
||||||
|
|
||||||
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}).
|
To collect logs for help and issue report, see [Support Options](help/support.md).
|
||||||
|
|
||||||
## The `[log]` section
|
## The `[log]` section
|
||||||
|
|
||||||
@@ -47,7 +43,7 @@ In the top level `[log]` section the following configurations can be placed:
|
|||||||
And it can contain the following sub-loggers:
|
And it can contain the following sub-loggers:
|
||||||
|
|
||||||
- `logger.router.MODE`: (Default: **,**): List of log outputs to use for the Router logger.
|
- `logger.router.MODE`: (Default: **,**): List of log outputs to use for the Router logger.
|
||||||
- `logger.access.MODE`: (Default: **\<empty\>**) List of log outputs to use for the Access logger. By default, the access logger is disabled.
|
- `logger.access.MODE`: (Default: **_empty_**) List of log outputs to use for the Access logger. By default, the access logger is disabled.
|
||||||
- `logger.xorm.MODE`: (Default: **,**) List of log outputs to use for the XORM logger.
|
- `logger.xorm.MODE`: (Default: **,**) List of log outputs to use for the XORM logger.
|
||||||
|
|
||||||
Setting a comma (`,`) to sub-logger's mode means making it use the default global `MODE`.
|
Setting a comma (`,`) to sub-logger's mode means making it use the default global `MODE`.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "日志配置"
|
title: "日志配置"
|
||||||
slug: "logging-config"
|
slug: "logging-config"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "日志配置"
|
name: "日志配置"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "logging-config"
|
identifier: "logging-config"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -25,13 +25,9 @@ Gitea 的日志配置主要由以下三种类型的组件组成:
|
|||||||
|
|
||||||
默认情况下,已经有一个完全功能的日志输出,因此不需要重新定义。
|
默认情况下,已经有一个完全功能的日志输出,因此不需要重新定义。
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 收集日志以获取帮助
|
## 收集日志以获取帮助
|
||||||
|
|
||||||
要收集日志以获取帮助和报告问题,请参阅 [需要帮助]({{< relref "doc/help/support.zh-cn.md" >}})。
|
要收集日志以获取帮助和报告问题,请参阅 [需要帮助](help/support.md)。
|
||||||
|
|
||||||
## `[log]` 部分
|
## `[log]` 部分
|
||||||
|
|
||||||
@@ -47,7 +43,7 @@ Gitea 的日志配置主要由以下三种类型的组件组成:
|
|||||||
它还可以包含以下子日志记录器:
|
它还可以包含以下子日志记录器:
|
||||||
|
|
||||||
- `logger.router.MODE`:(默认值:**,**):用于路由器日志记录器的日志输出列表。
|
- `logger.router.MODE`:(默认值:**,**):用于路由器日志记录器的日志输出列表。
|
||||||
- `logger.access.MODE`:(默认值:**\<empty\>**):用于访问日志记录器的日志输出列表。默认情况下,访问日志记录器被禁用。
|
- `logger.access.MODE`:(默认值:**_empty_**):用于访问日志记录器的日志输出列表。默认情况下,访问日志记录器被禁用。
|
||||||
- `logger.xorm.MODE`:(默认值:**,**):用于 XORM 日志记录器的日志输出列表。
|
- `logger.xorm.MODE`:(默认值:**,**):用于 XORM 日志记录器的日志输出列表。
|
||||||
|
|
||||||
将子日志记录器的模式设置为逗号(`,`)表示使用默认的全局 `MODE`。
|
将子日志记录器的模式设置为逗号(`,`)表示使用默认的全局 `MODE`。
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-10-23T17:00:00-03:00"
|
date: "2019-10-23T17:00:00-03:00"
|
||||||
title: "Mail templates"
|
title: "Mail templates"
|
||||||
slug: "mail-templates"
|
slug: "mail-templates"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Mail templates"
|
name: "Mail templates"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
identifier: "mail-templates"
|
identifier: "mail-templates"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Mail templates
|
# Mail templates
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
To craft the e-mail subject and contents for certain operations, Gitea can be customized by using templates. The templates
|
To craft the e-mail subject and contents for certain operations, Gitea can be customized by using templates. The templates
|
||||||
for these functions are located under the [`custom` directory](https://docs.gitea.io/en-us/customizing-gitea/).
|
for these functions are located under the [`custom` directory](https://docs.gitea.io/en-us/customizing-gitea/).
|
||||||
Gitea has an internal template that serves as default in case there's no custom alternative.
|
Gitea has an internal template that serves as default in case there's no custom alternative.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "邮件模板"
|
title: "邮件模板"
|
||||||
slug: "mail-templates"
|
slug: "mail-templates"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "邮件模板"
|
name: "邮件模板"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
identifier: "mail-templates"
|
identifier: "mail-templates"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 邮件模板
|
# 邮件模板
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
为了定制特定操作的电子邮件主题和内容,可以使用模板来自定义 Gitea。这些功能的模板位于 [`custom` 目录](https://docs.gitea.io/en-us/customizing-gitea/) 下。
|
为了定制特定操作的电子邮件主题和内容,可以使用模板来自定义 Gitea。这些功能的模板位于 [`custom` 目录](https://docs.gitea.io/en-us/customizing-gitea/) 下。
|
||||||
如果没有自定义的替代方案,Gitea 将使用内部模板作为默认模板。
|
如果没有自定义的替代方案,Gitea 将使用内部模板作为默认模板。
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-09-06T01:35:00-03:00"
|
date: "2019-09-06T01:35:00-03:00"
|
||||||
title: "Repository indexer"
|
title: "Repository indexer"
|
||||||
slug: "repo-indexer"
|
slug: "repo-indexer"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Repository indexer"
|
name: "Repository indexer"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
identifier: "repo-indexer"
|
identifier: "repo-indexer"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Repository indexer
|
# Repository indexer
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Setting up the repository indexer
|
## Setting up the repository indexer
|
||||||
|
|
||||||
Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/):
|
Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/):
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "仓库索引器"
|
title: "仓库索引器"
|
||||||
slug: "repo-indexer"
|
slug: "repo-indexer"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "仓库索引器"
|
name: "仓库索引器"
|
||||||
weight: 45
|
sidebar_position: 45
|
||||||
identifier: "repo-indexer"
|
identifier: "repo-indexer"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 仓库索引器
|
# 仓库索引器
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 设置仓库索引器
|
## 设置仓库索引器
|
||||||
|
|
||||||
通过在您的 [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/) 中启用此功能,Gitea 可以通过仓库的文件进行搜索:
|
通过在您的 [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/) 中启用此功能,Gitea 可以通过仓库的文件进行搜索:
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-05-22T11:00:00+00:00"
|
date: "2018-05-22T11:00:00+00:00"
|
||||||
title: "Reverse Proxies"
|
title: "Reverse Proxies"
|
||||||
slug: "reverse-proxies"
|
slug: "reverse-proxies"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Reverse Proxies"
|
name: "Reverse Proxies"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
identifier: "reverse-proxies"
|
identifier: "reverse-proxies"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Reverse Proxies
|
# Reverse Proxies
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Nginx
|
## Nginx
|
||||||
|
|
||||||
If you want Nginx to serve your Gitea instance, add the following `server` section to the `http` section of `nginx.conf`:
|
If you want Nginx to serve your Gitea instance, add the following `server` section to the `http` section of `nginx.conf`:
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-05-22T11:00:00+00:00"
|
date: "2018-05-22T11:00:00+00:00"
|
||||||
title: "反向代理"
|
title: "反向代理"
|
||||||
slug: "reverse-proxies"
|
slug: "reverse-proxies"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "反向代理"
|
name: "反向代理"
|
||||||
weight: 16
|
sidebar_position: 16
|
||||||
identifier: "reverse-proxies"
|
identifier: "reverse-proxies"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 反向代理
|
# 反向代理
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 使用 Nginx 作为反向代理服务
|
## 使用 Nginx 作为反向代理服务
|
||||||
|
|
||||||
如果您想使用 Nginx 作为 Gitea 的反向代理服务,您可以参照以下 `nginx.conf` 配置中 `server` 的 `http` 部分:
|
如果您想使用 Nginx 作为 Gitea 的反向代理服务,您可以参照以下 `nginx.conf` 配置中 `server` 的 `http` 部分:
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-12-31T13:55:00+05:00"
|
date: "2019-12-31T13:55:00+05:00"
|
||||||
title: "Search Engines Indexation"
|
title: "Search Engines Indexation"
|
||||||
slug: "search-engines-indexation"
|
slug: "search-engines-indexation"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Search Engines Indexation"
|
name: "Search Engines Indexation"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
identifier: "search-engines-indexation"
|
identifier: "search-engines-indexation"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ If you don't want your repository to be visible for search engines read further.
|
|||||||
## Block search engines indexation using robots.txt
|
## Block search engines indexation using robots.txt
|
||||||
|
|
||||||
To make Gitea serve a custom `robots.txt` (default: empty 404) for top level installations,
|
To make Gitea serve a custom `robots.txt` (default: empty 404) for top level installations,
|
||||||
create a file called `robots.txt` in the [`custom` folder or `CustomPath`]({{< relref "doc/administration/customizing-gitea.en-us.md" >}})
|
create a file called `robots.txt` in the [`custom` folder or `CustomPath`](administration/customizing-gitea.md)
|
||||||
|
|
||||||
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).
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "搜索引擎索引"
|
title: "搜索引擎索引"
|
||||||
slug: "search-engines-indexation"
|
slug: "search-engines-indexation"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "搜索引擎索引"
|
name: "搜索引擎索引"
|
||||||
weight: 60
|
sidebar_position: 60
|
||||||
identifier: "search-engines-indexation"
|
identifier: "search-engines-indexation"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ menu:
|
|||||||
|
|
||||||
## 使用 robots.txt 阻止搜索引擎索引
|
## 使用 robots.txt 阻止搜索引擎索引
|
||||||
|
|
||||||
为了使 Gitea 为顶级安装提供自定义的`robots.txt`(默认为空的 404),请在[`custom`文件夹或`CustomPath`]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})中创建一个名为 `robots.txt` 的文件。
|
为了使 Gitea 为顶级安装提供自定义的`robots.txt`(默认为空的 404),请在[`custom`文件夹或`CustomPath`](administration/customizing-gitea.md)中创建一个名为 `robots.txt` 的文件。
|
||||||
|
|
||||||
有关如何配置 `robots.txt` 的示例,请参考 [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt)。
|
有关如何配置 `robots.txt` 的示例,请参考 [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt)。
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-08-17T10:20:00+01:00"
|
date: "2019-08-17T10:20:00+01:00"
|
||||||
title: "GPG Commit Signatures"
|
title: "GPG Commit Signatures"
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
weight: 50
|
sidebar_position: 50
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "GPG Commit Signatures"
|
name: "GPG Commit Signatures"
|
||||||
weight: 50
|
sidebar_position: 50
|
||||||
identifier: "signing"
|
identifier: "signing"
|
||||||
---
|
---
|
||||||
|
|
||||||
# GPG Commit Signatures
|
# GPG Commit Signatures
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea will verify GPG commit signatures in the provided tree by
|
Gitea will verify GPG commit signatures in the provided tree by
|
||||||
checking if the commits are signed by a key within the Gitea database,
|
checking if the commits are signed by a key within the Gitea database,
|
||||||
or if the commit matches the default key for Git.
|
or if the commit matches the default key for Git.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "GPG 提交签名"
|
title: "GPG 提交签名"
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
weight: 50
|
sidebar_position: 50
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "GPG 提交签名"
|
name: "GPG 提交签名"
|
||||||
weight: 50
|
sidebar_position: 50
|
||||||
identifier: "signing"
|
identifier: "signing"
|
||||||
---
|
---
|
||||||
|
|
||||||
# GPG 提交签名
|
# GPG 提交签名
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 将通过检查提交是否由 Gitea 数据库中的密钥签名,或者提交是否与 Git 的默认密钥匹配,来验证提供的树中的 GPG 提交签名。
|
Gitea 将通过检查提交是否由 Gitea 数据库中的密钥签名,或者提交是否与 Git 的默认密钥匹配,来验证提供的树中的 GPG 提交签名。
|
||||||
|
|
||||||
密钥不会被检查以确定它们是否已过期或撤销。密钥也不会与密钥服务器进行检查。
|
密钥不会被检查以确定它们是否已过期或撤销。密钥也不会与密钥服务器进行检查。
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2021-01-22T00:00:00+02:00"
|
date: "2021-01-22T00:00:00+02:00"
|
||||||
title: "Contributing"
|
title: "Contributing"
|
||||||
slug: "contributing"
|
slug: "contributing"
|
||||||
weight: 35
|
sidebar_position: 35
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Contributing"
|
name: "Contributing"
|
||||||
weight: 50
|
sidebar_position: 50
|
||||||
identifier: "contributing"
|
identifier: "contributing"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2021-01-22T00:00:00+02:00"
|
date: "2021-01-22T00:00:00+02:00"
|
||||||
title: "Übersetzung"
|
title: "Übersetzung"
|
||||||
slug: "contributing"
|
slug: "contributing"
|
||||||
weight: 35
|
sidebar_position: 35
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Übersetzung"
|
name: "Übersetzung"
|
||||||
weight: 50
|
sidebar_position: 50
|
||||||
identifier: "contributing"
|
identifier: "contributing"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2021-01-22T00:00:00+02:00"
|
date: "2021-01-22T00:00:00+02:00"
|
||||||
title: "貢獻"
|
title: "貢獻"
|
||||||
slug: "contributing"
|
slug: "contributing"
|
||||||
weight: 35
|
sidebar_position: 35
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "貢獻"
|
name: "貢獻"
|
||||||
weight: 50
|
sidebar_position: 50
|
||||||
identifier: "contributing"
|
identifier: "contributing"
|
||||||
---
|
---
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2021-11-01T23:41:00+08:00"
|
date: "2021-11-01T23:41:00+08:00"
|
||||||
title: "Guidelines for Backend Development"
|
title: "Guidelines for Backend Development"
|
||||||
slug: "guidelines-backend"
|
slug: "guidelines-backend"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "Guidelines for Backend"
|
name: "Guidelines for Backend"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "guidelines-backend"
|
identifier: "guidelines-backend"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Guidelines for Backend Development
|
# Guidelines for Backend Development
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Background
|
## Background
|
||||||
|
|
||||||
Gitea uses Golang as the backend programming language. It uses many third-party packages and also write some itself.
|
Gitea uses Golang as the backend programming language. It uses many third-party packages and also write some itself.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-25T23:41:00+08:00"
|
date: "2023-05-25T23:41:00+08:00"
|
||||||
title: "后端开发指南"
|
title: "后端开发指南"
|
||||||
slug: "guidelines-backend"
|
slug: "guidelines-backend"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "后端开发指南"
|
name: "后端开发指南"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "guidelines-backend"
|
identifier: "guidelines-backend"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 后端开发指南
|
# 后端开发指南
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 背景
|
## 背景
|
||||||
|
|
||||||
Gitea使用Golang作为后端编程语言。它使用了许多第三方包,并且自己也编写了一些包。
|
Gitea使用Golang作为后端编程语言。它使用了许多第三方包,并且自己也编写了一些包。
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2021-10-13T16:00:00+02:00"
|
date: "2021-10-13T16:00:00+02:00"
|
||||||
title: "Guidelines for Frontend Development"
|
title: "Guidelines for Frontend Development"
|
||||||
slug: "guidelines-frontend"
|
slug: "guidelines-frontend"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "Guidelines for Frontend"
|
name: "Guidelines for Frontend"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
identifier: "guidelines-frontend"
|
identifier: "guidelines-frontend"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Guidelines for Frontend Development
|
# Guidelines for Frontend Development
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Background
|
## Background
|
||||||
|
|
||||||
Gitea uses [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 [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.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-25T16:00:00+02:00"
|
date: "2023-05-25T16:00:00+02:00"
|
||||||
title: "前端开发指南"
|
title: "前端开发指南"
|
||||||
slug: "guidelines-frontend"
|
slug: "guidelines-frontend"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "前端开发指南"
|
name: "前端开发指南"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "guidelines-frontend"
|
identifier: "guidelines-frontend"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 前端开发指南
|
# 前端开发指南
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 背景
|
## 背景
|
||||||
|
|
||||||
Gitea 在其前端中使用[Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html)(基于[jQuery](https://api.jquery.com))和 [Vue3](https://vuejs.org/)。
|
Gitea 在其前端中使用[Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html)(基于[jQuery](https://api.jquery.com))和 [Vue3](https://vuejs.org/)。
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-02-14T00:00:00+00:00"
|
date: "2023-02-14T00:00:00+00:00"
|
||||||
title: "Guidelines for Refactoring"
|
title: "Guidelines for Refactoring"
|
||||||
slug: "guidelines-refactoring"
|
slug: "guidelines-refactoring"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "Guidelines for Refactoring"
|
name: "Guidelines for Refactoring"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "guidelines-refactoring"
|
identifier: "guidelines-refactoring"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Guidelines for Refactoring
|
# Guidelines for Refactoring
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Background
|
## Background
|
||||||
|
|
||||||
Since the first line of code was written at Feb 12, 2014, Gitea has grown to be a large project.
|
Since the first line of code was written at Feb 12, 2014, Gitea has grown to be a large project.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-25T00:00:00+00:00"
|
date: "2023-05-25T00:00:00+00:00"
|
||||||
title: "重构指南"
|
title: "重构指南"
|
||||||
slug: "guidelines-refactoring"
|
slug: "guidelines-refactoring"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "重构指南"
|
name: "重构指南"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "guidelines-refactoring"
|
identifier: "guidelines-refactoring"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 重构指南
|
# 重构指南
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 背景
|
## 背景
|
||||||
|
|
||||||
自2014年2月12日编写了第一行代码以来,Gitea已经发展成为一个庞大的项目。
|
自2014年2月12日编写了第一行代码以来,Gitea已经发展成为一个庞大的项目。
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
date: "2021-01-22T00:00:00+02:00"
|
date: "2021-01-22T00:00:00+02:00"
|
||||||
title: "Übersetzungs Richtlinien"
|
title: "Übersetzungs Richtlinien"
|
||||||
slug: "localization"
|
slug: "localization"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "Übersetzungsrichtlinien"
|
name: "Übersetzungsrichtlinien"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
identifier: "localization"
|
identifier: "localization"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "Localization"
|
title: "Localization"
|
||||||
slug: "localization"
|
slug: "localization"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "Localization"
|
name: "Localization"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
identifier: "localization"
|
identifier: "localization"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "本地化"
|
title: "本地化"
|
||||||
slug: "localization"
|
slug: "localization"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "本地化"
|
name: "本地化"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
identifier: "localization"
|
identifier: "localization"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "在地化"
|
title: "在地化"
|
||||||
slug: "localization"
|
slug: "localization"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "在地化"
|
name: "在地化"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
identifier: "localization"
|
identifier: "localization"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
date: "2023-05-25T00:00:00+02:00"
|
date: "2023-05-25T00:00:00+02:00"
|
||||||
title: "翻译指南"
|
title: "翻译指南"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
toc: true
|
toc: true
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
parent: "contributing"
|
parent: "contributing"
|
||||||
name: "翻译指南"
|
name: "翻译指南"
|
||||||
weight: 70
|
sidebar_position: 70
|
||||||
identifier: "translation-guidelines"
|
identifier: "translation-guidelines"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "Development"
|
title: "Development"
|
||||||
slug: "development"
|
slug: "development"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Development"
|
name: "Development"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "development"
|
identifier: "development"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "开发"
|
title: "开发"
|
||||||
slug: "development"
|
slug: "development"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "开发"
|
name: "开发"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "development"
|
identifier: "development"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "開發"
|
title: "開發"
|
||||||
slug: "development"
|
slug: "development"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "開發"
|
name: "開發"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "development"
|
identifier: "development"
|
||||||
---
|
---
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-06-24:00:00+02:00"
|
date: "2018-06-24:00:00+02:00"
|
||||||
title: "API Usage"
|
title: "API Usage"
|
||||||
slug: "api-usage"
|
slug: "api-usage"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "API Usage"
|
name: "API Usage"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "api-usage"
|
identifier: "api-usage"
|
||||||
---
|
---
|
||||||
|
|
||||||
# API Usage
|
# API Usage
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Enabling/configuring API access
|
## Enabling/configuring API access
|
||||||
|
|
||||||
By default, `ENABLE_SWAGGER` is true, and
|
By default, `ENABLE_SWAGGER` is true, and
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2018-06-24:00:00+02:00"
|
date: "2018-06-24:00:00+02:00"
|
||||||
title: "API 使用指南"
|
title: "API 使用指南"
|
||||||
slug: "api-usage"
|
slug: "api-usage"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "API 使用指南"
|
name: "API 使用指南"
|
||||||
weight: 40
|
sidebar_position: 40
|
||||||
identifier: "api-usage"
|
identifier: "api-usage"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "Hacking on Gitea"
|
title: "Hacking on Gitea"
|
||||||
slug: "hacking-on-gitea"
|
slug: "hacking-on-gitea"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "Hacking on Gitea"
|
name: "Hacking on Gitea"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
identifier: "hacking-on-gitea"
|
identifier: "hacking-on-gitea"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Hacking on Gitea
|
# Hacking on Gitea
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
To get a quick working development environment you could use Gitpod.
|
To get a quick working development environment you could use Gitpod.
|
||||||
@@ -34,7 +30,7 @@ environment correctly.
|
|||||||
|
|
||||||
Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
|
Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
|
||||||
required to build the JavaScript and CSS files. The minimum supported Node.js
|
required to build the JavaScript and CSS files. The minimum supported Node.js
|
||||||
version is {{< min-node-version >}} and the latest LTS version is recommended.
|
version is @minNodeVersion@ and the latest LTS version is recommended.
|
||||||
|
|
||||||
**Note**: When executing make tasks that require external tools, like
|
**Note**: When executing make tasks that require external tools, like
|
||||||
`make watch-backend`, Gitea will automatically download and build these as
|
`make watch-backend`, Gitea will automatically download and build these as
|
||||||
@@ -42,11 +38,11 @@ necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
|
|||||||
on the executable path. If you don't add the go bin directory to the
|
on the executable path. If you don't add the go bin directory to the
|
||||||
executable path you will have to manage this yourself.
|
executable path you will have to manage this yourself.
|
||||||
|
|
||||||
**Note 2**: Go version {{< min-go-version >}} or higher is required.
|
**Note 2**: Go version @minGoVersion@ or higher is required.
|
||||||
Gitea uses `gofmt` to format source code. However, the results of
|
Gitea uses `gofmt` to format source code. However, the results of
|
||||||
`gofmt` can differ by the version of `go`. Therefore it is
|
`gofmt` can differ by the version of `go`. Therefore it is
|
||||||
recommended to install the version of Go that our continuous integration is
|
recommended to install the version of Go that our continuous integration is
|
||||||
running. As of last update, the Go version should be {{< go-version >}}.
|
running. As of last update, the Go version should be @goVersion@.
|
||||||
|
|
||||||
## Installing Make
|
## Installing Make
|
||||||
|
|
||||||
@@ -123,8 +119,8 @@ to the Gitea sources. Otherwise, changes can't be pushed.
|
|||||||
## Building Gitea (Basic)
|
## Building Gitea (Basic)
|
||||||
|
|
||||||
Take a look at our
|
Take a look at our
|
||||||
[instructions]({{< relref "doc/installation/from-source.en-us.md" >}})
|
[instructions](installation/from-source.md)
|
||||||
for [building from source]({{< relref "doc/installation/from-source.en-us.md" >}}).
|
for [building from source](installation/from-source.md).
|
||||||
|
|
||||||
The simplest recommended way to build from source is:
|
The simplest recommended way to build from source is:
|
||||||
|
|
||||||
@@ -178,7 +174,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/contributing/guidelines-frontend.en-us.md" >}})
|
Frontend development should follow [Guidelines for Frontend Development](contributing/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:
|
||||||
|
|
||||||
@@ -265,7 +261,7 @@ OpenAPI 3 documentation.
|
|||||||
When creating new configuration options, it is not enough to add them to the
|
When creating new configuration options, it is not enough to add them to the
|
||||||
`modules/setting` files. You should add information to `custom/conf/app.ini`
|
`modules/setting` files. You should add information to `custom/conf/app.ini`
|
||||||
and to the
|
and to the
|
||||||
[configuration cheat sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}})
|
[configuration cheat sheet](administration/config-cheat-sheet.md)
|
||||||
found in `docs/content/doc/administer/config-cheat-sheet.en-us.md`
|
found in `docs/content/doc/administer/config-cheat-sheet.en-us.md`
|
||||||
|
|
||||||
### Changing the logo
|
### Changing the logo
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "玩转 Gitea"
|
title: "玩转 Gitea"
|
||||||
slug: "hacking-on-gitea"
|
slug: "hacking-on-gitea"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "玩转 Gitea"
|
name: "玩转 Gitea"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
identifier: "hacking-on-gitea"
|
identifier: "hacking-on-gitea"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Hacking on Gitea
|
# Hacking on Gitea
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 快速入门
|
## 快速入门
|
||||||
|
|
||||||
要获得快速工作的开发环境,您可以使用 Gitpod。
|
要获得快速工作的开发环境,您可以使用 Gitpod。
|
||||||
@@ -32,7 +28,7 @@ menu:
|
|||||||
您需要 [安装 go]( https://golang.org/doc/install ) 并设置您的 go 环境。
|
您需要 [安装 go]( https://golang.org/doc/install ) 并设置您的 go 环境。
|
||||||
|
|
||||||
接下来,[使用 npm 安装 Node.js](https://nodejs.org/en/download/) ,这是构建
|
接下来,[使用 npm 安装 Node.js](https://nodejs.org/en/download/) ,这是构建
|
||||||
JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 {{< min-node-version >}}
|
JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 @minNodeVersion@
|
||||||
并且推荐使用最新的 LTS 版本。
|
并且推荐使用最新的 LTS 版本。
|
||||||
|
|
||||||
**注意** :当执行需要外部工具的 make 任务时,比如
|
**注意** :当执行需要外部工具的 make 任务时,比如
|
||||||
@@ -40,9 +36,9 @@ JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 {{<
|
|||||||
将 `"$GOPATH"/bin` 目录加入到可执行路径上。如果你不把go bin目录添加到可执行路径你必须手动
|
将 `"$GOPATH"/bin` 目录加入到可执行路径上。如果你不把go bin目录添加到可执行路径你必须手动
|
||||||
指定可执行程序路径。
|
指定可执行程序路径。
|
||||||
|
|
||||||
**注意2** :Go版本 {{< min-go-version >}} 或更高版本是必须的。Gitea 使用 `gofmt` 来
|
**注意2** :Go版本 @minGoVersion@ 或更高版本是必须的。Gitea 使用 `gofmt` 来
|
||||||
格式化源代码。然而,`gofmt` 的结果可能因 `go` 的版本而有差异。因此推荐安装我们持续集成使用
|
格式化源代码。然而,`gofmt` 的结果可能因 `go` 的版本而有差异。因此推荐安装我们持续集成使用
|
||||||
的 Go版本。截至上次更新,Go 版本应该是 {{< go-version >}}。
|
的 Go版本。截至上次更新,Go 版本应该是 @goVersion@。
|
||||||
|
|
||||||
## 安装 Make
|
## 安装 Make
|
||||||
|
|
||||||
@@ -115,8 +111,8 @@ git fetch --all --prune
|
|||||||
## 构建 Gitea(基本)
|
## 构建 Gitea(基本)
|
||||||
|
|
||||||
看看我们的
|
看看我们的
|
||||||
[说明]({{< relref "doc/installation/from-source.zh-cn.md" >}})
|
[说明](installation/from-source.md)
|
||||||
关于如何[从源代码构建]({{< relref "doc/installation/from-source.zh-cn.md" >}}) 。
|
关于如何[从源代码构建](installation/from-source.md) 。
|
||||||
|
|
||||||
从源代码构建的最简单推荐方法是:
|
从源代码构建的最简单推荐方法是:
|
||||||
|
|
||||||
@@ -168,7 +164,7 @@ make lint-backend
|
|||||||
|
|
||||||
### 处理 JS 和 CSS
|
### 处理 JS 和 CSS
|
||||||
|
|
||||||
前端开发应遵循 [Guidelines for Frontend Development]({{< relref "doc/contributing/guidelines-frontend.zh-cn.md" >}})。
|
前端开发应遵循 [Guidelines for Frontend Development](contributing/guidelines-frontend.md)。
|
||||||
|
|
||||||
要使用前端资源构建,请使用上面提到的“watch-frontend”目标或只构建一次:
|
要使用前端资源构建,请使用上面提到的“watch-frontend”目标或只构建一次:
|
||||||
|
|
||||||
@@ -249,7 +245,7 @@ make swagger-check
|
|||||||
### 创建新的配置选项
|
### 创建新的配置选项
|
||||||
|
|
||||||
创建新的配置选项时,将它们添加到 `modules/setting` 的对应文件。您应该将信息添加到 `custom/conf/app.ini`
|
创建新的配置选项时,将它们添加到 `modules/setting` 的对应文件。您应该将信息添加到 `custom/conf/app.ini`
|
||||||
并到[配置备忘单]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md" >}})
|
并到[配置备忘单](administration/config-cheat-sheet.md)
|
||||||
在 `docs/content/doc/advanced/config-cheat-sheet.zh-cn.md` 中找到
|
在 `docs/content/doc/advanced/config-cheat-sheet.zh-cn.md` 中找到
|
||||||
|
|
||||||
### 更改Logo
|
### 更改Logo
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-15T17:29:00+08:00"
|
date: "2019-04-15T17:29:00+08:00"
|
||||||
title: "Integrations"
|
title: "Integrations"
|
||||||
slug: "integrations"
|
slug: "integrations"
|
||||||
weight: 65
|
sidebar_position: 65
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "Integrations"
|
name: "Integrations"
|
||||||
weight: 65
|
sidebar_position: 65
|
||||||
identifier: "integrations"
|
identifier: "integrations"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-25T17:29:00+08:00"
|
date: "2023-05-25T17:29:00+08:00"
|
||||||
title: "集成"
|
title: "集成"
|
||||||
slug: "integrations"
|
slug: "integrations"
|
||||||
weight: 65
|
sidebar_position: 65
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "集成"
|
name: "集成"
|
||||||
weight: 65
|
sidebar_position: 65
|
||||||
identifier: "integrations"
|
identifier: "integrations"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-15T17:29:00+08:00"
|
date: "2019-04-15T17:29:00+08:00"
|
||||||
title: "整合"
|
title: "整合"
|
||||||
slug: "integrations"
|
slug: "integrations"
|
||||||
weight: 65
|
sidebar_position: 65
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "整合"
|
name: "整合"
|
||||||
weight: 65
|
sidebar_position: 65
|
||||||
identifier: "integrations"
|
identifier: "integrations"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-15T17:29:00+08:00"
|
date: "2019-04-15T17:29:00+08:00"
|
||||||
title: "Migrations Interfaces"
|
title: "Migrations Interfaces"
|
||||||
slug: "migrations-interfaces"
|
slug: "migrations-interfaces"
|
||||||
weight: 55
|
sidebar_position: 55
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "Migrations Interfaces"
|
name: "Migrations Interfaces"
|
||||||
weight: 55
|
sidebar_position: 55
|
||||||
identifier: "migrations-interfaces"
|
identifier: "migrations-interfaces"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-25T17:29:00+08:00"
|
date: "2023-05-25T17:29:00+08:00"
|
||||||
title: "迁移界面"
|
title: "迁移界面"
|
||||||
slug: "migrations-interfaces"
|
slug: "migrations-interfaces"
|
||||||
weight: 55
|
sidebar_position: 55
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "迁移界面"
|
name: "迁移界面"
|
||||||
weight: 55
|
sidebar_position: 55
|
||||||
identifier: "migrations-interfaces"
|
identifier: "migrations-interfaces"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-15T17:29:00+08:00"
|
date: "2019-04-15T17:29:00+08:00"
|
||||||
title: "遷移介面"
|
title: "遷移介面"
|
||||||
slug: "migrations-interfaces"
|
slug: "migrations-interfaces"
|
||||||
weight: 55
|
sidebar_position: 55
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "遷移介面"
|
name: "遷移介面"
|
||||||
weight: 55
|
sidebar_position: 55
|
||||||
identifier: "migrations-interfaces"
|
identifier: "migrations-interfaces"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2023-06-01T08:40:00+08:00"
|
date: "2023-06-01T08:40:00+08:00"
|
||||||
title: "OAuth2 provider"
|
title: "OAuth2 provider"
|
||||||
slug: "oauth2-provider"
|
slug: "oauth2-provider"
|
||||||
weight: 41
|
sidebar_position: 41
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "OAuth2 Provider"
|
name: "OAuth2 Provider"
|
||||||
weight: 41
|
sidebar_position: 41
|
||||||
identifier: "oauth2-provider"
|
identifier: "oauth2-provider"
|
||||||
---
|
---
|
||||||
|
|
||||||
# OAuth2 provider
|
# OAuth2 provider
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea supports acting as an OAuth2 provider to allow third party applications to access its resources with the user's consent. This feature is available since release 1.8.0.
|
Gitea supports acting as an OAuth2 provider to allow third party applications to access its resources with the user's consent. This feature is available since release 1.8.0.
|
||||||
|
|
||||||
## Endpoints
|
## Endpoints
|
||||||
@@ -52,20 +48,20 @@ Gitea supports scoped access tokens, which allow users the ability to restrict t
|
|||||||
Gitea token scopes are as follows:
|
Gitea token scopes are as follows:
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| ---- |--------------------------------------------------------------------------------------------------------------------------------------------------|
|
| ---- |------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| **(no scope)** | Not supported. A scope is required even for public repositories. |
|
| **(no scope)** | Not supported. A scope is required even for public repositories. |
|
||||||
| **activitypub** | `activitypub` API routes: ActivityPub related operations. |
|
| **activitypub** | `activitypub` API routes: ActivityPub related operations. |
|
||||||
| **read:activitypub** | Grants read access for ActivityPub operations. |
|
| **read:activitypub** | Grants read access for ActivityPub operations. |
|
||||||
| **write:activitypub** | Grants read/write/delete access for ActivityPub operations. |
|
| **write:activitypub** | Grants read/write/delete access for ActivityPub operations. |
|
||||||
| **admin** | `/admin/*` API routes: Site-wide administrative operations (hidden for non-admin accounts). |
|
| **admin** | `/admin/*` API routes: Site-wide administrative operations (hidden for non-admin accounts). |
|
||||||
| **read:admin** | Grants read access for admin operations, such as getting cron jobs or registered user emails. |
|
| **read:admin** | Grants read access for admin operations, such as getting cron jobs or registered user emails. |
|
||||||
| **write:admin** | Grants read/write/delete access for admin operations, such as running cron jobs or updating user accounts. | |
|
| **write:admin** | Grants read/write/delete access for admin operations, such as running cron jobs or updating user accounts. |
|
||||||
| **issue** | `issues/*`, `labels/*`, `milestones/*` API routes: Issue-related operations. |
|
| **issue** | `issues/*`, `labels/*`, `milestones/*` API routes: Issue-related operations. |
|
||||||
| **read:issue** | Grants read access for issues operations, such as getting issue comments, issue attachments, and milestones. |
|
| **read:issue** | Grants read access for issues operations, such as getting issue comments, issue attachments, and milestones. |
|
||||||
| **write:issue** | Grants read/write/delete access for issues operations, such as posting or editing an issue comment or attachment, and updating milestones. |
|
| **write:issue** | Grants read/write/delete access for issues operations, such as posting or editing an issue comment or attachment, and updating milestones. |
|
||||||
| **misc** | miscellaneous and settings top-level API routes. |
|
| **misc** | Reserved for future usage. |
|
||||||
| **read:misc** | Grants read access to miscellaneous operations, such as getting label and gitignore templates. |
|
| **read:misc** | Reserved for future usage. |
|
||||||
| **write:misc** | Grants read/write/delete access to miscellaneous operations, such as markup utility operations. |
|
| **write:misc** | Reserved for future usage. |
|
||||||
| **notification** | `notification/*` API routes: user notification operations. |
|
| **notification** | `notification/*` API routes: user notification operations. |
|
||||||
| **read:notification** | Grants read access to user notifications, such as which notifications users are subscribed to and read new notifications. |
|
| **read:notification** | Grants read access to user notifications, such as which notifications users are subscribed to and read new notifications. |
|
||||||
| **write:notification** | Grants read/write/delete access to user notifications, such as marking notifications as read. |
|
| **write:notification** | Grants read/write/delete access to user notifications, such as marking notifications as read. |
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-19:44:00+01:00"
|
date: "2019-04-19:44:00+01:00"
|
||||||
title: "OAuth2 提供者"
|
title: "OAuth2 提供者"
|
||||||
slug: "oauth2-provider"
|
slug: "oauth2-provider"
|
||||||
weight: 41
|
sidebar_position: 41
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "OAuth2 提供者"
|
name: "OAuth2 提供者"
|
||||||
weight: 41
|
sidebar_position: 41
|
||||||
identifier: "oauth2-provider"
|
identifier: "oauth2-provider"
|
||||||
---
|
---
|
||||||
|
|
||||||
# OAuth2 提供者
|
# OAuth2 提供者
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 支持作为 OAuth2 提供者,允许第三方应用程序在用户同意的情况下访问其资源。此功能自 1.8.0 版起可用。
|
Gitea 支持作为 OAuth2 提供者,允许第三方应用程序在用户同意的情况下访问其资源。此功能自 1.8.0 版起可用。
|
||||||
|
|
||||||
## 端点
|
## 端点
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-19:44:00+01:00"
|
date: "2019-04-19:44:00+01:00"
|
||||||
title: "OAuth2 提供者"
|
title: "OAuth2 提供者"
|
||||||
slug: "oauth2-provider"
|
slug: "oauth2-provider"
|
||||||
weight: 41
|
sidebar_position: 41
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "development"
|
parent: "development"
|
||||||
name: "OAuth2 提供者"
|
name: "OAuth2 提供者"
|
||||||
weight: 41
|
sidebar_position: 41
|
||||||
identifier: "oauth2-provider"
|
identifier: "oauth2-provider"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -19,8 +19,6 @@ menu:
|
|||||||
|
|
||||||
**目錄**
|
**目錄**
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意下存取 Gitea 的資源。此功能自 1.8.0 版開始提供。
|
Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意下存取 Gitea 的資源。此功能自 1.8.0 版開始提供。
|
||||||
|
|
||||||
## Endpoint
|
## Endpoint
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2017-01-20T15:00:00+08:00"
|
date: "2017-01-20T15:00:00+08:00"
|
||||||
title: "Help"
|
title: "Help"
|
||||||
slug: "help"
|
slug: "help"
|
||||||
weight: 5
|
sidebar_position: 5
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Help"
|
name: "Help"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
identifier: "help"
|
identifier: "help"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2017-01-20T15:00:00+08:00"
|
date: "2017-01-20T15:00:00+08:00"
|
||||||
title: "Aide"
|
title: "Aide"
|
||||||
slug: "help"
|
slug: "help"
|
||||||
weight: 5
|
sidebar_position: 5
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Aide"
|
name: "Aide"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
identifier: "help"
|
identifier: "help"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2017-01-20T15:00:00+08:00"
|
date: "2017-01-20T15:00:00+08:00"
|
||||||
title: "帮助"
|
title: "帮助"
|
||||||
slug: "help"
|
slug: "help"
|
||||||
weight: 5
|
sidebar_position: 5
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "帮助"
|
name: "帮助"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
identifier: "help"
|
identifier: "help"
|
||||||
---
|
---
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
date: "2017-01-20T15:00:00+08:00"
|
date: "2017-01-20T15:00:00+08:00"
|
||||||
title: "幫助"
|
title: "幫助"
|
||||||
slug: "help"
|
slug: "help"
|
||||||
weight: 5
|
sidebar_position: 5
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "幫助"
|
name: "幫助"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
identifier: "help"
|
identifier: "help"
|
||||||
---
|
---
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
date: "2019-04-05T16:00:00+02:00"
|
date: "2019-04-05T16:00:00+02:00"
|
||||||
title: "FAQ"
|
title: "FAQ"
|
||||||
slug: "faq"
|
slug: "faq"
|
||||||
weight: 5
|
sidebar_position: 5
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@@ -11,19 +11,15 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "help"
|
parent: "help"
|
||||||
name: "FAQ"
|
name: "FAQ"
|
||||||
weight: 5
|
sidebar_position: 5
|
||||||
identifier: "faq"
|
identifier: "faq"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Frequently Asked Questions <!-- omit in toc -->
|
# Frequently Asked Questions
|
||||||
|
|
||||||
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/support.en-us.md" >}}).
|
For more help resources, check all [Support Options](help/support.md).
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes?
|
## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes?
|
||||||
|
|
||||||
@@ -43,7 +39,7 @@ If a bug fix is targeted on 1.20.1 but 1.20.1 is not released yet, you can get t
|
|||||||
|
|
||||||
To migrate from Gogs to Gitea:
|
To migrate from Gogs to Gitea:
|
||||||
|
|
||||||
- [Gogs version 0.9.146 or less]({{< relref "doc/installation/upgrade-from-gogs.en-us.md" >}})
|
- [Gogs version 0.9.146 or less](installation/upgrade-from-gogs.md)
|
||||||
- [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.
|
||||||
@@ -91,7 +87,7 @@ https://github.com/loganinak/MigrateGitlabToGogs
|
|||||||
|
|
||||||
There are a few places that could make this show incorrectly.
|
There are a few places that could make this show incorrectly.
|
||||||
|
|
||||||
1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}})
|
1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide](administration/reverse-proxies.md)
|
||||||
2. Make sure you have correctly set `ROOT_URL` in the `server` section of your `app.ini`
|
2. Make sure you have correctly set `ROOT_URL` in the `server` section of 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`
|
If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini`
|
||||||
@@ -104,7 +100,7 @@ If certain clone options aren't showing up (HTTP/S or SSH), the following option
|
|||||||
|
|
||||||
This error occurs when the reverse proxy limits the file upload size.
|
This error occurs when the reverse proxy limits the file upload size.
|
||||||
|
|
||||||
See the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}) for a solution with nginx.
|
See the [reverse proxy guide](administration/reverse-proxies.md) for a solution with nginx.
|
||||||
|
|
||||||
## Custom Templates not loading or working incorrectly
|
## Custom Templates not loading or working incorrectly
|
||||||
|
|
||||||
@@ -114,7 +110,7 @@ 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
|
||||||
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-what-file)
|
||||||
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/administration/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](administration/customizing-gitea.md) page to add your template to the correct location.
|
||||||
|
|
||||||
## Does Gitea have a "GitHub/GitLab pages" feature?
|
## Does Gitea have a "GitHub/GitLab pages" feature?
|
||||||
|
|
||||||
@@ -132,7 +128,7 @@ A "login prohibited" user is a user that is not allowed to log in to Gitea anymo
|
|||||||
|
|
||||||
## Setting up logging
|
## Setting up logging
|
||||||
|
|
||||||
- [Official Docs]({{< relref "doc/administration/logging-config.en-us.md" >}})
|
- [Official Docs](administration/logging-config.md)
|
||||||
|
|
||||||
## What is Swagger?
|
## What is Swagger?
|
||||||
|
|
||||||
@@ -140,7 +136,7 @@ A "login prohibited" user is a user that is not allowed to log in to Gitea anymo
|
|||||||
|
|
||||||
All Gitea instances have the built-in API and there is no way to disable it completely.
|
All Gitea instances have the built-in API and there is no way to disable it completely.
|
||||||
You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`.
|
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/development/api-usage.en-us.md" >}}).
|
For more information, refer to Gitea's [API docs](development/api-usage.md).
|
||||||
|
|
||||||
You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
|
You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
|
||||||
|
|
||||||
@@ -155,7 +151,7 @@ There are multiple things you can combine to prevent spammers.
|
|||||||
1. By whitelisting or blocklisting certain email domains
|
1. By whitelisting or blocklisting certain email domains
|
||||||
2. By only whitelisting certain domains with OpenID (see below)
|
2. By only whitelisting certain domains with OpenID (see below)
|
||||||
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
|
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
|
||||||
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/administration/command-line.en-us.md" >}}), [API]({{< relref "doc/development/api-usage.en-us.md" >}}), or Gitea's Admin UI
|
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI](administration/command-line.md), [API](development/api-usage.md), or Gitea's Admin UI
|
||||||
|
|
||||||
### Only allow/block certain email domains
|
### Only allow/block certain email domains
|
||||||
|
|
||||||
@@ -181,7 +177,7 @@ At some point, a customer or third party needs access to a specific repo and onl
|
|||||||
|
|
||||||
### Enable Fail2ban
|
### Enable Fail2ban
|
||||||
|
|
||||||
Use [Fail2Ban]({{< relref "doc/administration/fail2ban-setup.en-us.md" >}}) to monitor and stop automated login attempts or other malicious behavior based on log patterns
|
Use [Fail2Ban](administration/fail2ban-setup.md) to monitor and stop automated login attempts or other malicious behavior based on log patterns
|
||||||
|
|
||||||
## How to add/use custom themes
|
## How to add/use custom themes
|
||||||
|
|
||||||
@@ -334,24 +330,24 @@ You may want to set this value to `60m` or `120m`.
|
|||||||
|
|
||||||
## How can I create users before starting Gitea
|
## How can I create users before starting Gitea
|
||||||
|
|
||||||
Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands]({{< relref "doc/administration/command-line.en-us.md#admin" >}}) to add users like normal.
|
Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands](administration/command-line.md#admin) to add users like normal.
|
||||||
|
|
||||||
## How can I enable password reset
|
## How can I enable password reset
|
||||||
|
|
||||||
There is no setting for password resets. It is enabled when a [mail service]({{< relref "doc/administration/email-setup.en-us.md" >}}) is configured, and disabled otherwise.
|
There is no setting for password resets. It is enabled when a [mail service](administration/email-setup.md) is configured, and disabled otherwise.
|
||||||
|
|
||||||
## How can a user's password be changed
|
## How can a user's password be changed
|
||||||
|
|
||||||
- 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/administration/command-line.en-us.md#admin" >}}).
|
- By using the [admin CLI commands](administration/command-line.md#admin).
|
||||||
|
|
||||||
Keep in mind most commands will also need a [global flag]({{< relref "doc/administration/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](administration/command-line.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/administration/email-setup.en-us.md" >}}).
|
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service](administration/email-setup.md).
|
||||||
|
|
||||||
## Why is my markdown broken
|
## Why is my markdown broken
|
||||||
|
|
||||||
@@ -449,9 +445,9 @@ It is highly recommended to back-up your database before running these commands.
|
|||||||
- You can also check `<ROOT_URL>/admin/config` for the repository root path.
|
- You can also check `<ROOT_URL>/admin/config` for the repository root path.
|
||||||
- Ensure that the user/org exists that you want to adopt repositories for.
|
- Ensure that the user/org exists that you want to adopt repositories for.
|
||||||
- As an admin, go to `<ROOT_URL>/admin/repos/unadopted` and search.
|
- As an admin, go to `<ROOT_URL>/admin/repos/unadopted` and search.
|
||||||
- Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}).
|
- Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](administration/config-cheat-sheet.md#repository).
|
||||||
- If the above steps are done correctly, you should be able to select repositories to adopt.
|
- If the above steps are done correctly, you should be able to select repositories to adopt.
|
||||||
- If no repositories are found, enable [debug logging]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors.
|
- If no repositories are found, enable [debug logging](administration/config-cheat-sheet.md#repository) to check for any specific errors.
|
||||||
|
|
||||||
## Gitea can't start on NFS
|
## Gitea can't start on NFS
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user