Browse Source
Import docs into main repository (#2874)
Import docs into main repository (#2874)
* import docs into main repository Signed-off-by: Matti Ranta <matti@mdranta.net>release/v1.4
committed by
Lauris BH
68 changed files with 3720 additions and 0 deletions
-
31.drone.yml
-
34docs/.editorconfig
-
2docs/.gitignore
-
22docs/Dockerfile
-
202docs/LICENSE
-
29docs/Makefile
-
55docs/README.md
-
237docs/config.yaml
-
13docs/content/doc/advanced.en-us.md
-
13docs/content/doc/advanced.zh-cn.md
-
218docs/content/doc/advanced/config-cheat-sheet.en-us.md
-
191docs/content/doc/advanced/config-cheat-sheet.zh-cn.md
-
54docs/content/doc/advanced/customizing-gitea.en-us.md
-
42docs/content/doc/advanced/hacking-on-gitea.en-us.md
-
42docs/content/doc/advanced/hacking-on-gitea.zh-cn.md
-
44docs/content/doc/advanced/make.en-us.md
-
67docs/content/doc/advanced/specific-variables.en-us.md
-
13docs/content/doc/features.en-us.md
-
13docs/content/doc/features.zh-cn.md
-
13docs/content/doc/features.zh-tw.md
-
194docs/content/doc/features/authentication.en-us.md
-
18docs/content/doc/features/authentication.zh-cn.md
-
18docs/content/doc/features/authentication.zh-tw.md
-
18docs/content/doc/features/localization.en-us.md
-
18docs/content/doc/features/localization.zh-cn.md
-
18docs/content/doc/features/localization.zh-tw.md
-
103docs/content/doc/features/webhooks.en-us.md
-
18docs/content/doc/features/webhooks.zh-cn.md
-
18docs/content/doc/features/webhooks.zh-tw.md
-
13docs/content/doc/help.zh-cn.md
-
23docs/content/doc/help/seek-help.zh-cn.md
-
69docs/content/doc/help/troubleshooting.en-us.md
-
13docs/content/doc/installation.en-us.md
-
13docs/content/doc/installation.zh-cn.md
-
13docs/content/doc/installation.zh-tw.md
-
45docs/content/doc/installation/from-binary.en-us.md
-
35docs/content/doc/installation/from-binary.zh-cn.md
-
35docs/content/doc/installation/from-binary.zh-tw.md
-
57docs/content/doc/installation/from-package.en-us.md
-
37docs/content/doc/installation/from-package.zh-cn.md
-
53docs/content/doc/installation/from-package.zh-tw.md
-
79docs/content/doc/installation/from-source.en-us.md
-
84docs/content/doc/installation/from-source.zh-cn.md
-
73docs/content/doc/installation/from-source.zh-tw.md
-
68docs/content/doc/installation/run-as-service-in-ubuntu.en-us.md
-
34docs/content/doc/installation/windows-service.en-us.md
-
34docs/content/doc/installation/windows-service.zh-cn.md
-
34docs/content/doc/installation/windows-service.zh-tw.md
-
196docs/content/doc/installation/with-docker.en-us.md
-
42docs/content/doc/installation/with-docker.zh-cn.md
-
40docs/content/doc/installation/with-docker.zh-tw.md
-
13docs/content/doc/upgrade.en-us.md
-
13docs/content/doc/upgrade.zh-cn.md
-
13docs/content/doc/upgrade.zh-tw.md
-
82docs/content/doc/upgrade/from-gogs.en-us.md
-
26docs/content/doc/upgrade/from-gogs.zh-cn.md
-
26docs/content/doc/upgrade/from-gogs.zh-tw.md
-
13docs/content/doc/usage.en-us.md
-
46docs/content/doc/usage/backup-and-restore.en-us.md
-
45docs/content/doc/usage/backup-and-restore.zh-tw.md
-
80docs/content/doc/usage/command-line.md
-
279docs/content/page/index.en-us.md
-
75docs/content/page/index.zh-cn.md
-
67docs/content/page/index.zh-tw.md
-
39docs/docker/caddy.conf
-
23docs/layouts/index.html
-
32docs/scripts/trans-copy
-
0docs/static/.gitkeep
@ -0,0 +1,34 @@ |
|||
# http://editorconfig.org |
|||
|
|||
root = true |
|||
|
|||
[*] |
|||
charset = utf-8 |
|||
insert_final_newline = true |
|||
trim_trailing_whitespace = true |
|||
|
|||
[*.go] |
|||
indent_style = tab |
|||
indent_size = 8 |
|||
|
|||
[*.{tmpl,html}] |
|||
indent_style = tab |
|||
indent_size = 4 |
|||
|
|||
[*.{less}] |
|||
indent_style = space |
|||
indent_size = 4 |
|||
|
|||
[*.{yml}] |
|||
indent_style = space |
|||
indent_size = 2 |
|||
|
|||
[*.js] |
|||
indent_style = space |
|||
indent_size = 4 |
|||
|
|||
[Makefile] |
|||
indent_style = tab |
|||
|
|||
[*.md] |
|||
trim_trailing_whitespace = false |
@ -0,0 +1,2 @@ |
|||
public/ |
|||
themes/ |
@ -0,0 +1,22 @@ |
|||
# build stage |
|||
FROM golang:alpine AS build-env |
|||
|
|||
RUN apk add --no-cache git |
|||
RUN go get -d -v github.com/mholt/caddy/caddy github.com/pedronasser/caddy-search github.com/simia-tech/caddy-locale |
|||
WORKDIR /go/src/github.com/mholt/caddy/caddy |
|||
|
|||
RUN sed -i '/This is where other plugins get plugged in (imported)/a _ "github.com/pedronasser/caddy-search"' caddymain/run.go \ |
|||
&& sed -i '/This is where other plugins get plugged in (imported)/a _ "github.com/simia-tech/caddy-locale"' caddymain/run.go \ |
|||
&& go install -v . \ |
|||
&& /go/bin/caddy -version |
|||
|
|||
FROM alpine:edge |
|||
EXPOSE 80 |
|||
|
|||
RUN apk add --no-cache wget mailcap ca-certificates |
|||
COPY --from=build-env /go/bin/caddy /usr/sbin/caddy |
|||
|
|||
COPY docker/caddy.conf /etc/caddy.conf |
|||
COPY public /srv/www |
|||
|
|||
CMD ["/usr/sbin/caddy", "-conf", "/etc/caddy.conf"] |
@ -0,0 +1,202 @@ |
|||
|
|||
Apache License |
|||
Version 2.0, January 2004 |
|||
http://www.apache.org/licenses/ |
|||
|
|||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
|||
|
|||
1. Definitions. |
|||
|
|||
"License" shall mean the terms and conditions for use, reproduction, |
|||
and distribution as defined by Sections 1 through 9 of this document. |
|||
|
|||
"Licensor" shall mean the copyright owner or entity authorized by |
|||
the copyright owner that is granting the License. |
|||
|
|||
"Legal Entity" shall mean the union of the acting entity and all |
|||
other entities that control, are controlled by, or are under common |
|||
control with that entity. For the purposes of this definition, |
|||
"control" means (i) the power, direct or indirect, to cause the |
|||
direction or management of such entity, whether by contract or |
|||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
|||
outstanding shares, or (iii) beneficial ownership of such entity. |
|||
|
|||
"You" (or "Your") shall mean an individual or Legal Entity |
|||
exercising permissions granted by this License. |
|||
|
|||
"Source" form shall mean the preferred form for making modifications, |
|||
including but not limited to software source code, documentation |
|||
source, and configuration files. |
|||
|
|||
"Object" form shall mean any form resulting from mechanical |
|||
transformation or translation of a Source form, including but |
|||
not limited to compiled object code, generated documentation, |
|||
and conversions to other media types. |
|||
|
|||
"Work" shall mean the work of authorship, whether in Source or |
|||
Object form, made available under the License, as indicated by a |
|||
copyright notice that is included in or attached to the work |
|||
(an example is provided in the Appendix below). |
|||
|
|||
"Derivative Works" shall mean any work, whether in Source or Object |
|||
form, that is based on (or derived from) the Work and for which the |
|||
editorial revisions, annotations, elaborations, or other modifications |
|||
represent, as a whole, an original work of authorship. For the purposes |
|||
of this License, Derivative Works shall not include works that remain |
|||
separable from, or merely link (or bind by name) to the interfaces of, |
|||
the Work and Derivative Works thereof. |
|||
|
|||
"Contribution" shall mean any work of authorship, including |
|||
the original version of the Work and any modifications or additions |
|||
to that Work or Derivative Works thereof, that is intentionally |
|||
submitted to Licensor for inclusion in the Work by the copyright owner |
|||
or by an individual or Legal Entity authorized to submit on behalf of |
|||
the copyright owner. For the purposes of this definition, "submitted" |
|||
means any form of electronic, verbal, or written communication sent |
|||
to the Licensor or its representatives, including but not limited to |
|||
communication on electronic mailing lists, source code control systems, |
|||
and issue tracking systems that are managed by, or on behalf of, the |
|||
Licensor for the purpose of discussing and improving the Work, but |
|||
excluding communication that is conspicuously marked or otherwise |
|||
designated in writing by the copyright owner as "Not a Contribution." |
|||
|
|||
"Contributor" shall mean Licensor and any individual or Legal Entity |
|||
on behalf of whom a Contribution has been received by Licensor and |
|||
subsequently incorporated within the Work. |
|||
|
|||
2. Grant of Copyright License. Subject to the terms and conditions of |
|||
this License, each Contributor hereby grants to You a perpetual, |
|||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|||
copyright license to reproduce, prepare Derivative Works of, |
|||
publicly display, publicly perform, sublicense, and distribute the |
|||
Work and such Derivative Works in Source or Object form. |
|||
|
|||
3. Grant of Patent License. Subject to the terms and conditions of |
|||
this License, each Contributor hereby grants to You a perpetual, |
|||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|||
(except as stated in this section) patent license to make, have made, |
|||
use, offer to sell, sell, import, and otherwise transfer the Work, |
|||
where such license applies only to those patent claims licensable |
|||
by such Contributor that are necessarily infringed by their |
|||
Contribution(s) alone or by combination of their Contribution(s) |
|||
with the Work to which such Contribution(s) was submitted. If You |
|||
institute patent litigation against any entity (including a |
|||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
|||
or a Contribution incorporated within the Work constitutes direct |
|||
or contributory patent infringement, then any patent licenses |
|||
granted to You under this License for that Work shall terminate |
|||
as of the date such litigation is filed. |
|||
|
|||
4. Redistribution. You may reproduce and distribute copies of the |
|||
Work or Derivative Works thereof in any medium, with or without |
|||
modifications, and in Source or Object form, provided that You |
|||
meet the following conditions: |
|||
|
|||
(a) You must give any other recipients of the Work or |
|||
Derivative Works a copy of this License; and |
|||
|
|||
(b) You must cause any modified files to carry prominent notices |
|||
stating that You changed the files; and |
|||
|
|||
(c) You must retain, in the Source form of any Derivative Works |
|||
that You distribute, all copyright, patent, trademark, and |
|||
attribution notices from the Source form of the Work, |
|||
excluding those notices that do not pertain to any part of |
|||
the Derivative Works; and |
|||
|
|||
(d) If the Work includes a "NOTICE" text file as part of its |
|||
distribution, then any Derivative Works that You distribute must |
|||
include a readable copy of the attribution notices contained |
|||
within such NOTICE file, excluding those notices that do not |
|||
pertain to any part of the Derivative Works, in at least one |
|||
of the following places: within a NOTICE text file distributed |
|||
as part of the Derivative Works; within the Source form or |
|||
documentation, if provided along with the Derivative Works; or, |
|||
within a display generated by the Derivative Works, if and |
|||
wherever such third-party notices normally appear. The contents |
|||
of the NOTICE file are for informational purposes only and |
|||
do not modify the License. You may add Your own attribution |
|||
notices within Derivative Works that You distribute, alongside |
|||
or as an addendum to the NOTICE text from the Work, provided |
|||
that such additional attribution notices cannot be construed |
|||
as modifying the License. |
|||
|
|||
You may add Your own copyright statement to Your modifications and |
|||
may provide additional or different license terms and conditions |
|||
for use, reproduction, or distribution of Your modifications, or |
|||
for any such Derivative Works as a whole, provided Your use, |
|||
reproduction, and distribution of the Work otherwise complies with |
|||
the conditions stated in this License. |
|||
|
|||
5. Submission of Contributions. Unless You explicitly state otherwise, |
|||
any Contribution intentionally submitted for inclusion in the Work |
|||
by You to the Licensor shall be under the terms and conditions of |
|||
this License, without any additional terms or conditions. |
|||
Notwithstanding the above, nothing herein shall supersede or modify |
|||
the terms of any separate license agreement you may have executed |
|||
with Licensor regarding such Contributions. |
|||
|
|||
6. Trademarks. This License does not grant permission to use the trade |
|||
names, trademarks, service marks, or product names of the Licensor, |
|||
except as required for reasonable and customary use in describing the |
|||
origin of the Work and reproducing the content of the NOTICE file. |
|||
|
|||
7. Disclaimer of Warranty. Unless required by applicable law or |
|||
agreed to in writing, Licensor provides the Work (and each |
|||
Contributor provides its Contributions) on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|||
implied, including, without limitation, any warranties or conditions |
|||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
|||
PARTICULAR PURPOSE. You are solely responsible for determining the |
|||
appropriateness of using or redistributing the Work and assume any |
|||
risks associated with Your exercise of permissions under this License. |
|||
|
|||
8. Limitation of Liability. In no event and under no legal theory, |
|||
whether in tort (including negligence), contract, or otherwise, |
|||
unless required by applicable law (such as deliberate and grossly |
|||
negligent acts) or agreed to in writing, shall any Contributor be |
|||
liable to You for damages, including any direct, indirect, special, |
|||
incidental, or consequential damages of any character arising as a |
|||
result of this License or out of the use or inability to use the |
|||
Work (including but not limited to damages for loss of goodwill, |
|||
work stoppage, computer failure or malfunction, or any and all |
|||
other commercial damages or losses), even if such Contributor |
|||
has been advised of the possibility of such damages. |
|||
|
|||
9. Accepting Warranty or Additional Liability. While redistributing |
|||
the Work or Derivative Works thereof, You may choose to offer, |
|||
and charge a fee for, acceptance of support, warranty, indemnity, |
|||
or other liability obligations and/or rights consistent with this |
|||
License. However, in accepting such obligations, You may act only |
|||
on Your own behalf and on Your sole responsibility, not on behalf |
|||
of any other Contributor, and only if You agree to indemnify, |
|||
defend, and hold each Contributor harmless for any liability |
|||
incurred by, or claims asserted against, such Contributor by reason |
|||
of your accepting any such warranty or additional liability. |
|||
|
|||
END OF TERMS AND CONDITIONS |
|||
|
|||
APPENDIX: How to apply the Apache License to your work. |
|||
|
|||
To apply the Apache License to your work, attach the following |
|||
boilerplate notice, with the fields enclosed by brackets "[]" |
|||
replaced with your own identifying information. (Don't include |
|||
the brackets!) The text should be enclosed in the appropriate |
|||
comment syntax for the file format. We also recommend that a |
|||
file or class name and description of purpose be included on the |
|||
same "printed page" as the copyright notice for easier |
|||
identification within third-party archives. |
|||
|
|||
Copyright [yyyy] [name of copyright owner] |
|||
|
|||
Licensed under the Apache License, Version 2.0 (the "License"); |
|||
you may not use this file except in compliance with the License. |
|||
You may obtain a copy of the License at |
|||
|
|||
http://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, software |
|||
distributed under the License is distributed on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
See the License for the specific language governing permissions and |
|||
limitations under the License. |
@ -0,0 +1,29 @@ |
|||
THEME := themes/gitea |
|||
PUBLIC := public |
|||
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz |
|||
|
|||
.PHONY: all |
|||
all: build |
|||
|
|||
.PHONY: clean |
|||
clean: |
|||
rm -rf $(PUBLIC) $(THEME) |
|||
|
|||
.PHONY: trans-copy |
|||
trans-copy: |
|||
@bash scripts/trans-copy |
|||
|
|||
.PHONY: server |
|||
server: $(THEME) |
|||
hugo server |
|||
|
|||
.PHONY: build |
|||
build: $(THEME) |
|||
hugo --cleanDestinationDir |
|||
|
|||
.PHONY: update |
|||
update: $(THEME) |
|||
|
|||
$(THEME): |
|||
mkdir -p $@ |
|||
curl -s $(ARCHIVE) | tar xz -C $@ |
@ -0,0 +1,55 @@ |
|||
# Gitea: Docs |
|||
|
|||
[](http://drone.gitea.io/go-gitea/docs) |
|||
[](https://discord.gg/NsatcWJ) |
|||
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com") |
|||
|
|||
## Hosting |
|||
|
|||
This page is hosted on our infrastructure within Docker containers, it gets |
|||
automatically updated on every push to the `master` branch. |
|||
|
|||
If you want to host this page on your own you can take our docker image |
|||
[gitea/docs](https://hub.docker.com/r/gitea/docs/). |
|||
|
|||
## Install |
|||
|
|||
This pages uses the [Hugo](https://github.com/spf13/hugo) 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 |
|||
|
|||
* [Maintainers](https://github.com/orgs/go-gitea/people) |
|||
* [Contributors](https://github.com/go-gitea/docs/graphs/contributors) |
|||
|
|||
## License |
|||
|
|||
This project is under the Apache-2.0 License. See the [LICENSE](LICENSE) file |
|||
for the full license text. |
|||
|
|||
## Copyright |
|||
|
|||
``` |
|||
Copyright (c) 2016 The Gitea Authors <https://gitea.io> |
|||
``` |
@ -0,0 +1,237 @@ |
|||
baseurl: https://docs.gitea.io/ |
|||
languageCode: en-us |
|||
title: Docs |
|||
theme: gitea |
|||
disqusShortname: gitea |
|||
|
|||
defaultContentLanguage: en-us |
|||
defaultContentLanguageInSubdir: true |
|||
enableMissingTranslationPlaceholders: true |
|||
|
|||
permalinks: |
|||
post: /:year/:month/:title/ |
|||
doc: /:slug/ |
|||
page: /:slug/ |
|||
default: /:slug/ |
|||
|
|||
params: |
|||
description: Git with a cup of tea |
|||
author: The Gitea Authors |
|||
website: https://docs.gitea.io |
|||
|
|||
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: 25 |
|||
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: 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/NsatcWJ |
|||
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: 25 |
|||
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://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/NsatcWJ |
|||
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: 25 |
|||
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://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/NsatcWJ |
|||
weight: 70 |
|||
pre: comment |
|||
- name: Forum |
|||
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: 25 |
|||
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: 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/NsatcWJ |
|||
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: 25 |
|||
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: 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/NsatcWJ |
|||
weight: 70 |
|||
pre: comment |
|||
- name: Forum |
|||
url: https://discourse.gitea.io/ |
|||
weight: 80 |
|||
pre: group |
@ -0,0 +1,13 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "Advanced" |
|||
slug: "advanced" |
|||
weight: 30 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
name: "Advanced" |
|||
weight: 40 |
|||
identifier: "advanced" |
|||
--- |
@ -0,0 +1,13 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "èżé¶" |
|||
slug: "advanced" |
|||
weight: 30 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
name: "èżé¶" |
|||
weight: 40 |
|||
identifier: "advanced" |
|||
--- |
@ -0,0 +1,218 @@ |
|||
--- |
|||
date: "2016-12-26T16:00:00+02:00" |
|||
title: "Config Cheat Sheet" |
|||
slug: "config-cheat-sheet" |
|||
weight: 20 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "advanced" |
|||
name: "Config Cheat Sheet" |
|||
weight: 20 |
|||
identifier: "config-cheat-sheet" |
|||
--- |
|||
|
|||
# Configuration Cheat Sheet |
|||
|
|||
This is a cheat sheet for the Gitea configuration file. It is helpful for more fully understanding how it powers Gitea. |
|||
|
|||
Before getting started, make sure you know that any change to the configuration should be made in `custom/conf/app.ini` or any corresponding location. |
|||
|
|||
All default settings can be found in [app.ini.sample](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample) (replace master in URL with name of tag for released versions). If you see anything which looks like `%(X)s`, it is a feature powered by [ini](https://github.com/go-ini/ini/#recursive-values) for reading values recursively. |
|||
|
|||
Any configuration option that is marked by :exclamation: means that you should keep the default value unless you fully understand what you are doing. |
|||
|
|||
Values containing `#` or `;` must be quoted using `` ` `` or `"""`. |
|||
|
|||
**Note** that you have to restart Gitea for changes to take effect. |
|||
|
|||
## Overall (`DEFAULT`) |
|||
|
|||
- `APP_NAME`: Application name, change to whatever you want. |
|||
- `RUN_USER`: The user to run Gitea as, we recommend it be `git`; however, change this to whatever your username is if you run Gitea on your personal computer. Gitea may crash if this value is not set properly. |
|||
- `RUN_MODE`: For performance and other purposes, change this to `prod` when deployed to a production environment. The installation process will set this to `prod` automatically. |
|||
|
|||
## Repository (`repository`) |
|||
|
|||
- `ROOT`: Root path for storing all users' repository data. It must be an absolute path. The default is `~/<username>/gitea-repositories`. |
|||
- `SCRIPT_TYPE`: The script type your server supports, usually this is `bash`, but some customers report that they only have `sh`. |
|||
- `ANSI_CHARSET`: The default charset for an unrecognized charset. |
|||
- `FORCE_PRIVATE`: Force every new repository to be private. |
|||
- `MAX_CREATION_LIMIT`: Global maximum creation limit of repositories per user, `-1` means no limit. |
|||
- `PULL_REQUEST_QUEUE_LENGTH`:exclamation:: Length of pull request patch test queue, make it as large as possible. |
|||
|
|||
## UI (`ui`) |
|||
|
|||
- `EXPLORE_PAGING_NUM`: Number of repositories that are shown in one explore page. |
|||
- `ISSUE_PAGING_NUM`: Number of issues that are shown in one page (for all pages that list issues). |
|||
- `FEED_MAX_COMMIT_NUM`: Number of maximum commits shown in one activity feed. |
|||
|
|||
### UI - Admin (`ui.admin`) |
|||
|
|||
- `USER_PAGING_NUM`: Number of users that are shown in one page. |
|||
- `REPO_PAGING_NUM`: Number of repos that are shown in one page. |
|||
- `NOTICE_PAGING_NUM`: Number of notices that are shown in one page. |
|||
- `ORG_PAGING_NUM`: Number of organizations that are shown in one page. |
|||
|
|||
## Markdown (`markdown`) |
|||
|
|||
- `ENABLE_HARD_LINE_BREAK`: Whether or not to enable hard the line break extension. |
|||
|
|||
## Server (`server`) |
|||
|
|||
- `PROTOCOL`: Either `http`, `https`, `fcgi`, or `unix`. |
|||
- `DOMAIN`: Domain name of your server. |
|||
- `ROOT_URL`: Full public URL of Gitea server. |
|||
- `HTTP_ADDR`: HTTP listen address. If `PROTOCOL` is set to `fcgi`, Gitea will listen for FastCGI requests on TCP socket defined by `HTTP_ADDR` and `HTTP_PORT` configuration settings. If `PROTOCOL` is set to `unix`, this should be the name of the Unix socket file to use. |
|||
- `HTTP_PORT`: HTTP listen port. If `PROTOCOL` is set to `fcgi`, Gitea will listen for FastCGI requests on TCP socket defined by `HTTP_ADDR` and `HTTP_PORT` configuration settings. |
|||
- `UNIX_SOCKET_PERMISSION`: Permisson mode for Unix socket, default is 666. |
|||
- `DISABLE_SSH`: Disables SSH feature when it's not available. |
|||
- `START_SSH_SERVER`: Starts built-in SSH server when enabled. |
|||
- `SSH_DOMAIN`: Domain name of your ssh server. |
|||
- `SSH_PORT`: SSH port displayed in clone URL, in case yours is not `22`. |
|||
- `SSH_LISTEN_PORT`: Port for the built-in SSH server. Defaults to `SSH_PORT`. |
|||
- `OFFLINE_MODE`: Disables use of CDN for static files and Gravatar for profile pictures. |
|||
- `DISABLE_ROUTER_LOG`: Mutes printing of the router log. |
|||
- `CERT_FILE`: Cert file path used for HTTPS. |
|||
- `KEY_FILE`: Key file path used for HTTPS. |
|||
- `STATIC_ROOT_PATH`: Upper level of template and static files path, default is the path where Gitea is located. |
|||
- `ENABLE_GZIP`: Enables application-level GZIP support. |
|||
- `LANDING_PAGE`: Non-logged-in users' landing page, either `home` or `explore`. |
|||
- `LFS_START_SERVER`: Enables git-lfs support. `true` or `false`, default is `false`. |
|||
- `LFS_CONTENT_PATH`: Where your lfs files put on, default is `data/lfs`. |
|||
- `LFS_JWT_SECRET`: LFS authentication secret, changed this to yourself. |
|||
|
|||
## Database (`database`) |
|||
|
|||
- `DB_TYPE`: The database type you choose, either `mysql`, `postgres`, `mssql` or `sqlite3`. |
|||
- `HOST`: Database host address and port. |
|||
- `NAME`: Database name. |
|||
- `USER`: Database username. |
|||
- `PASSWD`: Database user password. |
|||
- `SSL_MODE`: For PostgreSQL only. |
|||
- `PATH`: For SQLite3 only, the database file path. |
|||
|
|||
## Security (`security`) |
|||
|
|||
- `INSTALL_LOCK`: Indicates whether to allow the open install page (setting admin account is involved, so it's a very important value). |
|||
- `SECRET_KEY`: Global secret key for your server security, **you'd better change it** (will generate a random string every time you install). |
|||
- `LOGIN_REMEMBER_DAYS`: Cookie lifetime, in days. |
|||
- `COOKIE_USERNAME`: Name of the cookie that saves username. |
|||
- `COOKIE_REMEMBER_NAME`: Name of cookie that saves auto-login information. |
|||
- `REVERSE_PROXY_AUTHENTICATION_USER`: Header name for reverse proxy authentication username. |
|||
- `DISABLE_GIT_HOOKS`: Prevent all users (including admin) from creating custom git hooks (defaults to false) |
|||
|
|||
## OpenID (`openid`) |
|||
|
|||
- `ENABLE_OPENID_SIGNIN`: Whether to allow signin in via OpenID (defaults to false). |
|||
- `ENABLE_OPENID_SIGNUP`: Whether to allow registering via OpenID (defaults to `!DISABLE_REGISTRATION`). |
|||
- `WHITELISTED_URIS`: Space separated list of POSIX regexp patterns. If non empty OpenID URIs should match any of these to be granted access. |
|||
- `BLACKLISTED_URIS`: Space separated list of POSIX regexp pattenrs. OpenID URI matching any of these is refused access. |
|||
|
|||
## Service (`service`) |
|||
|
|||
- `ACTIVE_CODE_LIVE_MINUTES`: The minutes of active code life time. |
|||
- `RESET_PASSWD_CODE_LIVE_MINUTES`: The minutes of reset password code life time. |
|||
- `REGISTER_EMAIL_CONFIRM`: Enable this to ask for mail confirmation of registration, requires `Mailer` to be enabled. |
|||
- `DISABLE_REGISTRATION`: Disable registration, after which only admin can create accounts for users. |
|||
- `SHOW_REGISTRATION_BUTTON`: Indicate whether to show registration button or not. |
|||
- `REQUIRE_SIGNIN_VIEW`: Enable this to force users to log in to view any page. |
|||
- `ENABLE_CACHE_AVATAR`: Enable this to cache avatar from Gravatar. |
|||
- `ENABLE_NOTIFY_MAIL`: Enable this to send e-mail to watchers of repository when something happens like creating issues, requires `Mailer` to be enabled. |
|||
- `ENABLE_REVERSE_PROXY_AUTHENTICATION`: Enable this to allow reverse proxy authentication, more detail: https://github.com/gogits/gogs/issues/165 |
|||
- `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION`: Enable this to allow auto-registration for reverse authentication. |
|||
- `DISABLE_MINIMUM_KEY_SIZE_CHECK`: Do not check minimum key size with corresponding type. |
|||
- `ENABLE_CAPTCHA`: Enable this to use captcha validation for registration. |
|||
|
|||
## Webhook (`webhook`) |
|||
|
|||
- `QUEUE_LENGTH`:exclamation:: Hook task queue length. |
|||
- `DELIVER_TIMEOUT`: Delivery timeout in seconds for shooting webhooks. |
|||
- `SKIP_TLS_VERIFY`: Indicate whether to allow insecure certification or not. |
|||
- `PAGING_NUM`: Number of webhook history that are shown in one page. |
|||
|
|||
## Mailer (`mailer`) |
|||
|
|||
- `ENABLED`: Enable this to use a mail service. |
|||
- `DISABLE_HELO`: Disable HELO operation. |
|||
- `HELO_HOSTNAME`: Custom hostname for HELO operation. |
|||
- `HOST`: SMTP mail host address and port (example: smtp.gitea.io:587). |
|||
- `FROM`: Mail from address, RFC 5322. This can be just an email address, or the "Name" \<email@example.com\> format. |
|||
- `USER`: Username of mailer (usually just your e-mail address). |
|||
- `PASSWD`: Password of mailer. |
|||
- `SKIP_VERIFY`: Do not verify the self-signed certificates. |
|||
- `USE_SENDMAIL`: Use the operating system's `sendmail` command instead of SMTP. This is common on linux systems. Valid values are `true` to use sendmail and `false` to use SMTP (default). Note that enabling sendmail will ignore all other `mailer` settings except `ENABLED`, `FROM` and `SENDMAIL_PATH`. |
|||
- `SENDMAIL_PATH`: The location of sendmail on the operating system. This can be an absolute path (eg: `/usr/sbin/sendmail`) or just the name of the command (eg: `sendmail` - default) if it can be found in the `PATH` environment variable. |
|||
|
|||
Note: Actually, Gitea supports only SMTP with STARTTLS. |
|||
|
|||
## Cache (`cache`) |
|||
|
|||
- `ADAPTER`: Cache engine adapter, either `memory`, `redis`, or `memcache`. If you want to use `redis` or `memcache`, be sure to rebuild everything with build tags `redis` or `memcache`: `go build -tags='redis'`. |
|||
- `INTERVAL`: for memory cache only, GC interval in seconds. |
|||
- `HOST`: For redis and memcache, the host address and port number. |
|||
- 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` |
|||
|
|||
## Session (`session`) |
|||
|
|||
- `PROVIDER`: Session engine provider, either `memory`, `file`, `redis`, or `mysql`. |
|||
- `PROVIDER_CONFIG`: For file, it's the root path; for others, it's the host address and port number. |
|||
- `COOKIE_SECURE`: Enable this to force using HTTPS for all session access. |
|||
- `COOKIE_NAME`: The name of the cookie used for the session ID, defaults to `i_like_gitea`. |
|||
- `GC_INTERVAL_TIME`: GC interval in seconds. |
|||
|
|||
## Picture (`picture`) |
|||
|
|||
- `GRAVATAR_SOURCE`: Can be `gravatar`, `duoshuo` or anything like `http://cn.gravatar.com/avatar/`. |
|||
- `DISABLE_GRAVATAR`: Enable this to use local avatars only. |
|||
- `ENABLE_FEDERATED_AVATAR`: Enable support for federated avatars (see http://www.libravatar.org) |
|||
- `AVATAR_UPLOAD_PATH`: Path to store local and cached files. |
|||
|
|||
## Attachment (`attachment`) |
|||
|
|||
- `ENABLED`: Enable this to allow users upload attachments. |
|||
- `PATH`: Path to store attachments. |
|||
- `ALLOWED_TYPES`: Allowed MIME types, e.g. `image/jpeg|image/png`, use `*/*` for all types. |
|||
- `MAX_SIZE`: Maximum size in MB, e.g. `4` |
|||
- `MAX_FILES`: Maximum number of attachments can be uploaded at once, e.g. `5`. |
|||
|
|||
## Log (`log`) |
|||
|
|||
- `ROOT_PATH`: Root path for log files. |
|||
- `MODE`: Logging mode, default is `console`. For multiple modes, use comma to separate it. |
|||
- `LEVEL`: General log level, default is `Trace`. |
|||
|
|||
## Cron (`cron`) |
|||
|
|||
- `ENABLED`: Enable this to run cron tasks periodically. |
|||
- `RUN_AT_START`: Enable this to run cron tasks at start time. |
|||
|
|||
### Cron - Update Mirrors (`cron.update_mirrors`) |
|||
|
|||
- `SCHEDULE`: Cron syntax for scheduling update mirrors, e.g. `@every 1h`. |
|||
|
|||
### Cron - Repository Health Check (`cron.repo_health_check`) |
|||
|
|||
- `SCHEDULE`: Cron syntax for scheduling repository health check, e.g. `@every 24h`. |
|||
- `TIMEOUT`: Time duration syntax for health check execution timeout, e.g. `60s`. |
|||
- `ARGS`: Arguments for command `git fsck`, e.g. `--unreachable --tags`. |
|||
|
|||
### Cron - Repository Statistics Check (`cron.check_repo_stats`) |
|||
|
|||
- `RUN_AT_START`: Enable this to run repository statistics check at start time. |
|||
- `SCHEDULE`: Cron syntax for scheduling repository statistics check, e.g. `@every 24h`. |
|||
|
|||
## Git (`git`) |
|||
|
|||
- `MAX_GIT_DIFF_LINES`: Max number of lines allowed of a single file in diff view. |
|||
- `MAX_GIT_DIFF_LINE_CHARACTERS`: Max number of characters of a line allowed in diff view. |
|||
- `MAX_GIT_DIFF_FILES`: Max number of files shown in diff view. |
|||
- `GC_ARGS`: Arguments for command `git gc`, e.g. `--aggressive --auto`. |
|||
|
|||
## Other (`other`) |
|||
|
|||
- `SHOW_FOOTER_BRANDING`: Enable this to show Gitea branding in the footer. |
|||
- `SHOW_FOOTER_VERSION`: Enable this to show Gitea version information in the footer. |
|||
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: Enable this to show time of template execution in the footer. |
@ -0,0 +1,191 @@ |
|||
--- |
|||
date: "2016-12-26T16:00:00+02:00" |
|||
title: "é
çœźèŻŽæ" |
|||
slug: "config-cheat-sheet" |
|||
weight: 20 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "advanced" |
|||
name: "é
çœźèŻŽæ" |
|||
weight: 20 |
|||
identifier: "config-cheat-sheet" |
|||
--- |
|||
|
|||
# é
çœźèŻŽæ |
|||
|
|||
èżæŻéćŻčGiteaé
çœźæä»¶çèŻŽæïŒäœ ćŻä»„äșè§ŁGiteaçćŒș性é
çœźăéèŠèŻŽæçæŻïŒäœ çæææčćèŻ·äżźæč `custom/conf/app.ini` æä»¶èäžæŻæșæä»¶ăææé»èź€ćŒćŻä»„éèż [app.ini.sample](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample) æ„çć°ăćŠæäœ ćç° `%(X)s` èżæ ·çć
ćźčïŒèŻ·æ„ç [ini](https://github.com/go-ini/ini/#recursive-values) èżéçèŻŽæăæ æłšäș :exclamation: çé
çœźéĄčèĄšæé€éäœ çççè§ŁèżäžȘé
çœźéĄčçæäčïŒćŠćæć„œäœżçšé»èź€ćŒă |
|||
|
|||
## Overall (`DEFAULT`) |
|||
|
|||
- `APP_NAME`: ćșçšćç§°ïŒæčæäœ ćžæçććă |
|||
- `RUN_USER`: èżèĄGiteaççšæ·ïŒæšèäœżçš `git`ïŒćŠæćšäœ èȘć·±çäžȘäșșç”èäœżçšæčæäœ èȘć·±ççšæ·ćăćŠæèźŸçœźäžæŁçĄźïŒGiteaćŻèœćŽ©æșă |
|||
- `RUN_MODE`: 仿§èœèèïŒćŠæćšäș§ćçș§çæćĄäžæčæ `prod`ăćŠææšäœżçšćźèŁ
ććŻŒćźèŁ
çéŁäčäŒèȘćšèźŸçœźäžș `prod`ă |
|||
|
|||
## Repository (`repository`) |
|||
|
|||
- `ROOT`: ćæŸgitć·„çšçæ čçźćœăèżéćż
饻楫ç»ćŻčè·ŻćŸïŒé»èź€ćŒæŻ `~/<username>/gitea-repositories`ă |
|||
- `SCRIPT_TYPE`: æćĄćšæŻæçShellç±»ćïŒéćžžæŻ `bash`ïŒäœæäșæćĄćšäčæćŻèœæŻ `sh`ă |
|||
- `ANSI_CHARSET`: é»èź€ć珊çŒç ă |
|||
- `FORCE_PRIVATE`: ćŒșć¶æægitć·„çšćż
éĄ»ç§æă |
|||
- `MAX_CREATION_LIMIT`: ć
šć±æć€§æŻäžȘçšæ·ćć»șçgitć·„çšæ°çźïŒ `-1` èĄšç€șæČĄéć¶ă |
|||
- `PULL_REQUEST_QUEUE_LENGTH`: ć°ćżïŒććč¶èŻ·æ±æ”èŻéćçéżćșŠïŒć°œéæŸć€§ă |
|||
|
|||
## UI (`ui`) |
|||
|
|||
- `EXPLORE_PAGING_NUM`: æąçŽąéĄ”éąæŻéĄ”æŸç€șçä»ćșæ°éă |
|||
- `ISSUE_PAGING_NUM`: ć·„ćéĄ”éąæŻéĄ”æŸç€șçć·„ćæ°éă |
|||
- `FEED_MAX_COMMIT_NUM`: æŽ»ćšæ”éĄ”éąæŸç€șçæć€§æäș€æ æšă |
|||
|
|||
### UI - Admin (`ui.admin`) |
|||
|
|||
- `USER_PAGING_NUM`: çšæ·çźĄçéĄ”éąæŻéĄ”æŸç€șççšæ·æ°éă |
|||
- `REPO_PAGING_NUM`: ä»ćș知çéĄ”éąæŻéĄ”æŸç€șçä»ćșæ°éă |
|||
- `NOTICE_PAGING_NUM`: çł»ç»æç€șéĄ”éąæŻéĄ”æŸç€șçæç€șæ°éă |
|||
- `ORG_PAGING_NUM`: ç»ç»çźĄçéĄ”éąæŻéĄ”æŸç€șçç»ç»æ°éă |
|||
|
|||
## Markdown (`markdown`) |
|||
|
|||
- `ENABLE_HARD_LINE_BREAK`: æŻćŠćŻçšçĄŹæąèĄæ©ć±ă |
|||
|
|||
## Server (`server`) |
|||
|
|||
- `PROTOCOL`: ćŻé `http` æ `https`ă |
|||
- `DOMAIN`: æćĄćšććă |
|||
- `ROOT_URL`: GiteaæćĄćšçćŻč〠URLă |
|||
- `HTTP_ADDR`: HTTP çćŹć°ćă |
|||
- `HTTP_PORT`: HTTP çćŹç«ŻćŁă |
|||
- `DISABLE_SSH`: æŻćŠçŠçšSSHă |
|||
- `START_SSH_SERVER`: æŻćŠćŻçšć
éšSSHæćĄćšă |
|||
- `SSH_PORT`: SSH端ćŁïŒé»èź€äžș `22`ă |
|||
- `OFFLINE_MODE`: éćŻčéæć怎ćæä»¶çŠçš CDNă |
|||
- `DISABLE_ROUTER_LOG`: ć
łéæ„ćżäžçè·Żç±æ„ćżă |
|||
- `CERT_FILE`: ćŻçšHTTPSçèŻäčŠæä»¶ă |
|||
- `KEY_FILE`: ćŻçšHTTPSçćŻé„æä»¶ă |
|||
- `STATIC_ROOT_PATH`: ćæŸæšĄæżćéææä»¶çæ čçźćœïŒé»èź€æŻ Gitea çæ čçźćœă |
|||
- `ENABLE_GZIP`: ćŻçšćșçšçș§ć«ç GZIP ć猩ă |
|||
- `LANDING_PAGE`: æȘç»ćœçšæ·çé»èź€éĄ”éąïŒćŻé `home` æ `explore`ă |
|||
- `LFS_START_SERVER`: æŻćŠćŻçš git-lfs æŻæ. ćŻä»„äžș `true` æ `false`ïŒ é»èź€æŻ `false`ă |
|||
- `LFS_CONTENT_PATH`: ćæŸ lfs ćœä»€äžäŒ çæä»¶çć°æčïŒé»èź€æŻ `data/lfs`ă |
|||
- `LFS_JWT_SECRET`: LFS èź€èŻćŻé„ïŒæčæèȘć·±çă |
|||
|
|||
## Database (`database`) |
|||
|
|||
- `DB_TYPE`: æ°æźćșç±»ćïŒćŻé `mysql`, `postgres`, `mssql`, `tidb` æ `sqlite3`ă |
|||
- `HOST`: æ°æźćșæćĄćšć°ćć端ćŁă |
|||
- `NAME`: æ°æźćșćç§°ă |
|||
- `USER`: æ°æźćșçšæ·ćă |
|||
- `PASSWD`: æ°æźćșçšæ·ćŻç ă |
|||
- `SSL_MODE`: PostgreSQLæ°æźćșæŻćŠćŻçšSSLæšĄćŒă |
|||
- `PATH`: Tidb æè
SQLite3 æ°æźæä»¶ćæŸè·ŻćŸă |
|||
|
|||
## Security (`security`) |
|||
|
|||
- `INSTALL_LOCK`: æŻćŠć
èźžèżèĄćźèŁ
ććŻŒïŒ(è·çźĄçćèŽŠć·æć
łïŒććéèŠ)ă |
|||
- `SECRET_KEY`: ć
šć±æćĄćšćźć
šćŻé„ **æć„œæčæäœ èȘć·±ç** (ćœäœ èżèĄćźèŁ
ććŻŒçæ¶ćäŒèą«èźŸçœźäžșäžäžȘéæșćŒ)ă |
|||
- `LOGIN_REMEMBER_DAYS`: Cookie äżćæ¶éŽïŒćäœć€©ă |
|||
- `COOKIE_USERNAME`: äżćçšæ·ćç cookie ćç§°ă |
|||
- `COOKIE_REMEMBER_NAME`: äżćèȘćšç»ćœäżĄæŻç cookie ćç§°ă |
|||
- `REVERSE_PROXY_AUTHENTICATION_USER`: ćć代çèź€èŻç HTTP 怎ćç§°ă |
|||
|
|||
## Service (`service`) |
|||
|
|||
- `ACTIVE_CODE_LIVE_MINUTES`: ç»ééȘèŻç ć€±ææ¶éŽïŒćäœćéă |
|||
- `RESET_PASSWD_CODE_LIVE_MINUTES`: éçœźćŻç ć€±ææ¶éŽïŒćäœćéă |
|||
- `REGISTER_EMAIL_CONFIRM`: ćŻçšæłšćéźä»¶æżæŽ»ïŒćææŻ `Mailer` ć·Čç»ćŻçšă |
|||
- `DISABLE_REGISTRATION`: çŠçšæłšćïŒćŻçšććȘèœçšçźĄçćæ·»ć çšæ·ă |
|||
- `SHOW_REGISTRATION_BUTTON`: æŻćŠæŸç€șæłšćæéźă |
|||
- `REQUIRE_SIGNIN_VIEW`: æŻćŠææéĄ”éąéœćż
饻ç»ćœćæćŻèźżéźă |
|||
- `ENABLE_CACHE_AVATAR`: æŻćŠçŒćæ„èȘ Gravatar ç怎ćă |
|||
- `ENABLE_NOTIFY_MAIL`: æŻćŠćéć·„ććć»șçæééźä»¶ïŒéèŠ `Mailer` èą«æżæŽ»ă |
|||
- `ENABLE_REVERSE_PROXY_AUTHENTICATION`: ć
èźžćć代çèź€èŻïŒæŽć€ç»èè§ïŒhttps://github.com/gogits/gogs/issues/165 |
|||
- `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION`: ć
èźžéèżććèź€èŻćèȘćšæłšćă |
|||
- `ENABLE_CAPTCHA`: æłšćæ¶äœżçšćŸçéȘèŻç ă |
|||
|
|||
## Webhook (`webhook`) |
|||
|
|||
- `QUEUE_LENGTH`: èŻŽæ: Hook ä»»ćĄéćéżćșŠă |
|||
- `DELIVER_TIMEOUT`: èŻ·æ±webhooksçè¶
æ¶æ¶éŽïŒćäœç§ă |
|||
- `SKIP_TLS_VERIFY`: æŻćŠć
èźžäžćźć
šçèŻäčŠă |
|||
- `PAGING_NUM`: æŻéĄ”æŸç€șçWebhook ććČæ°éă |
|||
|
|||
## Mailer (`mailer`) |
|||
|
|||
- `ENABLED`: æŻćŠćŻçšéźä»¶æćĄă |
|||
- `DISABLE_HELO`: çŠçš HELO ćœä»€ă |
|||
- `HELO_HOSTNAME`: èȘćźäčäž»æșćæ„ććș HELO ćœä»€ă |
|||
- `HOST`: SMTP äž»æșć°ććç«ŻćŁ (äŸćŠïŒsmtp.gitea.io:587)ă |
|||
- `FROM`: éźä»¶ćéć°ćïŒRFC 5322. èżéćŻä»„楫äžäžȘéźä»¶ć°ćæè
"Name" \<email@example.com\> æ ŒćŒă |
|||
- `USER`: çšæ·ć(éćžžć°±æŻéźä»¶ć°ć)ă |
|||
- `PASSWD`: ćŻç ă |
|||
- `SKIP_VERIFY`: ćżœç„èŻäčŠéȘèŻă |
|||
|
|||
èŻŽæïŒćźé
äž Gitea ä»
ä»
æŻæćșäș STARTTLS ç SMTPă |
|||
|
|||
## Cache (`cache`) |
|||
|
|||
- `ADAPTER`: çŒććŒæïŒćŻä»„äžș `memory`, `redis` æ `memcache`ă |
|||
- `INTERVAL`: ćȘćŻčć
ćçŒćææïŒGCéŽéïŒćäœç§ă |
|||
- `HOST`: éćŻčredisćmemcacheææïŒäž»æșć°ćć端ćŁă |
|||
- 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` |
|||
|
|||
## Session (`session`) |
|||
|
|||
- `PROVIDER`: Session ć
ćźčććšæčćŒïŒćŻé `memory`, `file`, `redis` æ `mysql`ă |
|||
- `PROVIDER_CONFIG`: ćŠææŻæä»¶ïŒéŁäčèżé楫æ čçźćœïŒć
¶ä»çèŠćĄ«äž»æșć°ćć端ćŁă |
|||
- `COOKIE_SECURE`: ćŒșć¶äœżçš HTTPS äœäžșsessionèźżéźă |
|||
- `GC_INTERVAL_TIME`: Sessionć€±ææ¶éŽă |
|||
|
|||
## Picture (`picture`) |
|||
|
|||
- `GRAVATAR_SOURCE`: ć€Žćæ„æșïŒćŻä»„æŻ `gravatar`, `duoshuo` æè
类䌌 `http://cn.gravatar.com/avatar/` çæ„æș |
|||
- `DISABLE_GRAVATAR`: ćŒćŻććȘäœżçšć
éšć€Žćă |
|||
- `ENABLE_FEDERATED_AVATAR`: ćŻçšć€ŽćèçæŻæ (ćè§ http://www.libravatar.org) |
|||
|
|||
## Attachment (`attachment`) |
|||
|
|||
- `ENABLED`: æŻćŠć
èźžçšæ·äžäŒ éä»¶ă |
|||
- `PATH`: éä»¶ććšè·ŻćŸ |
|||
- `ALLOWED_TYPES`: ć
èźžäžäŒ çéä»¶ç±»ćăæŻćŠïŒ`image/jpeg|image/png`ïŒçš `*/*` èĄšç€șć
èźžä»»äœç±»ćă |
|||
- `MAX_SIZE`: éä»¶æć€§éć¶ïŒćäœ MBïŒæŻćŠïŒ `4`ă |
|||
- `MAX_FILES`: äžæŹĄæć€äžäŒ çéä»¶æ°éïŒæŻćŠïŒ `5`ă |
|||
|
|||
## Log (`log`) |
|||
|
|||
- `ROOT_PATH`: æ„ćżæä»¶æ čçźćœă |
|||
- `MODE`: æ„ćżèź°ćœæšĄćŒïŒé»èꀿŻäžș `console`ăćŠæèŠćć°ć€äžȘééïŒçšéć·ćé |
|||
- `LEVEL`: æ„ćżçș§ć«ïŒé»èź€äžș`Trace`ă |
|||
|
|||
## Cron (`cron`) |
|||
|
|||
- `ENABLED`: æŻćŠćšćć°èżèĄćźæä»»ćĄă |
|||
- `RUN_AT_START`: æŻćŠćŻćšæ¶èȘćšèżèĄă |
|||
|
|||
### Cron - Update Mirrors (`cron.update_mirrors`) |
|||
|
|||
- `SCHEDULE`: èȘćšćæ„éćä»ćșçCronèŻæłïŒæŻćŠïŒ`@every 1h`ă |
|||
|
|||
### Cron - Repository Health Check (`cron.repo_health_check`) |
|||
|
|||
- `SCHEDULE`: ä»ćșć„ćș·çæ”çCronèŻæłïŒæŻćŠïŒ`@every 24h`ă |
|||
- `TIMEOUT`: ä»ćșć„ćș·çæ”çè¶
æ¶æ¶éŽïŒæŻćŠïŒ`60s`. |
|||
- `ARGS`: æ§èĄ `git fsck` ćœä»€çćæ°ïŒæŻćŠïŒ`--unreachable --tags`ă |
|||
|
|||
### Cron - Repository Statistics Check (`cron.check_repo_stats`) |
|||
|
|||
- `RUN_AT_START`: æŻćŠćŻćšæ¶èȘćšèżèĄä»ćșç»èźĄă |
|||
- `SCHEDULE`: èäșç»èźĄæ¶çCron èŻæłïŒæŻćŠïŒ`@every 24h`. |
|||
|
|||
## Git (`git`) |
|||
|
|||
- `MAX_GIT_DIFF_LINES`: æŻèŸè§ćŸäžïŒäžäžȘæä»¶æć€æŸç€șèĄæ°ă |
|||
- `MAX_GIT_DIFF_LINE_CHARACTERS`: æŻèŸè§ćŸäžäžèĄæć€§ć珊æ°ă |
|||
- `MAX_GIT_DIFF_FILES`: æŻèŸè§ćŸäžçæć€§ç°ćźæä»¶æ°çźă |
|||
- `GC_ARGS`: æ§èĄ `git gc` ćœä»€çćæ°, æŻćŠïŒ `--aggressive --auto`ă |
|||
|
|||
## Other (`other`) |
|||
|
|||
- `SHOW_FOOTER_BRANDING`: äžșçććšéĄ”éąćșéšæŸç€șGiteaçćæ ·ă |
|||
- `SHOW_FOOTER_VERSION`: äžșçććšéĄ”éąćșéšæŸç€șGiteaççæŹă |
@ -0,0 +1,54 @@ |
|||
--- |
|||
date: "2017-04-15T14:56:00+02:00" |
|||
title: "Customizing Gitea" |
|||
slug: "customizing-gitea" |
|||
weight: 9 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "advanced" |
|||
name: "Customizing Gitea" |
|||
weight: 9 |
|||
identifier: "customizing-gitea" |
|||
--- |
|||
|
|||
# Customizing Gitea |
|||
|
|||
The main way to customize Gitea is by using the `custom` folder. This is the central place to override and configure features. |
|||
|
|||
If you install Gitea from binary, after the installation process ends, you can find the `custom` folder next to the binary. |
|||
Gitea will create the folder for you and prepopulate it with a `conf` folder inside, where Gitea stores all the configuration settings provided through the installation steps (have a look [here](https://docs.gitea.io/en-us/config-cheat-sheet/) for a complete list). |
|||
|
|||
If you can't find the `custom` folder next to the binary, please check the `GITEA_CUSTOM` environment variable, that can be used to override the default path to something else. `GITEA_CUSTOM` might be set for example in your launch script file. Please have a look [here](https://docs.gitea.io/en-us/specific-variables/) for a complete list of environment variables. |
|||
|
|||
**Note** that you have to restart Gitea for it to notice the changes. |
|||
|
|||
## Customizing /robots.txt |
|||
|
|||
To make Gitea serve your own `/robots.txt` (by default, an empty 404 status is served), simply create a file called `robots.txt` in the `custom` folder with the [expected contents](http://www.robotstxt.org/). |
|||
|
|||
## Serving custom public files |
|||
|
|||
To make Gitea serve custom public files (like pages and images), use the folder `custom/public/` as the webroot. Symbolic links will be followed. |
|||
|
|||
For example, a file `image.png` stored in `custom/public`, can be accessed with the url `http://your-gitea-url/image.png`. |
|||
|
|||
## Changing the default avatar |
|||
|
|||
Place the png image at the following path: `custom/public/img/avatar_default.png` |
|||
|
|||
## Customizing Gitea pages |
|||
|
|||
The `custom/templates` folder allows you to change every single page of Gitea. |
|||
|
|||
You need to be aware of the template you want to change. All templates can be found in the `templates` folder of the Gitea sources. |
|||
|
|||
When you find the correct .tmpl file, you need to copy it in the `custom/templates` folder of your installation, __respecting__ any subfolder you found in the source template. |
|||
|
|||
You can now customize the template you copied in `custom/templates`, being carefully to not break the Gitea syntax. |
|||
Any statement contained inside `{{` and `}}` are Gitea templete's syntax and shouldn't be touch, unless you know what are you doing. |
|||
|
|||
## Customizing gitignores, labels, licenses, locales, and readmes. |
|||
|
|||
Place your own files in corresponding sub-folder under `custom/options`. |
@ -0,0 +1,42 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "Hacking on Gitea" |
|||
slug: "hacking-on-gitea" |
|||
weight: 10 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "advanced" |
|||
name: "Hacking on Gitea" |
|||
weight: 10 |
|||
identifier: "hacking-on-gitea" |
|||
--- |
|||
|
|||
# Hacking on Gitea |
|||
|
|||
We won't cover the basics of a Golang setup within this guide. If you don't know how to get the environment up and running you should follow the official [install instructions](https://golang.org/doc/install). |
|||
|
|||
If you want to contribute to Gitea you should fork the project and work on the `master` branch. There is a catch though, some internal packages are referenced by their GitHub URL. So you have to trick the Go tool to think that you work on a clone of the official repository. Start by downloading the source code as you normally would: |
|||
|
|||
``` |
|||
go get -d code.gitea.io/gitea |
|||
``` |
|||
|
|||
Now it's time to fork the [Gitea repository](https://github.com/go-gitea/gitea) on GitHub, after that you should have to switch to the source directory on the command line: |
|||
|
|||
``` |
|||
cd $GOPATH/src/code.gitea.io/gitea |
|||
``` |
|||
|
|||
To be able to create pull requests you should add your forked repository as a remote to the Gitea sources, otherwise you can not apply the changes to our repository because of lacking write permissions: |
|||
|
|||
``` |
|||
git remote rename origin upstream |
|||
git remote add origin git@github.com:<USERNAME>/gitea.git |
|||
git fetch --all --prune |
|||
``` |
|||
|
|||
You've got a working development environment for Gitea now. Take a look at the `Makefile` to get an overview about the available tasks. The most common tasks should be `make test` which will start our test environment and `make build` which will build a `gitea` binary into your working directory. Writing test cases is not mandatory to contribute, but we will be happy if you do. |
|||
|
|||
Thatâs it! You are ready to hack on Gitea. Test your changes, push them to your repository and open a pull request. |
@ -0,0 +1,42 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "ć ć
„ Gitea ćŒæș" |
|||
slug: "hacking-on-gitea" |
|||
weight: 10 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "advanced" |
|||
name: "ć ć
„ Gitea ćŒæș" |
|||
weight: 10 |
|||
identifier: "hacking-on-gitea" |
|||
--- |
|||
|
|||
# Hacking on Gitea |
|||
|
|||
éŠć
äœ éèŠäžäșèżèĄçŻćąïŒèżć [仿ș代ç ćźèŁ
]({{< relref "from-source.zh-cn.md" >}}) çžćïŒćŠæäœ èżæČĄæèźŸçœźć„œïŒćŻä»„ć
é
èŻ»éŁäžȘç« èă |
|||
|
|||
ćŠæäœ æłäžș Gitea èŽĄçźä»Łç ïŒäœ éèŠ Fork èżäžȘéĄčçźćč¶äžä»„ `master` äžșćŒććæŻăGiteaäœżçšGovendoræ„知çäŸè”ïŒć æ€ææäŸè”éĄčéœèą«ć·„ć
·èȘćšcopyćšvendorćçźćœäžăçšäžéąçćœä»€æ„äžèœœæșç ïŒ |
|||
|
|||
``` |
|||
go get -d code.gitea.io/gitea |
|||
``` |
|||
|
|||
ç¶ćäœ ćŻä»„ćš Github äž fork [Gitea éĄčçź](https://github.com/go-gitea/gitea)ïŒäčććŻä»„éèżäžéąçćœä»€èżć
„æșç çźćœïŒ |
|||
|
|||
``` |
|||
cd $GOPATH/src/code.gitea.io/gitea |
|||
``` |
|||
|
|||
èŠćć»ș pull requests äœ èżéèŠćšæșç äžæ°ćąäžäžȘ remote æćäœ Fork çć°ćïŒçŽæ„æšéć° origin çèŻäŒćèŻäœ æČĄæćæéïŒ |
|||
|
|||
``` |
|||
git remote rename origin upstream |
|||
git remote add origin git@github.com:<USERNAME>/gitea.git |
|||
git fetch --all --prune |
|||
``` |
|||
|
|||
ç¶ćäœ ć°±ćŻä»„ćŒć§ćŒćäșăäœ ćŻä»„çäžäž `Makefile` çć
ćźčă`make test` ćŻä»„èżèĄæ”èŻçšćșïŒ `make build` ć°çæäžäžȘ `gitea` ćŻèżèĄæä»¶ćšæ čçźćœăćŠæäœ çæäș€æŻèŸć€æïŒć°œéć€ćäžäșćć
æ”èŻä»Łç ă |
|||
|
|||
ć„œäșïŒć°èżéäœ ć·Čç»èźŸçœźć„œäșææçćŒćGiteaæéççŻćąăæŹąèżæäžș Gitea ç Contributoră |
@ -0,0 +1,44 @@ |
|||
--- |
|||
date: "2017-01-14T11:00:00-02:00" |
|||
title: "Make" |
|||
slug: "make" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "advanced" |
|||
name: "Make" |
|||
weight: 30 |
|||
identifier: "make" |
|||
--- |
|||
|
|||
# Make |
|||
|
|||
Gitea makes heavy use of Make to automate tasks and have a faster development. This guide cover how to install Make. |
|||
|
|||
### On Linux |
|||
|
|||
You can install with your package manager. |
|||
|
|||
On Ubuntu/Debian: |
|||
|
|||
```bash |
|||
sudo apt-get install build-essential |
|||
``` |
|||
|
|||
On Fedora/RHEL/CentOS: |
|||
|
|||
```bash |
|||
sudo yum install make |
|||
``` |
|||
|
|||
### On Windows |
|||
|
|||
If you are using Windows, you can download and use one of these distributions of Make: |
|||
|
|||
- [Single binary build](http://www.equation.com/servlet/equation.cmd?fa=make). Copy somewhere and add to `PATH`. |
|||
- [32-bits version](ftp://ftp.equation.com/make/32/make.exe) |
|||
- [64-bits version](ftp://ftp.equation.com/make/64/make.exe) |
|||
- [MinGW](http://www.mingw.org/) includes a build. The binary is called `mingw32-make.exe` instead of `make.exe`. Add the `bin` folder to your `PATH`. |
|||
- [Chocolatey package](https://chocolatey.org/packages/make). Run `choco install make` |
@ -0,0 +1,67 @@ |
|||
--- |
|||
date: "2017-04-08T11:34:00+02:00" |
|||
title: "Specific variables" |
|||
slug: "specific-variables" |
|||
weight: 20 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "advanced" |
|||
name: "Specific variables" |
|||
weight: 20 |
|||
identifier: "specific-variables" |
|||
--- |
|||
|
|||
# Specific variables |
|||
|
|||
This is an inventory of Gitea environment variables. They change Gitea behaviour. |
|||
|
|||
Initialize them before Gitea command to be effective, for example: |
|||
|
|||
``` |
|||
GITEA_CUSTOM=/home/gitea/custom ./gitea web |
|||
``` |
|||
|
|||
## From Go language |
|||
|
|||
As Gitea is written in Go, it uses some Go variables as: |
|||
|
|||
* `GOOS` |
|||
* `GOARCH` |
|||
* `GOPATH` |
|||
|
|||
For `GOPATH`, check [official documentation about GOPATH environment variable](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable). |
|||
|
|||
For others, check [official documentation about variables used when it runs the generator](https://golang.org/cmd/go/#hdr-Generate_Go_files_by_processing_source). |
|||
|
|||
## Gitea files |
|||
|
|||
* `GITEA_WORK_DIR`: Gitea absolute path of work directory. |
|||
* `GITEA_CUSTOM`: Gitea uses `GITEA_WORK_DIR`/custom folder by default. Use this variable to change *custom* directory. |
|||
* `GOGS_WORK_DIR`: Deprecated, use `GITEA_WORK_DIR` |
|||
* `GOGS_CUSTOM`: Deprecated, use `GITEA_CUSTOM` |
|||
|
|||
## Operating system specifics |
|||
|
|||
* `USER`: system user that launch Gitea. Useful for repository URL address on Gitea interface |
|||
* `USERNAME`: if no USER found, Gitea will try `USERNAME` |
|||
* `HOME`: User home directory path (**except if** you're running on Windows, check the following `USERPROFILE` variable) |
|||
|
|||
### Only on Windows |
|||
|
|||
* `USERPROFILE`: User home directory path. If empty, uses `HOMEDRIVE` + `HOMEPATH` |
|||
* `HOMEDRIVE`: Main drive path you will use to get home directory |
|||
* `HOMEPATH`: Home relative path in the given home drive path |
|||
|
|||
## Macaron (framework used by Gitea) |
|||
|
|||
* `HOST`: Host Macaron will listen on |
|||
* `PORT`: Port Macaron will listen on |
|||
* `MACARON_ENV`: global variable to provide special functionality for development environments vs production environments. If MACARON_ENV is set to "" or "development" then templates will be recompiled on every request. For more performance, set the MACARON_ENV environment variable to "production". |
|||
|
|||
## Miscellaneous |
|||
|
|||
* `SKIP_MINWINSVC`: Do not run as a service on Windows if set to 1 |
|||
* `ZOOKEEPER_PATH`: [Zookeeper](http://zookeeper.apache.org/) jar file path |
|||
|
@ -0,0 +1,13 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "Features" |
|||
slug: "features" |
|||
weight: 20 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
name: "Features" |
|||
weight: 30 |
|||
identifier: "features" |
|||
--- |
@ -0,0 +1,13 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "çčæ§" |
|||
slug: "features" |
|||
weight: 20 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
name: "çčæ§" |
|||
weight: 30 |
|||
identifier: "features" |
|||
--- |
@ -0,0 +1,13 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "ćèœ" |
|||
slug: "features" |
|||
weight: 20 |
|||
toc: false |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
name: "ćèœ" |
|||
weight: 30 |
|||
identifier: "features" |
|||
--- |
@ -0,0 +1,194 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "Authentication" |
|||
slug: "authentication" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "features" |
|||
name: "Authentication" |
|||
weight: 10 |
|||
identifier: "authentication" |
|||
--- |
|||
|
|||
--- |
|||
name: Authentication |
|||
--- |
|||
|
|||
# Authentication |
|||
|
|||
## LDAP (Lightweight Directory Access Protocol) |
|||
|
|||
Both the LDAP via BindDN and the simple auth LDAP share the following fields: |
|||
|
|||
- Authorization Name **(required)** |
|||
- A name to assign to the new method of authorization. |
|||
|
|||
- Host **(required)** |
|||
- The address where the LDAP server can be reached. |
|||
- Example: `mydomain.com` |
|||
|
|||
- Port **(required)** |
|||
- The port to use when connecting to the server. |
|||
- Example: `389` for LDAP or `636` for LDAP SSL |
|||
|
|||
- Enable TLS Encryption (optional) |
|||
- Whether to use TLS when connecting to the LDAP server. |
|||
|
|||
- Admin Filter (optional) |
|||
- An LDAP filter specifying if a user should be given administrator |
|||
privileges. If a user account passes the filter, the user will be |
|||
privileged as an administrator. |
|||
- Example: `(objectClass=adminAccount)` |
|||
- Example for Microsoft Active Directory (AD): `(memberOf=CN=admin-group,OU=example,DC=example,DC=org)` |
|||
|
|||
- Username attribute (optional) |
|||
- The attribute of the user's LDAP record containing the user name. Given |
|||
attribute value will be used for new Gitea account user name after first |
|||
successful sign-in. Leave empty to use login name given on sign-in form. |
|||
- This is useful when supplied login name is matched against multiple |
|||
attributes, but only single specific attribute should be used for Gitea |
|||
account name, see "User Filter". |
|||
- Example: `uid` |
|||
- Example for Microsoft Active Directory (AD): `sAMAccountName` |
|||
|
|||
- First name attribute (optional) |
|||
- The attribute of the user's LDAP record containing the user's first name. |
|||
This will be used to populate their account information. |
|||
- Example: `givenName` |
|||
|
|||
- Surname attribute (optional) |
|||
- The attribute of the user's LDAP record containing the user's surname. |
|||
This will be used to populate their account information. |
|||
- Example: `sn` |
|||
|
|||
- E-mail attribute **(required)** |
|||
- The attribute of the user's LDAP record containing the user's email |
|||
address. This will be used to populate their account information. |
|||
- Example: `mail` |
|||
|
|||
**LDAP via BindDN** adds the following fields: |
|||
|
|||
- Bind DN (optional) |
|||
- The DN to bind to the LDAP server with when searching for the user. This |
|||
may be left blank to perform an anonymous search. |
|||
- Example: `cn=Search,dc=mydomain,dc=com` |
|||
|
|||
- Bind Password (optional) |
|||
- The password for the Bind DN specified above, if any. _Note: The password |
|||
is stored in plaintext at the server. As such, ensure that your Bind DN |
|||
has as few privileges as possible._ |
|||
|
|||
- User Search Base **(required)** |
|||
- The LDAP base at which user accounts will be searched for. |
|||
- Example: `ou=Users,dc=mydomain,dc=com` |
|||
|
|||
- User Filter **(required)** |
|||
- An LDAP filter declaring how to find the user record that is attempting to |
|||
authenticate. The `%s` matching parameter will be substituted with login |
|||
name given on sign-in form. |
|||
- Example: `(&(objectClass=posixAccount)(uid=%s))` |
|||
- Example for Microsoft Active Directory (AD): `(&(objectCategory=Person)(memberOf=CN=user-group,OU=example,DC=example,DC=org)(sAMAccountName=%s)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))` |
|||
- To substitute more than once `%[1]s` should be used instead, e.g. when |
|||
matching supplied login name against multiple attributes such as user |
|||
identifier, email or even phone number. |
|||
- Example: `(&(objectClass=Person)(|(uid=%[1]s)(mail=%[1]s)(mobile=%[1]s)))` |
|||
|
|||
**LDAP using simple auth** adds the following fields: |
|||
|
|||
- User DN **(required)** |
|||
- A template to use as the user's DN. The `%s` matching parameter will be substituted with login name given on sign-in form. |
|||
- Example: `cn=%s,ou=Users,dc=mydomain,dc=com` |
|||
- Example: `uid=%s,ou=Users,dc=mydomain,dc=com` |
|||
|
|||
- User Filter **(required)** |
|||
- An LDAP filter declaring when a user should be allowed to log in. The `%s` |
|||
matching parameter will be substituted with login name given on sign-in |
|||
form. |
|||
- Example: `(&(objectClass=posixAccount)(cn=%s))` |
|||
- Example: `(&(objectClass=posixAccount)(uid=%s))` |
|||
|
|||
**Verify group membership in LDAP** uses the following fields: |
|||
|
|||
* Group Search Base (optional) |
|||
* The LDAP DN used for groups. |
|||
* Example: `ou=group,dc=mydomain,dc=com` |
|||
|
|||
* Group Name Filter (optional) |
|||
* An LDAP filter declaring how to find valid groups in the above DN. |
|||
* Example: `(|(cn=gitea_users)(cn=admins))` |
|||
|
|||
* User Attribute in Group (optional) |
|||
* Which user LDAP attribute is listed in the group. |
|||
* Example: `uid` |
|||
|
|||
* Group Attribute for User (optional) |
|||
* Which group LDAP attribute contains an array above user attribute names. |
|||
* Example: `memberUid` |
|||
|
|||
## PAM (Pluggable Authentication Module) |
|||
|
|||
To configure this you just need to set the 'PAM Service Name' to a filename in `/etc/pam.d/`. |
|||
If you want it to work with normal Linux passwords, the user running Gitea must have read access to `/etc/shadow`. |
|||
|
|||
## SMTP (Simple Mail Transfer Protocol) |
|||
|
|||
This option allows Gitea to log in to your SMTP host as a Gitea user. To configure this, simply set the fields below: |
|||
|
|||
- Authentication Name **(required)** |
|||
- A name to assign to the new method of authorization. |
|||
|
|||
- SMTP Authentication Type **(required)** |
|||
- Type of authentication for use on your SMTP host, PLAIN or LOGIN. |
|||
|
|||
- Host **(required)** |
|||
- The address where the SMTP host can be reached. |
|||
- Example: `smtp.mydomain.com` |
|||
|
|||
- Port **(required)** |
|||
- The port to use when connecting to the server. |
|||
- Example: `587` |
|||
|
|||
- Allowed Domains |
|||
- Restrict what domains can log in if you're using public SMTP host or SMTP host with multiple domains. |
|||
- Example: `gitea.io,mydomain.com,mydomain2.com` |
|||
|
|||
- Enable TLS Encryption |
|||
- Enable TLS encryption on authentication. |
|||
|
|||
- Skip TLS Verify |
|||
- Disable TLS verify on authentication. |
|||
|
|||
- This authentication is activate |
|||
- Enable or disable this auth. |
|||
|
|||
## FreeIPA |
|||
|
|||
- In order to log in to Gitea using FreeIPA credentials, you need to create a bind account for Gitea to use: |
|||
|
|||
- On the FreeIPA server, create a `gitea.ldif` file, replacing `dc=example,dc=com` with your DN, and providing an appropriately secure password: |
|||
``` |
|||
dn: uid=gitea,cn=sysaccounts,cn=etc,dc=example,dc=com |
|||
changetype: add |
|||
objectclass: account |
|||
objectclass: simplesecurityobject |
|||
uid: gitea |
|||
userPassword: secure password |
|||
passwordExpirationTime: 20380119031407Z |
|||
nsIdleTimeout: 0 |
|||
``` |
|||
|
|||
- Import the LDIF (change localhost to an IPA server if needed), youâll be prompted for your Directory Manager password: |
|||
``` |
|||
ldapmodify -h localhost -p 389 -x -D \ |
|||
"cn=Directory Manager" -W -f gitea.ldif |
|||
``` |
|||
- Add an IPA group for gitea_users : |
|||
``` |
|||
ipa group-add --desc="Gitea Users" gitea_users |
|||
``` |
|||
- Note: If you get an error about IPA credentials, please run `kinit admin` and give your admin account password. |
|||
|
|||
- Now login to the Gitea as an Administrator, click on "Authentication" under Admin Panel. Then click `Add New Source` and fill in the details, changing all where appropriate to your own domain. |
@ -0,0 +1,18 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "èź€èŻ" |
|||
slug: "authentication" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "features" |
|||
name: "èź€èŻ" |
|||
weight: 10 |
|||
identifier: "authentication" |
|||
--- |
|||
|
|||
# èź€èŻ |
|||
|
|||
## TBD |
@ -0,0 +1,18 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "èȘè" |
|||
slug: "authentication" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "features" |
|||
name: "èȘè" |
|||
weight: 10 |
|||
identifier: "authentication" |
|||
--- |
|||
|
|||
# èȘè |
|||
|
|||
## TBD |
@ -0,0 +1,18 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "Localization" |
|||
slug: "localization" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "features" |
|||
name: "Localization" |
|||
weight: 20 |
|||
identifier: "localization" |
|||
--- |
|||
|
|||
# Localization |
|||
|
|||
## TBD |
@ -0,0 +1,18 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "æŹć°ć" |
|||
slug: "localization" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "features" |
|||
name: "æŹć°ć" |
|||
weight: 20 |
|||
identifier: "localization" |
|||
--- |
|||
|
|||
# æŹć°ć |
|||
|
|||
## TBD |
@ -0,0 +1,18 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "ćšć°ć" |
|||
slug: "localization" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "features" |
|||
name: "ćšć°ć" |
|||
weight: 20 |
|||
identifier: "localization" |
|||
--- |
|||
|
|||
# Localization |
|||
|
|||
## TBD |
@ -0,0 +1,103 @@ |
|||
--- |
|||
date: "2016-12-01T16:00:00+02:00" |
|||
title: "Webhooks" |
|||
slug: "webhooks" |
|||
weight: 10 |
|||
toc: true |
|||
draft: false |
|||
menu: |
|||
sidebar: |
|||
parent: "features" |
|||
name: "Webhooks" |
|||
weight: 30 |
|||
identifier: "webhooks" |
|||
--- |
|||
|
|||
# Webhooks |
|||
|
|||
Gitea supports web hooks for repository events, you can find it in settings page(`/:username/:reponame/settings/hooks`). All event pushes are POST requests, and we currently support two formats: Gitea and Slack. |
|||
|
|||
### Event information |
|||
|
|||
Following shows an example of event information that will be sent by Gitea to Payload URL: |
|||
|
|||
|
|||
``` |
|||
X-Github-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473 |
|||
X-Github-Event: push |
|||
X-Gogs-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473 |
|||
X-Gogs-Event: push |
|||
X-Gitea-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473 |
|||
X-Gitea-Event: push |
|||
``` |
|||
|
|||
```json |
|||
{ |
|||
"secret": "3gEsCfjlV2ugRwgpU#w1*WaW*wa4NXgGmpCfkbG3", |
|||
"ref": "refs/heads/develop", |
|||
"before": "28e1879d029cb852e4844d9c718537df08844e03", |
|||
"after": "bffeb74224043ba2feb48d137756c8a9331c449a", |
|||
"compare_url": "http://localhost:3000/gitea/webhooks/compare/28e1879d029cb852e4844d9c718537df08844e03...bffeb74224043ba2feb48d137756c8a9331c449a", |
|||
"commits": [ |
|||
{ |
|||
"id": "bffeb74224043ba2feb48d137756c8a9331c449a", |
|||
"message": "Webhooks Yay!", |
|||
"url": "http://localhost:3000/gitea/webhooks/commit/bffeb74224043ba2feb48d137756c8a9331c449a", |
|||
"author": { |
|||
"name": "Gitea", |
|||
"email": "someone@gitea.io", |
|||
"username": "gitea" |
|||
}, |
|||
"committer": { |
|||
"name": "Gitea", |
|||
"email": "someone@gitea.io", |
|||
"username": "gitea" |
|||
}, |
|||
"timestamp": "2017-03-13T13:52:11-04:00" |
|||
} |
|||
], |
|||
"repository": { |
|||
"id": 140, |
|||
"owner": { |
|||
"id": 1, |
|||
"login": "gitea", |
|||
"full_name": "Gitea", |
|||
"email": "someone@gitea.io", |
|||
"avatar_url": "https://localhost:3000/avatars/1", |
|||
"username": "gitea" |
|||
}, |
|||
"name": "webhooks", |
|||
"full_name": "gitea/webhooks", |
|||
"description": "", |
|||
"private": false, |
|||
"fork": false, |
|||
"html_url": "http://localhost:3000/gitea/webhooks", |
|||
"ssh_url": "ssh://gitea@localhost:2222/gitea/webhooks.git", |
|||
"clone_url": "http://localhost:3000/gitea/webhooks.git", |
|||
"website": "", |
|||
"stars_count": 0, |
|||
"forks_count": 1, |
|||
"watchers_count": 1, |
|||
"open_issues_count": 7, |
|||
"default_branch": "master", |
|||
"created_at": "2017-02-26T04:29:06-05:00", |
|||
"updated_at": "2017-03-13T13:51:58-04:00" |
|||
}, |
|||
"pusher": { |
|||
"id": 1, |
|||
"login": "gitea", |
|||
"full_name": "Gitea", |
|||
"email": "someone@gitea.io", |
|||
"avatar_url": "https://localhost:3000/avatars/1", |
|||
"username": "gitea" |
|||
}, |
|||
"sender": { |
|||
"id": 1, |
|||
"login": "gitea", |
|||
"full_name": "Gitea", |
|||
"email": "someone@gitea.io", |
|||