You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.example.ini 106KB

10 年之前
[docs] Add note that PROTOCOL config is case-sensitive (#25685) See [issue on gitea.com](https://gitea.com/gitea/gitea-docusaurus/issues/38), copied below for convenience: > Hello, may I first confirm that the app.ini PROTOCOL config is case sensitive (must be lowercase)? > > If so, I'd like to suggest for it to be highlighted in the [HTTPS Setup](https://docs.gitea.com/administration/https-setup#using-the-built-in-server) page. > Perhaps something like: > For the PROTOCOL=https field, make sure https is lowercase. Writing PROTOCOL=HTTPS may result in a SSL_ERROR_RX_RECORD_TOO_LONG error on Firefox or ERR_SSL_PROTOCOL_ERROR on Chrome and Edge. > > Background > At first I carelessly wrote PROTOCOL=HTTPS in my app.ini, and Firefox didn't allow me to connect because: > Secure Connection Failed > An error occurred during a connection to gitea.local.lan. SSL received a record that exceeded the maximum permissible length. > Error code: SSL_ERROR_RX_RECORD_TOO_LONG > I spent maybe half an hour troubleshooting my certs, ports, and other configs before backtracking to the start and realizing the capitalization difference there 😅. When I changed that config to lowercase, it worked. For this PR I added the note in the Config Cheat Sheet page and fixed the links to it from the HTTPS Setup page. Was originally thinking to put the note in the HTTPS Setup page itself, but since there are 2 sections referencing the PROTOCOL config, I was thinking it'd be neater and more concise to put it in the Config Cheat Sheet page instead. Especially since both sections already link to it, and I actually tried to check that link quite early on in my troubleshooting (but didn't pay much attention to it since the link was broken). ## Before/After screenshots as per [this repo's docs](https://github.com/go-gitea/gitea/tree/main/docs) Before - links ![image](https://github.com/go-gitea/gitea/assets/135522693/e0745077-f6a9-4178-aa78-2155ccb58fd6) Note: For this the links weren't broken, the links fix is because they were broken on gitea.com's docs (see below). After - links ![image](https://github.com/go-gitea/gitea/assets/135522693/748b3759-aa13-4ad0-9811-c6664b6cdd35) Before - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/4ff2e4e6-3528-4cea-a7a6-64a75854eb99) After - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/c8e07ab6-5a26-4582-a4d0-b83d1f11a30e) ## Before/After screenshots as per [gitea.com's docs](https://gitea.com/gitea/gitea-docusaurus) Before - links ![image](https://github.com/go-gitea/gitea/assets/135522693/4d26ea67-b987-4b91-810b-c53852a13078) After - links ![image](https://github.com/go-gitea/gitea/assets/135522693/24d02907-7f9e-4228-a190-7696623c00f7) Before - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/978eedfd-ce05-488d-ab54-9d7f3c9f233d) After - config cheat sheet ![image](https://github.com/go-gitea/gitea/assets/135522693/12d22566-a2b0-45ec-8302-a88eae9365d8)
7 月之前
Prefer native parser for SSH public key parsing (#23798) Without this patch, the setting SSH.StartBuiltinServer decides whether the native (Go) implementation is used rather than calling 'ssh-keygen'. It's possible for 'using ssh-keygen' and 'using the built-in server' to be independent. In fact, the gitea rootless container doesn't ship ssh-keygen and can be configured to use the host's SSH server - which will cause the public key parsing mechanism to break. This commit changes the decision to be based on SSH.KeygenPath instead. Any existing configurations with a custom KeygenPath set will continue to function. The new default value of '' selects the native version. The downside of this approach is that anyone who has relying on plain 'ssh-keygen' to have special properties will now be using the native version instead. I assume the exec-variant is only there because /x/crypto/ssh didn't support ssh-ed25519 until 2016. I don't see any other reason for using it so it might be an acceptable risk. Fixes #23363 EDIT: this message was garbled when I tried to get the commit description back in.. Trying to reconstruct it: ## :warning: BREAKING :warning: Users who don't have SSH.KeygenPath explicitly set and rely on the ssh-keygen binary need to set SSH.KeygenPath to 'ssh-keygen' in order to be able to continue using it for public key parsing. There was something else but I can't remember at the moment. EDIT2: It was about `make test` and `make lint`. Can't get them to run. To reproduce the issue, I installed `golang` in `docker.io/node:16` and got: ``` ... go: mvdan.cc/xurls/v2@v2.4.0: unknown revision mvdan.cc/xurls/v2.4.0 go: gotest.tools/v3@v3.4.0: unknown revision gotest.tools/v3.4.0 ... go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3 ... go: error loading module requirements ``` Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
10 年之前
10 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
10 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Rewrite logger system (#24726) ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
1 年之前
Add .livemd as a markdown extension (#22730) ## Needs and benefits [Livebook](https://livebook.dev/) notebooks are used for code documentation and for deep dives and note-taking in the elixir ecosystem. Rendering these in these as Markdown on frogejo has many benefits, since livemd is a subset of markdown. Some of the benefits are: - New users of elixir and livebook are scared by unformated .livemd files, but are shown what they expect - Sharing a notebook is as easy as sharing a link, no need to install the software in order to see the results. [goldmark-meraid ](https://github.com/abhinav/goldmark-mermaid) is a mermaid-js parser already included in gitea. This makes the .livemd rendering integration feature complete. With this PR class diagrams, ER Diagrams, flow charts and much more will be rendered perfectly. With the additional functionality gitea will be an ideal tool for sharing resources with fellow software engineers working in the elixir ecosystem. Allowing the git forge to be used without needing to install any software. ## Feature Description This issue requests the .livemd extension to be added as a Markdown language extension. - `.livemd` is the extension of Livebook which is an Elixir version of Jupyter Notebook. - `.livemd` is` a subset of Markdown. This would require the .livemd to be recognized as a markdown file. The Goldmark the markdown parser should handle the parsing and rendering automatically. Here is the corresponding commit for GitHub linguist: https://github.com/github/linguist/pull/5672 Here is a sample page of a livemd file: https://github.com/github/linguist/blob/master/samples/Markdown/livebook.livemd ## Screenshots The first screenshot shows how github shows the sample .livemd in the browser. The second screenshot shows how mermaid js, renders my development notebook and its corresponding ER Diagram. The source code can be found here: https://codeberg.org/lgh/Termi/src/commit/79615f74281789a1f2967b57bad0c67c356cef1f/termiNotes.livemd ## Testing I just changed the file extension from `.livemd`to `.md`and the document already renders perfectly on codeberg. Check you can it out [here](https://codeberg.org/lgh/Termi/src/branch/livemd2md/termiNotes.md) --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 年之前
Add setting to disable the git apply step in test patch (#22130) For a long time Gitea has tested PR patches using a git apply --check method, and in fact prior to the introduction of a read-tree assisted three-way merge in #18004, this was the only way of checking patches. Since #18004, the git apply --check method has been a fallback method, only used when the read-tree three-way merge method has detected a conflict. The read-tree assisted three-way merge method is much faster and less resource intensive method of detecting conflicts. #18004 kept the git apply method around because it was thought possible that this fallback might be able to rectify conflicts that the read-tree three-way merge detected. I am not certain if this could ever be the case. Given the uncertainty here and the now relative stability of the read-tree method - this PR makes using this fallback optional and disables it by default. The hope is that users will not notice any significant difference in conflict detection and we will be able to remove the git apply fallback in future, and/or improve the read-tree three-way merge method to catch any conflicts that git apply method might have been able to fix. An additional benefit is that patch checking should be significantly less resource intensive and much quicker. (See https://github.com/go-gitea/gitea/issues/22083\#issuecomment-1347961737) Ref #22083 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
1 年之前
Add .livemd as a markdown extension (#22730) ## Needs and benefits [Livebook](https://livebook.dev/) notebooks are used for code documentation and for deep dives and note-taking in the elixir ecosystem. Rendering these in these as Markdown on frogejo has many benefits, since livemd is a subset of markdown. Some of the benefits are: - New users of elixir and livebook are scared by unformated .livemd files, but are shown what they expect - Sharing a notebook is as easy as sharing a link, no need to install the software in order to see the results. [goldmark-meraid ](https://github.com/abhinav/goldmark-mermaid) is a mermaid-js parser already included in gitea. This makes the .livemd rendering integration feature complete. With this PR class diagrams, ER Diagrams, flow charts and much more will be rendered perfectly. With the additional functionality gitea will be an ideal tool for sharing resources with fellow software engineers working in the elixir ecosystem. Allowing the git forge to be used without needing to install any software. ## Feature Description This issue requests the .livemd extension to be added as a Markdown language extension. - `.livemd` is the extension of Livebook which is an Elixir version of Jupyter Notebook. - `.livemd` is` a subset of Markdown. This would require the .livemd to be recognized as a markdown file. The Goldmark the markdown parser should handle the parsing and rendering automatically. Here is the corresponding commit for GitHub linguist: https://github.com/github/linguist/pull/5672 Here is a sample page of a livemd file: https://github.com/github/linguist/blob/master/samples/Markdown/livebook.livemd ## Screenshots The first screenshot shows how github shows the sample .livemd in the browser. The second screenshot shows how mermaid js, renders my development notebook and its corresponding ER Diagram. The source code can be found here: https://codeberg.org/lgh/Termi/src/commit/79615f74281789a1f2967b57bad0c67c356cef1f/termiNotes.livemd ## Testing I just changed the file extension from `.livemd`to `.md`and the document already renders perfectly on codeberg. Check you can it out [here](https://codeberg.org/lgh/Termi/src/branch/livemd2md/termiNotes.md) --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 年之前
Refactor indexer (#25174) Refactor `modules/indexer` to make it more maintainable. And it can be easier to support more features. I'm trying to solve some of issue searching, this is a precursor to making functional changes. Current supported engines and the index versions: | engines | issues | code | | - | - | - | | db | Just a wrapper for database queries, doesn't need version | - | | bleve | The version of index is **2** | The version of index is **6** | | elasticsearch | The old index has no version, will be treated as version **0** in this PR | The version of index is **1** | | meilisearch | The old index has no version, will be treated as version **0** in this PR | - | ## Changes ### Split Splited it into mutiple packages ```text indexer ├── internal │   ├── bleve │   ├── db │   ├── elasticsearch │   └── meilisearch ├── code │   ├── bleve │   ├── elasticsearch │   └── internal └── issues ├── bleve ├── db ├── elasticsearch ├── internal └── meilisearch ``` - `indexer/interanal`: Internal shared package for indexer. - `indexer/interanal/[engine]`: Internal shared package for each engine (bleve/db/elasticsearch/meilisearch). - `indexer/code`: Implementations for code indexer. - `indexer/code/internal`: Internal shared package for code indexer. - `indexer/code/[engine]`: Implementation via each engine for code indexer. - `indexer/issues`: Implementations for issues indexer. ### Deduplication - Combine `Init/Ping/Close` for code indexer and issues indexer. - ~Combine `issues.indexerHolder` and `code.wrappedIndexer` to `internal.IndexHolder`.~ Remove it, use dummy indexer instead when the indexer is not ready. - Duplicate two copies of creating ES clients. - Duplicate two copies of `indexerID()`. ### Enhancement - [x] Support index version for elasticsearch issues indexer, the old index without version will be treated as version 0. - [x] Fix spell of `elastic_search/ElasticSearch`, it should be `Elasticsearch`. - [x] Improve versioning of ES index. We don't need `Aliases`: - Gitea does't need aliases for "Zero Downtime" because it never delete old indexes. - The old code of issues indexer uses the orignal name to create issue index, so it's tricky to convert it to an alias. - [x] Support index version for meilisearch issues indexer, the old index without version will be treated as version 0. - [x] Do "ping" only when `Ping` has been called, don't ping periodically and cache the status. - [x] Support the context parameter whenever possible. - [x] Fix outdated example config. - [x] Give up the requeue logic of issues indexer: When indexing fails, call Ping to check if it was caused by the engine being unavailable, and only requeue the task if the engine is unavailable. - It is fragile and tricky, could cause data losing (It did happen when I was doing some tests for this PR). And it works for ES only. - Just always requeue the failed task, if it caused by bad data, it's a bug of Gitea which should be fixed. --------- Co-authored-by: Giteabot <teabot@gitea.io>
11 月之前
Refactor indexer (#25174) Refactor `modules/indexer` to make it more maintainable. And it can be easier to support more features. I'm trying to solve some of issue searching, this is a precursor to making functional changes. Current supported engines and the index versions: | engines | issues | code | | - | - | - | | db | Just a wrapper for database queries, doesn't need version | - | | bleve | The version of index is **2** | The version of index is **6** | | elasticsearch | The old index has no version, will be treated as version **0** in this PR | The version of index is **1** | | meilisearch | The old index has no version, will be treated as version **0** in this PR | - | ## Changes ### Split Splited it into mutiple packages ```text indexer ├── internal │   ├── bleve │   ├── db │   ├── elasticsearch │   └── meilisearch ├── code │   ├── bleve │   ├── elasticsearch │   └── internal └── issues ├── bleve ├── db ├── elasticsearch ├── internal └── meilisearch ``` - `indexer/interanal`: Internal shared package for indexer. - `indexer/interanal/[engine]`: Internal shared package for each engine (bleve/db/elasticsearch/meilisearch). - `indexer/code`: Implementations for code indexer. - `indexer/code/internal`: Internal shared package for code indexer. - `indexer/code/[engine]`: Implementation via each engine for code indexer. - `indexer/issues`: Implementations for issues indexer. ### Deduplication - Combine `Init/Ping/Close` for code indexer and issues indexer. - ~Combine `issues.indexerHolder` and `code.wrappedIndexer` to `internal.IndexHolder`.~ Remove it, use dummy indexer instead when the indexer is not ready. - Duplicate two copies of creating ES clients. - Duplicate two copies of `indexerID()`. ### Enhancement - [x] Support index version for elasticsearch issues indexer, the old index without version will be treated as version 0. - [x] Fix spell of `elastic_search/ElasticSearch`, it should be `Elasticsearch`. - [x] Improve versioning of ES index. We don't need `Aliases`: - Gitea does't need aliases for "Zero Downtime" because it never delete old indexes. - The old code of issues indexer uses the orignal name to create issue index, so it's tricky to convert it to an alias. - [x] Support index version for meilisearch issues indexer, the old index without version will be treated as version 0. - [x] Do "ping" only when `Ping` has been called, don't ping periodically and cache the status. - [x] Support the context parameter whenever possible. - [x] Fix outdated example config. - [x] Give up the requeue logic of issues indexer: When indexing fails, call Ping to check if it was caused by the engine being unavailable, and only requeue the task if the engine is unavailable. - It is fragile and tricky, could cause data losing (It did happen when I was doing some tests for this PR). And it works for ES only. - Just always requeue the failed task, if it caused by bad data, it's a bug of Gitea which should be fixed. --------- Co-authored-by: Giteabot <teabot@gitea.io>
11 月之前
Rewrite queue (#24505) # ⚠️ Breaking Many deprecated queue config options are removed (actually, they should have been removed in 1.18/1.19). If you see the fatal message when starting Gitea: "Please update your app.ini to remove deprecated config options", please follow the error messages to remove these options from your app.ini. Example: ``` 2023/05/06 19:39:22 [E] Removed queue option: `[indexer].ISSUE_INDEXER_QUEUE_TYPE`. Use new options in `[queue.issue_indexer]` 2023/05/06 19:39:22 [E] Removed queue option: `[indexer].UPDATE_BUFFER_LEN`. Use new options in `[queue.issue_indexer]` 2023/05/06 19:39:22 [F] Please update your app.ini to remove deprecated config options ``` Many options in `[queue]` are are dropped, including: `WRAP_IF_NECESSARY`, `MAX_ATTEMPTS`, `TIMEOUT`, `WORKERS`, `BLOCK_TIMEOUT`, `BOOST_TIMEOUT`, `BOOST_WORKERS`, they can be removed from app.ini. # The problem The old queue package has some legacy problems: * complexity: I doubt few people could tell how it works. * maintainability: Too many channels and mutex/cond are mixed together, too many different structs/interfaces depends each other. * stability: due to the complexity & maintainability, sometimes there are strange bugs and difficult to debug, and some code doesn't have test (indeed some code is difficult to test because a lot of things are mixed together). * general applicability: although it is called "queue", its behavior is not a well-known queue. * scalability: it doesn't seem easy to make it work with a cluster without breaking its behaviors. It came from some very old code to "avoid breaking", however, its technical debt is too heavy now. It's a good time to introduce a better "queue" package. # The new queue package It keeps using old config and concept as much as possible. * It only contains two major kinds of concepts: * The "base queue": channel, levelqueue, redis * They have the same abstraction, the same interface, and they are tested by the same testing code. * The "WokerPoolQueue", it uses the "base queue" to provide "worker pool" function, calls the "handler" to process the data in the base queue. * The new code doesn't do "PushBack" * Think about a queue with many workers, the "PushBack" can't guarantee the order for re-queued unhandled items, so in new code it just does "normal push" * The new code doesn't do "pause/resume" * The "pause/resume" was designed to handle some handler's failure: eg: document indexer (elasticsearch) is down * If a queue is paused for long time, either the producers blocks or the new items are dropped. * The new code doesn't do such "pause/resume" trick, it's not a common queue's behavior and it doesn't help much. * If there are unhandled items, the "push" function just blocks for a few seconds and then re-queue them and retry. * The new code doesn't do "worker booster" * Gitea's queue's handlers are light functions, the cost is only the go-routine, so it doesn't make sense to "boost" them. * The new code only use "max worker number" to limit the concurrent workers. * The new "Push" never blocks forever * Instead of creating more and more blocking goroutines, return an error is more friendly to the server and to the end user. There are more details in code comments: eg: the "Flush" problem, the strange "code.index" hanging problem, the "immediate" queue problem. Almost ready for review. TODO: * [x] add some necessary comments during review * [x] add some more tests if necessary * [x] update documents and config options * [x] test max worker / active worker * [x] re-run the CI tasks to see whether any test is flaky * [x] improve the `handleOldLengthConfiguration` to provide more friendly messages * [x] fine tune default config values (eg: length?) ## Code coverage: ![image](https://user-images.githubusercontent.com/2114189/236620635-55576955-f95d-4810-b12f-879026a3afdf.png)
1 年之前
Add Package Registry (#16510) * Added package store settings. * Added models. * Added generic package registry. * Added tests. * Added NuGet package registry. * Moved service index to api file. * Added NPM package registry. * Added Maven package registry. * Added PyPI package registry. * Summary is deprecated. * Changed npm name. * Sanitize project url. * Allow only scoped packages. * Added user interface. * Changed method name. * Added missing migration file. * Set page info. * Added documentation. * Added documentation links. * Fixed wrong error message. * Lint template files. * Fixed merge errors. * Fixed unit test storage path. * Switch to json module. * Added suggestions. * Added package webhook. * Add package api. * Fixed swagger file. * Fixed enum and comments. * Fixed NuGet pagination. * Print test names. * Added api tests. * Fixed access level. * Fix User unmarshal. * Added RubyGems package registry. * Fix lint. * Implemented io.Writer. * Added support for sha256/sha512 checksum files. * Improved maven-metadata.xml support. * Added support for symbol package uploads. * Added tests. * Added overview docs. * Added npm dependencies and keywords. * Added no-packages information. * Display file size. * Display asset count. * Fixed filter alignment. * Added package icons. * Formatted instructions. * Allow anonymous package downloads. * Fixed comments. * Fixed postgres test. * Moved file. * Moved models to models/packages. * Use correct error response format per client. * Use simpler search form. * Fixed IsProd. * Restructured data model. * Prevent empty filename. * Fix swagger. * Implemented user/org registry. * Implemented UI. * Use GetUserByIDCtx. * Use table for dependencies. * make svg * Added support for unscoped npm packages. * Add support for npm dist tags. * Added tests for npm tags. * Unlink packages if repository gets deleted. * Prevent user/org delete if a packages exist. * Use package unlink in repository service. * Added support for composer packages. * Restructured package docs. * Added missing tests. * Fixed generic content page. * Fixed docs. * Fixed swagger. * Added missing type. * Fixed ambiguous column. * Organize content store by sha256 hash. * Added admin package management. * Added support for sorting. * Add support for multiple identical versions/files. * Added missing repository unlink. * Added file properties. * make fmt * lint * Added Conan package registry. * Updated docs. * Unify package names. * Added swagger enum. * Use longer TEXT column type. * Removed version composite key. * Merged package and container registry. * Removed index. * Use dedicated package router. * Moved files to new location. * Updated docs. * Fixed JOIN order. * Fixed GROUP BY statement. * Fixed GROUP BY #2. * Added symbol server support. * Added more tests. * Set NOT NULL. * Added setting to disable package registries. * Moved auth into service. * refactor * Use ctx everywhere. * Added package cleanup task. * Changed packages path. * Added container registry. * Refactoring * Updated comparison. * Fix swagger. * Fixed table order. * Use token auth for npm routes. * Enabled ReverseProxy auth. * Added packages link for orgs. * Fixed anonymous org access. * Enable copy button for setup instructions. * Merge error * Added suggestions. * Fixed merge. * Handle "generic". * Added link for TODO. * Added suggestions. * Changed temporary buffer filename. * Added suggestions. * Apply suggestions from code review Co-authored-by: Thomas Boerger <thomas@webhippie.de> * Update docs/content/doc/packages/nuget.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Thomas Boerger <thomas@webhippie.de>
2 年之前
User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133) * go.mod: add go-fed/{httpsig,activity/pub,activity/streams} dependency go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master * activitypub: implement /api/v1/activitypub/user/{username} (#14186) Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: add the public key to Person (#14186) Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: go-fed conformant Clock instance Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: signing http client Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: implement the ReqSignature middleware Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: hack_16834 Signed-off-by: Loïc Dachary <loic@dachary.org> * Fix CI checks-backend errors with go mod tidy Signed-off-by: Anthony Wang <ta180m@pm.me> * Change 2021 to 2022, properly format package imports Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt and make generate-swagger Signed-off-by: Anthony Wang <ta180m@pm.me> * Use Gitea JSON library, add assert for pkp Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt again, fix err var redeclaration Signed-off-by: Anthony Wang <ta180m@pm.me> * Remove LogSQL from ActivityPub person test Signed-off-by: Anthony Wang <ta180m@pm.me> * Assert if json.Unmarshal succeeds Signed-off-by: Anthony Wang <ta180m@pm.me> * Cleanup, handle invalid usernames for ActivityPub person GET request Signed-off-by: Anthony Wang <ta180m@pm.me> * Rename hack_16834 to user_settings Signed-off-by: Anthony Wang <ta180m@pm.me> * Use the httplib module instead of http for GET requests * Clean up whitespace with make fmt * Use time.RFC1123 and make the http.Client proxy-aware * Check if digest algo is supported in setting module * Clean up some variable declarations * Remove unneeded copy * Use system timezone instead of setting.DefaultUILocation * Use named constant for httpsigExpirationTime * Make pubKey IRI #main-key instead of /#main-key * Move /#main-key to #main-key in tests * Implemented Webfinger endpoint. * Add visible check. * Add user profile as alias. * Add actor IRI and remote interaction URL to WebFinger response * fmt * Fix lint errors * Use go-ap instead of go-fed * Run go mod tidy to fix missing modules in go.mod and go.sum * make fmt * Convert remaining code to go-ap * Clean up go.sum * Fix JSON unmarshall error * Fix CI errors by adding @context to Person() and making sure types match * Correctly decode JSON in api_activitypub_person_test.go * Force CI rerun * Fix TestActivityPubPersonInbox segfault * Fix lint error * Use @mariusor's suggestions for idiomatic go-ap usage * Correctly add inbox/outbox IRIs to person * Code cleanup * Remove another LogSQL from ActivityPub person test * Move httpsig algos slice to an init() function * Add actor IRI and remote interaction URL to WebFinger response * Update TestWebFinger to check for ActivityPub IRI in aliases * make fmt * Force CI rerun * WebFinger: Add CORS header and fix Href -> Template for remote interactions The CORS header is needed due to https://datatracker.ietf.org/doc/html/rfc7033#section-5 and fixes some Peertube <-> Gitea federation issues * make lint-backend * Make sure Person endpoint has Content-Type application/activity+json and includes PreferredUsername, URL, and Icon Setting the correct Content-Type is essential for federating with Mastodon * Use UTC instead of GMT * Rename pkey to pubKey * Make sure HTTP request Date in GMT * make fmt * dont drop err * Make sure API responses always refer to username in original case Copied from what I wrote on #19133 discussion: Handling username case is a very tricky issue and I've already encountered a Mastodon <-> Gitea federation bug due to Gitea considering Ta180m and ta180m to be the same user while Mastodon thinks they are two different users. I think the best way forward is for Gitea to only use the original case version of the username for federation so other AP software don't get confused. * Move httpsig algs constant slice to modules/setting/federation.go * Add new federation settings to app.example.ini and config-cheat-sheet * Return if marshalling error * Make sure Person IRIs are generated correctly This commit ensures that if the setting.AppURL is something like "http://127.0.0.1:42567" (like in the integration tests), a trailing slash will be added after that URL. * If httpsig verification fails, fix Host header and try again This fixes a very rare bug when Gitea and another AP server (confirmed to happen with Mastodon) are running on the same machine, Gitea fails to verify incoming HTTP signatures. This is because the other AP server creates the sig with the public Gitea domain as the Host. However, when Gitea receives the request, the Host header is instead localhost, so the signature verification fails. Manually changing the host header to the correct value and trying the veification again fixes the bug. * Revert "If httpsig verification fails, fix Host header and try again" This reverts commit f53e46c721a037c55facb9200106a6b491bf834c. The bug was actually caused by nginx messing up the Host header when reverse-proxying since I didn't have the line `proxy_set_header Host $host;` in my nginx config for Gitea. * Go back to using ap.IRI to generate inbox and outbox IRIs * use const for key values * Update routers/web/webfinger.go * Use ctx.JSON in Person response to make code cleaner * Revert "Use ctx.JSON in Person response to make code cleaner" This doesn't work because the ctx.JSON() function already sends the response out and it's too late to edit the headers. This reverts commit 95aad988975be3393c76094864ed6ba962157e0c. * Use activitypub.ActivityStreamsContentType for Person response Content Type * Limit maximum ActivityPub request and response sizes to a configurable setting * Move setting key constants to models/user/setting_keys.go * Fix failing ActivityPubPerson integration test by checking the correct field for username * Add a warning about changing settings that can break federation * Add better comments * Don't multiply Federation.MaxSize by 1<<20 twice * Add more better comments * Fix failing ActivityPubMissingPerson test We now use ctx.ContextUser so the message printed out when a user does not exist is slightly different * make generate-swagger For some reason I didn't realize that /templates/swagger/v1_json.tmpl was machine-generated by make generate-swagger... I've been editing it by hand for three months! 🤦 * Move getting the RFC 2616 time to a separate function * More code cleanup * Update go-ap to fix empty liked collection and removed unneeded HTTP headers * go mod tidy * Add ed25519 to httpsig algorithms * Use go-ap/jsonld to add @context and marshal JSON * Change Gitea user agent from the default to Gitea/Version * Use ctx.ServerError and remove all remote interaction code from webfinger.go
1 年之前
User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133) * go.mod: add go-fed/{httpsig,activity/pub,activity/streams} dependency go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master * activitypub: implement /api/v1/activitypub/user/{username} (#14186) Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: add the public key to Person (#14186) Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: go-fed conformant Clock instance Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: signing http client Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: implement the ReqSignature middleware Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: hack_16834 Signed-off-by: Loïc Dachary <loic@dachary.org> * Fix CI checks-backend errors with go mod tidy Signed-off-by: Anthony Wang <ta180m@pm.me> * Change 2021 to 2022, properly format package imports Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt and make generate-swagger Signed-off-by: Anthony Wang <ta180m@pm.me> * Use Gitea JSON library, add assert for pkp Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt again, fix err var redeclaration Signed-off-by: Anthony Wang <ta180m@pm.me> * Remove LogSQL from ActivityPub person test Signed-off-by: Anthony Wang <ta180m@pm.me> * Assert if json.Unmarshal succeeds Signed-off-by: Anthony Wang <ta180m@pm.me> * Cleanup, handle invalid usernames for ActivityPub person GET request Signed-off-by: Anthony Wang <ta180m@pm.me> * Rename hack_16834 to user_settings Signed-off-by: Anthony Wang <ta180m@pm.me> * Use the httplib module instead of http for GET requests * Clean up whitespace with make fmt * Use time.RFC1123 and make the http.Client proxy-aware * Check if digest algo is supported in setting module * Clean up some variable declarations * Remove unneeded copy * Use system timezone instead of setting.DefaultUILocation * Use named constant for httpsigExpirationTime * Make pubKey IRI #main-key instead of /#main-key * Move /#main-key to #main-key in tests * Implemented Webfinger endpoint. * Add visible check. * Add user profile as alias. * Add actor IRI and remote interaction URL to WebFinger response * fmt * Fix lint errors * Use go-ap instead of go-fed * Run go mod tidy to fix missing modules in go.mod and go.sum * make fmt * Convert remaining code to go-ap * Clean up go.sum * Fix JSON unmarshall error * Fix CI errors by adding @context to Person() and making sure types match * Correctly decode JSON in api_activitypub_person_test.go * Force CI rerun * Fix TestActivityPubPersonInbox segfault * Fix lint error * Use @mariusor's suggestions for idiomatic go-ap usage * Correctly add inbox/outbox IRIs to person * Code cleanup * Remove another LogSQL from ActivityPub person test * Move httpsig algos slice to an init() function * Add actor IRI and remote interaction URL to WebFinger response * Update TestWebFinger to check for ActivityPub IRI in aliases * make fmt * Force CI rerun * WebFinger: Add CORS header and fix Href -> Template for remote interactions The CORS header is needed due to https://datatracker.ietf.org/doc/html/rfc7033#section-5 and fixes some Peertube <-> Gitea federation issues * make lint-backend * Make sure Person endpoint has Content-Type application/activity+json and includes PreferredUsername, URL, and Icon Setting the correct Content-Type is essential for federating with Mastodon * Use UTC instead of GMT * Rename pkey to pubKey * Make sure HTTP request Date in GMT * make fmt * dont drop err * Make sure API responses always refer to username in original case Copied from what I wrote on #19133 discussion: Handling username case is a very tricky issue and I've already encountered a Mastodon <-> Gitea federation bug due to Gitea considering Ta180m and ta180m to be the same user while Mastodon thinks they are two different users. I think the best way forward is for Gitea to only use the original case version of the username for federation so other AP software don't get confused. * Move httpsig algs constant slice to modules/setting/federation.go * Add new federation settings to app.example.ini and config-cheat-sheet * Return if marshalling error * Make sure Person IRIs are generated correctly This commit ensures that if the setting.AppURL is something like "http://127.0.0.1:42567" (like in the integration tests), a trailing slash will be added after that URL. * If httpsig verification fails, fix Host header and try again This fixes a very rare bug when Gitea and another AP server (confirmed to happen with Mastodon) are running on the same machine, Gitea fails to verify incoming HTTP signatures. This is because the other AP server creates the sig with the public Gitea domain as the Host. However, when Gitea receives the request, the Host header is instead localhost, so the signature verification fails. Manually changing the host header to the correct value and trying the veification again fixes the bug. * Revert "If httpsig verification fails, fix Host header and try again" This reverts commit f53e46c721a037c55facb9200106a6b491bf834c. The bug was actually caused by nginx messing up the Host header when reverse-proxying since I didn't have the line `proxy_set_header Host $host;` in my nginx config for Gitea. * Go back to using ap.IRI to generate inbox and outbox IRIs * use const for key values * Update routers/web/webfinger.go * Use ctx.JSON in Person response to make code cleaner * Revert "Use ctx.JSON in Person response to make code cleaner" This doesn't work because the ctx.JSON() function already sends the response out and it's too late to edit the headers. This reverts commit 95aad988975be3393c76094864ed6ba962157e0c. * Use activitypub.ActivityStreamsContentType for Person response Content Type * Limit maximum ActivityPub request and response sizes to a configurable setting * Move setting key constants to models/user/setting_keys.go * Fix failing ActivityPubPerson integration test by checking the correct field for username * Add a warning about changing settings that can break federation * Add better comments * Don't multiply Federation.MaxSize by 1<<20 twice * Add more better comments * Fix failing ActivityPubMissingPerson test We now use ctx.ContextUser so the message printed out when a user does not exist is slightly different * make generate-swagger For some reason I didn't realize that /templates/swagger/v1_json.tmpl was machine-generated by make generate-swagger... I've been editing it by hand for three months! 🤦 * Move getting the RFC 2616 time to a separate function * More code cleanup * Update go-ap to fix empty liked collection and removed unneeded HTTP headers * go mod tidy * Add ed25519 to httpsig algorithms * Use go-ap/jsonld to add @context and marshal JSON * Change Gitea user agent from the default to Gitea/Version * Use ctx.ServerError and remove all remote interaction code from webfinger.go
1 年之前
User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133) * go.mod: add go-fed/{httpsig,activity/pub,activity/streams} dependency go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master * activitypub: implement /api/v1/activitypub/user/{username} (#14186) Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: add the public key to Person (#14186) Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: go-fed conformant Clock instance Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: signing http client Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: implement the ReqSignature middleware Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: hack_16834 Signed-off-by: Loïc Dachary <loic@dachary.org> * Fix CI checks-backend errors with go mod tidy Signed-off-by: Anthony Wang <ta180m@pm.me> * Change 2021 to 2022, properly format package imports Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt and make generate-swagger Signed-off-by: Anthony Wang <ta180m@pm.me> * Use Gitea JSON library, add assert for pkp Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt again, fix err var redeclaration Signed-off-by: Anthony Wang <ta180m@pm.me> * Remove LogSQL from ActivityPub person test Signed-off-by: Anthony Wang <ta180m@pm.me> * Assert if json.Unmarshal succeeds Signed-off-by: Anthony Wang <ta180m@pm.me> * Cleanup, handle invalid usernames for ActivityPub person GET request Signed-off-by: Anthony Wang <ta180m@pm.me> * Rename hack_16834 to user_settings Signed-off-by: Anthony Wang <ta180m@pm.me> * Use the httplib module instead of http for GET requests * Clean up whitespace with make fmt * Use time.RFC1123 and make the http.Client proxy-aware * Check if digest algo is supported in setting module * Clean up some variable declarations * Remove unneeded copy * Use system timezone instead of setting.DefaultUILocation * Use named constant for httpsigExpirationTime * Make pubKey IRI #main-key instead of /#main-key * Move /#main-key to #main-key in tests * Implemented Webfinger endpoint. * Add visible check. * Add user profile as alias. * Add actor IRI and remote interaction URL to WebFinger response * fmt * Fix lint errors * Use go-ap instead of go-fed * Run go mod tidy to fix missing modules in go.mod and go.sum * make fmt * Convert remaining code to go-ap * Clean up go.sum * Fix JSON unmarshall error * Fix CI errors by adding @context to Person() and making sure types match * Correctly decode JSON in api_activitypub_person_test.go * Force CI rerun * Fix TestActivityPubPersonInbox segfault * Fix lint error * Use @mariusor's suggestions for idiomatic go-ap usage * Correctly add inbox/outbox IRIs to person * Code cleanup * Remove another LogSQL from ActivityPub person test * Move httpsig algos slice to an init() function * Add actor IRI and remote interaction URL to WebFinger response * Update TestWebFinger to check for ActivityPub IRI in aliases * make fmt * Force CI rerun * WebFinger: Add CORS header and fix Href -> Template for remote interactions The CORS header is needed due to https://datatracker.ietf.org/doc/html/rfc7033#section-5 and fixes some Peertube <-> Gitea federation issues * make lint-backend * Make sure Person endpoint has Content-Type application/activity+json and includes PreferredUsername, URL, and Icon Setting the correct Content-Type is essential for federating with Mastodon * Use UTC instead of GMT * Rename pkey to pubKey * Make sure HTTP request Date in GMT * make fmt * dont drop err * Make sure API responses always refer to username in original case Copied from what I wrote on #19133 discussion: Handling username case is a very tricky issue and I've already encountered a Mastodon <-> Gitea federation bug due to Gitea considering Ta180m and ta180m to be the same user while Mastodon thinks they are two different users. I think the best way forward is for Gitea to only use the original case version of the username for federation so other AP software don't get confused. * Move httpsig algs constant slice to modules/setting/federation.go * Add new federation settings to app.example.ini and config-cheat-sheet * Return if marshalling error * Make sure Person IRIs are generated correctly This commit ensures that if the setting.AppURL is something like "http://127.0.0.1:42567" (like in the integration tests), a trailing slash will be added after that URL. * If httpsig verification fails, fix Host header and try again This fixes a very rare bug when Gitea and another AP server (confirmed to happen with Mastodon) are running on the same machine, Gitea fails to verify incoming HTTP signatures. This is because the other AP server creates the sig with the public Gitea domain as the Host. However, when Gitea receives the request, the Host header is instead localhost, so the signature verification fails. Manually changing the host header to the correct value and trying the veification again fixes the bug. * Revert "If httpsig verification fails, fix Host header and try again" This reverts commit f53e46c721a037c55facb9200106a6b491bf834c. The bug was actually caused by nginx messing up the Host header when reverse-proxying since I didn't have the line `proxy_set_header Host $host;` in my nginx config for Gitea. * Go back to using ap.IRI to generate inbox and outbox IRIs * use const for key values * Update routers/web/webfinger.go * Use ctx.JSON in Person response to make code cleaner * Revert "Use ctx.JSON in Person response to make code cleaner" This doesn't work because the ctx.JSON() function already sends the response out and it's too late to edit the headers. This reverts commit 95aad988975be3393c76094864ed6ba962157e0c. * Use activitypub.ActivityStreamsContentType for Person response Content Type * Limit maximum ActivityPub request and response sizes to a configurable setting * Move setting key constants to models/user/setting_keys.go * Fix failing ActivityPubPerson integration test by checking the correct field for username * Add a warning about changing settings that can break federation * Add better comments * Don't multiply Federation.MaxSize by 1<<20 twice * Add more better comments * Fix failing ActivityPubMissingPerson test We now use ctx.ContextUser so the message printed out when a user does not exist is slightly different * make generate-swagger For some reason I didn't realize that /templates/swagger/v1_json.tmpl was machine-generated by make generate-swagger... I've been editing it by hand for three months! 🤦 * Move getting the RFC 2616 time to a separate function * More code cleanup * Update go-ap to fix empty liked collection and removed unneeded HTTP headers * go mod tidy * Add ed25519 to httpsig algorithms * Use go-ap/jsonld to add @context and marshal JSON * Change Gitea user agent from the default to Gitea/Version * Use ctx.ServerError and remove all remote interaction code from webfinger.go
1 年之前
User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133) * go.mod: add go-fed/{httpsig,activity/pub,activity/streams} dependency go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master * activitypub: implement /api/v1/activitypub/user/{username} (#14186) Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: add the public key to Person (#14186) Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: go-fed conformant Clock instance Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: signing http client Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: implement the ReqSignature middleware Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: hack_16834 Signed-off-by: Loïc Dachary <loic@dachary.org> * Fix CI checks-backend errors with go mod tidy Signed-off-by: Anthony Wang <ta180m@pm.me> * Change 2021 to 2022, properly format package imports Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt and make generate-swagger Signed-off-by: Anthony Wang <ta180m@pm.me> * Use Gitea JSON library, add assert for pkp Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt again, fix err var redeclaration Signed-off-by: Anthony Wang <ta180m@pm.me> * Remove LogSQL from ActivityPub person test Signed-off-by: Anthony Wang <ta180m@pm.me> * Assert if json.Unmarshal succeeds Signed-off-by: Anthony Wang <ta180m@pm.me> * Cleanup, handle invalid usernames for ActivityPub person GET request Signed-off-by: Anthony Wang <ta180m@pm.me> * Rename hack_16834 to user_settings Signed-off-by: Anthony Wang <ta180m@pm.me> * Use the httplib module instead of http for GET requests * Clean up whitespace with make fmt * Use time.RFC1123 and make the http.Client proxy-aware * Check if digest algo is supported in setting module * Clean up some variable declarations * Remove unneeded copy * Use system timezone instead of setting.DefaultUILocation * Use named constant for httpsigExpirationTime * Make pubKey IRI #main-key instead of /#main-key * Move /#main-key to #main-key in tests * Implemented Webfinger endpoint. * Add visible check. * Add user profile as alias. * Add actor IRI and remote interaction URL to WebFinger response * fmt * Fix lint errors * Use go-ap instead of go-fed * Run go mod tidy to fix missing modules in go.mod and go.sum * make fmt * Convert remaining code to go-ap * Clean up go.sum * Fix JSON unmarshall error * Fix CI errors by adding @context to Person() and making sure types match * Correctly decode JSON in api_activitypub_person_test.go * Force CI rerun * Fix TestActivityPubPersonInbox segfault * Fix lint error * Use @mariusor's suggestions for idiomatic go-ap usage * Correctly add inbox/outbox IRIs to person * Code cleanup * Remove another LogSQL from ActivityPub person test * Move httpsig algos slice to an init() function * Add actor IRI and remote interaction URL to WebFinger response * Update TestWebFinger to check for ActivityPub IRI in aliases * make fmt * Force CI rerun * WebFinger: Add CORS header and fix Href -> Template for remote interactions The CORS header is needed due to https://datatracker.ietf.org/doc/html/rfc7033#section-5 and fixes some Peertube <-> Gitea federation issues * make lint-backend * Make sure Person endpoint has Content-Type application/activity+json and includes PreferredUsername, URL, and Icon Setting the correct Content-Type is essential for federating with Mastodon * Use UTC instead of GMT * Rename pkey to pubKey * Make sure HTTP request Date in GMT * make fmt * dont drop err * Make sure API responses always refer to username in original case Copied from what I wrote on #19133 discussion: Handling username case is a very tricky issue and I've already encountered a Mastodon <-> Gitea federation bug due to Gitea considering Ta180m and ta180m to be the same user while Mastodon thinks they are two different users. I think the best way forward is for Gitea to only use the original case version of the username for federation so other AP software don't get confused. * Move httpsig algs constant slice to modules/setting/federation.go * Add new federation settings to app.example.ini and config-cheat-sheet * Return if marshalling error * Make sure Person IRIs are generated correctly This commit ensures that if the setting.AppURL is something like "http://127.0.0.1:42567" (like in the integration tests), a trailing slash will be added after that URL. * If httpsig verification fails, fix Host header and try again This fixes a very rare bug when Gitea and another AP server (confirmed to happen with Mastodon) are running on the same machine, Gitea fails to verify incoming HTTP signatures. This is because the other AP server creates the sig with the public Gitea domain as the Host. However, when Gitea receives the request, the Host header is instead localhost, so the signature verification fails. Manually changing the host header to the correct value and trying the veification again fixes the bug. * Revert "If httpsig verification fails, fix Host header and try again" This reverts commit f53e46c721a037c55facb9200106a6b491bf834c. The bug was actually caused by nginx messing up the Host header when reverse-proxying since I didn't have the line `proxy_set_header Host $host;` in my nginx config for Gitea. * Go back to using ap.IRI to generate inbox and outbox IRIs * use const for key values * Update routers/web/webfinger.go * Use ctx.JSON in Person response to make code cleaner * Revert "Use ctx.JSON in Person response to make code cleaner" This doesn't work because the ctx.JSON() function already sends the response out and it's too late to edit the headers. This reverts commit 95aad988975be3393c76094864ed6ba962157e0c. * Use activitypub.ActivityStreamsContentType for Person response Content Type * Limit maximum ActivityPub request and response sizes to a configurable setting * Move setting key constants to models/user/setting_keys.go * Fix failing ActivityPubPerson integration test by checking the correct field for username * Add a warning about changing settings that can break federation * Add better comments * Don't multiply Federation.MaxSize by 1<<20 twice * Add more better comments * Fix failing ActivityPubMissingPerson test We now use ctx.ContextUser so the message printed out when a user does not exist is slightly different * make generate-swagger For some reason I didn't realize that /templates/swagger/v1_json.tmpl was machine-generated by make generate-swagger... I've been editing it by hand for three months! 🤦 * Move getting the RFC 2616 time to a separate function * More code cleanup * Update go-ap to fix empty liked collection and removed unneeded HTTP headers * go mod tidy * Add ed25519 to httpsig algorithms * Use go-ap/jsonld to add @context and marshal JSON * Change Gitea user agent from the default to Gitea/Version * Use ctx.ServerError and remove all remote interaction code from webfinger.go
1 年之前
User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133) * go.mod: add go-fed/{httpsig,activity/pub,activity/streams} dependency go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master * activitypub: implement /api/v1/activitypub/user/{username} (#14186) Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: add the public key to Person (#14186) Refs: https://github.com/go-gitea/gitea/issues/14186 Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: go-fed conformant Clock instance Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: signing http client Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: implement the ReqSignature middleware Signed-off-by: Loïc Dachary <loic@dachary.org> * activitypub: hack_16834 Signed-off-by: Loïc Dachary <loic@dachary.org> * Fix CI checks-backend errors with go mod tidy Signed-off-by: Anthony Wang <ta180m@pm.me> * Change 2021 to 2022, properly format package imports Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt and make generate-swagger Signed-off-by: Anthony Wang <ta180m@pm.me> * Use Gitea JSON library, add assert for pkp Signed-off-by: Anthony Wang <ta180m@pm.me> * Run make fmt again, fix err var redeclaration Signed-off-by: Anthony Wang <ta180m@pm.me> * Remove LogSQL from ActivityPub person test Signed-off-by: Anthony Wang <ta180m@pm.me> * Assert if json.Unmarshal succeeds Signed-off-by: Anthony Wang <ta180m@pm.me> * Cleanup, handle invalid usernames for ActivityPub person GET request Signed-off-by: Anthony Wang <ta180m@pm.me> * Rename hack_16834 to user_settings Signed-off-by: Anthony Wang <ta180m@pm.me> * Use the httplib module instead of http for GET requests * Clean up whitespace with make fmt * Use time.RFC1123 and make the http.Client proxy-aware * Check if digest algo is supported in setting module * Clean up some variable declarations * Remove unneeded copy * Use system timezone instead of setting.DefaultUILocation * Use named constant for httpsigExpirationTime * Make pubKey IRI #main-key instead of /#main-key * Move /#main-key to #main-key in tests * Implemented Webfinger endpoint. * Add visible check. * Add user profile as alias. * Add actor IRI and remote interaction URL to WebFinger response * fmt * Fix lint errors * Use go-ap instead of go-fed * Run go mod tidy to fix missing modules in go.mod and go.sum * make fmt * Convert remaining code to go-ap * Clean up go.sum * Fix JSON unmarshall error * Fix CI errors by adding @context to Person() and making sure types match * Correctly decode JSON in api_activitypub_person_test.go * Force CI rerun * Fix TestActivityPubPersonInbox segfault * Fix lint error * Use @mariusor's suggestions for idiomatic go-ap usage * Correctly add inbox/outbox IRIs to person * Code cleanup * Remove another LogSQL from ActivityPub person test * Move httpsig algos slice to an init() function * Add actor IRI and remote interaction URL to WebFinger response * Update TestWebFinger to check for ActivityPub IRI in aliases * make fmt * Force CI rerun * WebFinger: Add CORS header and fix Href -> Template for remote interactions The CORS header is needed due to https://datatracker.ietf.org/doc/html/rfc7033#section-5 and fixes some Peertube <-> Gitea federation issues * make lint-backend * Make sure Person endpoint has Content-Type application/activity+json and includes PreferredUsername, URL, and Icon Setting the correct Content-Type is essential for federating with Mastodon * Use UTC instead of GMT * Rename pkey to pubKey * Make sure HTTP request Date in GMT * make fmt * dont drop err * Make sure API responses always refer to username in original case Copied from what I wrote on #19133 discussion: Handling username case is a very tricky issue and I've already encountered a Mastodon <-> Gitea federation bug due to Gitea considering Ta180m and ta180m to be the same user while Mastodon thinks they are two different users. I think the best way forward is for Gitea to only use the original case version of the username for federation so other AP software don't get confused. * Move httpsig algs constant slice to modules/setting/federation.go * Add new federation settings to app.example.ini and config-cheat-sheet * Return if marshalling error * Make sure Person IRIs are generated correctly This commit ensures that if the setting.AppURL is something like "http://127.0.0.1:42567" (like in the integration tests), a trailing slash will be added after that URL. * If httpsig verification fails, fix Host header and try again This fixes a very rare bug when Gitea and another AP server (confirmed to happen with Mastodon) are running on the same machine, Gitea fails to verify incoming HTTP signatures. This is because the other AP server creates the sig with the public Gitea domain as the Host. However, when Gitea receives the request, the Host header is instead localhost, so the signature verification fails. Manually changing the host header to the correct value and trying the veification again fixes the bug. * Revert "If httpsig verification fails, fix Host header and try again" This reverts commit f53e46c721a037c55facb9200106a6b491bf834c. The bug was actually caused by nginx messing up the Host header when reverse-proxying since I didn't have the line `proxy_set_header Host $host;` in my nginx config for Gitea. * Go back to using ap.IRI to generate inbox and outbox IRIs * use const for key values * Update routers/web/webfinger.go * Use ctx.JSON in Person response to make code cleaner * Revert "Use ctx.JSON in Person response to make code cleaner" This doesn't work because the ctx.JSON() function already sends the response out and it's too late to edit the headers. This reverts commit 95aad988975be3393c76094864ed6ba962157e0c. * Use activitypub.ActivityStreamsContentType for Person response Content Type * Limit maximum ActivityPub request and response sizes to a configurable setting * Move setting key constants to models/user/setting_keys.go * Fix failing ActivityPubPerson integration test by checking the correct field for username * Add a warning about changing settings that can break federation * Add better comments * Don't multiply Federation.MaxSize by 1<<20 twice * Add more better comments * Fix failing ActivityPubMissingPerson test We now use ctx.ContextUser so the message printed out when a user does not exist is slightly different * make generate-swagger For some reason I didn't realize that /templates/swagger/v1_json.tmpl was machine-generated by make generate-swagger... I've been editing it by hand for three months! 🤦 * Move getting the RFC 2616 time to a separate function * More code cleanup * Update go-ap to fix empty liked collection and removed unneeded HTTP headers * go mod tidy * Add ed25519 to httpsig algorithms * Use go-ap/jsonld to add @context and marshal JSON * Change Gitea user agent from the default to Gitea/Version * Use ctx.ServerError and remove all remote interaction code from webfinger.go
1 年之前
Add Package Registry (#16510) * Added package store settings. * Added models. * Added generic package registry. * Added tests. * Added NuGet package registry. * Moved service index to api file. * Added NPM package registry. * Added Maven package registry. * Added PyPI package registry. * Summary is deprecated. * Changed npm name. * Sanitize project url. * Allow only scoped packages. * Added user interface. * Changed method name. * Added missing migration file. * Set page info. * Added documentation. * Added documentation links. * Fixed wrong error message. * Lint template files. * Fixed merge errors. * Fixed unit test storage path. * Switch to json module. * Added suggestions. * Added package webhook. * Add package api. * Fixed swagger file. * Fixed enum and comments. * Fixed NuGet pagination. * Print test names. * Added api tests. * Fixed access level. * Fix User unmarshal. * Added RubyGems package registry. * Fix lint. * Implemented io.Writer. * Added support for sha256/sha512 checksum files. * Improved maven-metadata.xml support. * Added support for symbol package uploads. * Added tests. * Added overview docs. * Added npm dependencies and keywords. * Added no-packages information. * Display file size. * Display asset count. * Fixed filter alignment. * Added package icons. * Formatted instructions. * Allow anonymous package downloads. * Fixed comments. * Fixed postgres test. * Moved file. * Moved models to models/packages. * Use correct error response format per client. * Use simpler search form. * Fixed IsProd. * Restructured data model. * Prevent empty filename. * Fix swagger. * Implemented user/org registry. * Implemented UI. * Use GetUserByIDCtx. * Use table for dependencies. * make svg * Added support for unscoped npm packages. * Add support for npm dist tags. * Added tests for npm tags. * Unlink packages if repository gets deleted. * Prevent user/org delete if a packages exist. * Use package unlink in repository service. * Added support for composer packages. * Restructured package docs. * Added missing tests. * Fixed generic content page. * Fixed docs. * Fixed swagger. * Added missing type. * Fixed ambiguous column. * Organize content store by sha256 hash. * Added admin package management. * Added support for sorting. * Add support for multiple identical versions/files. * Added missing repository unlink. * Added file properties. * make fmt * lint * Added Conan package registry. * Updated docs. * Unify package names. * Added swagger enum. * Use longer TEXT column type. * Removed version composite key. * Merged package and container registry. * Removed index. * Use dedicated package router. * Moved files to new location. * Updated docs. * Fixed JOIN order. * Fixed GROUP BY statement. * Fixed GROUP BY #2. * Added symbol server support. * Added more tests. * Set NOT NULL. * Added setting to disable package registries. * Moved auth into service. * refactor * Use ctx everywhere. * Added package cleanup task. * Changed packages path. * Added container registry. * Refactoring * Updated comparison. * Fix swagger. * Fixed table order. * Use token auth for npm routes. * Enabled ReverseProxy auth. * Added packages link for orgs. * Fixed anonymous org access. * Enable copy button for setup instructions. * Merge error * Added suggestions. * Fixed merge. * Handle "generic". * Added link for TODO. * Added suggestions. * Changed temporary buffer filename. * Added suggestions. * Apply suggestions from code review Co-authored-by: Thomas Boerger <thomas@webhippie.de> * Update docs/content/doc/packages/nuget.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Thomas Boerger <thomas@webhippie.de>
2 年之前
Add Package Registry (#16510) * Added package store settings. * Added models. * Added generic package registry. * Added tests. * Added NuGet package registry. * Moved service index to api file. * Added NPM package registry. * Added Maven package registry. * Added PyPI package registry. * Summary is deprecated. * Changed npm name. * Sanitize project url. * Allow only scoped packages. * Added user interface. * Changed method name. * Added missing migration file. * Set page info. * Added documentation. * Added documentation links. * Fixed wrong error message. * Lint template files. * Fixed merge errors. * Fixed unit test storage path. * Switch to json module. * Added suggestions. * Added package webhook. * Add package api. * Fixed swagger file. * Fixed enum and comments. * Fixed NuGet pagination. * Print test names. * Added api tests. * Fixed access level. * Fix User unmarshal. * Added RubyGems package registry. * Fix lint. * Implemented io.Writer. * Added support for sha256/sha512 checksum files. * Improved maven-metadata.xml support. * Added support for symbol package uploads. * Added tests. * Added overview docs. * Added npm dependencies and keywords. * Added no-packages information. * Display file size. * Display asset count. * Fixed filter alignment. * Added package icons. * Formatted instructions. * Allow anonymous package downloads. * Fixed comments. * Fixed postgres test. * Moved file. * Moved models to models/packages. * Use correct error response format per client. * Use simpler search form. * Fixed IsProd. * Restructured data model. * Prevent empty filename. * Fix swagger. * Implemented user/org registry. * Implemented UI. * Use GetUserByIDCtx. * Use table for dependencies. * make svg * Added support for unscoped npm packages. * Add support for npm dist tags. * Added tests for npm tags. * Unlink packages if repository gets deleted. * Prevent user/org delete if a packages exist. * Use package unlink in repository service. * Added support for composer packages. * Restructured package docs. * Added missing tests. * Fixed generic content page. * Fixed docs. * Fixed swagger. * Added missing type. * Fixed ambiguous column. * Organize content store by sha256 hash. * Added admin package management. * Added support for sorting. * Add support for multiple identical versions/files. * Added missing repository unlink. * Added file properties. * make fmt * lint * Added Conan package registry. * Updated docs. * Unify package names. * Added swagger enum. * Use longer TEXT column type. * Removed version composite key. * Merged package and container registry. * Removed index. * Use dedicated package router. * Moved files to new location. * Updated docs. * Fixed JOIN order. * Fixed GROUP BY statement. * Fixed GROUP BY #2. * Added symbol server support. * Added more tests. * Set NOT NULL. * Added setting to disable package registries. * Moved auth into service. * refactor * Use ctx everywhere. * Added package cleanup task. * Changed packages path. * Added container registry. * Refactoring * Updated comparison. * Fix swagger. * Fixed table order. * Use token auth for npm routes. * Enabled ReverseProxy auth. * Added packages link for orgs. * Fixed anonymous org access. * Enable copy button for setup instructions. * Merge error * Added suggestions. * Fixed merge. * Handle "generic". * Added link for TODO. * Added suggestions. * Changed temporary buffer filename. * Added suggestions. * Apply suggestions from code review Co-authored-by: Thomas Boerger <thomas@webhippie.de> * Update docs/content/doc/packages/nuget.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Thomas Boerger <thomas@webhippie.de>
2 年之前
Add Package Registry (#16510) * Added package store settings. * Added models. * Added generic package registry. * Added tests. * Added NuGet package registry. * Moved service index to api file. * Added NPM package registry. * Added Maven package registry. * Added PyPI package registry. * Summary is deprecated. * Changed npm name. * Sanitize project url. * Allow only scoped packages. * Added user interface. * Changed method name. * Added missing migration file. * Set page info. * Added documentation. * Added documentation links. * Fixed wrong error message. * Lint template files. * Fixed merge errors. * Fixed unit test storage path. * Switch to json module. * Added suggestions. * Added package webhook. * Add package api. * Fixed swagger file. * Fixed enum and comments. * Fixed NuGet pagination. * Print test names. * Added api tests. * Fixed access level. * Fix User unmarshal. * Added RubyGems package registry. * Fix lint. * Implemented io.Writer. * Added support for sha256/sha512 checksum files. * Improved maven-metadata.xml support. * Added support for symbol package uploads. * Added tests. * Added overview docs. * Added npm dependencies and keywords. * Added no-packages information. * Display file size. * Display asset count. * Fixed filter alignment. * Added package icons. * Formatted instructions. * Allow anonymous package downloads. * Fixed comments. * Fixed postgres test. * Moved file. * Moved models to models/packages. * Use correct error response format per client. * Use simpler search form. * Fixed IsProd. * Restructured data model. * Prevent empty filename. * Fix swagger. * Implemented user/org registry. * Implemented UI. * Use GetUserByIDCtx. * Use table for dependencies. * make svg * Added support for unscoped npm packages. * Add support for npm dist tags. * Added tests for npm tags. * Unlink packages if repository gets deleted. * Prevent user/org delete if a packages exist. * Use package unlink in repository service. * Added support for composer packages. * Restructured package docs. * Added missing tests. * Fixed generic content page. * Fixed docs. * Fixed swagger. * Added missing type. * Fixed ambiguous column. * Organize content store by sha256 hash. * Added admin package management. * Added support for sorting. * Add support for multiple identical versions/files. * Added missing repository unlink. * Added file properties. * make fmt * lint * Added Conan package registry. * Updated docs. * Unify package names. * Added swagger enum. * Use longer TEXT column type. * Removed version composite key. * Merged package and container registry. * Removed index. * Use dedicated package router. * Moved files to new location. * Updated docs. * Fixed JOIN order. * Fixed GROUP BY statement. * Fixed GROUP BY #2. * Added symbol server support. * Added more tests. * Set NOT NULL. * Added setting to disable package registries. * Moved auth into service. * refactor * Use ctx everywhere. * Added package cleanup task. * Changed packages path. * Added container registry. * Refactoring * Updated comparison. * Fix swagger. * Fixed table order. * Use token auth for npm routes. * Enabled ReverseProxy auth. * Added packages link for orgs. * Fixed anonymous org access. * Enable copy button for setup instructions. * Merge error * Added suggestions. * Fixed merge. * Handle "generic". * Added link for TODO. * Added suggestions. * Changed temporary buffer filename. * Added suggestions. * Apply suggestions from code review Co-authored-by: Thomas Boerger <thomas@webhippie.de> * Update docs/content/doc/packages/nuget.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Thomas Boerger <thomas@webhippie.de>
2 年之前
Add Package Registry (#16510) * Added package store settings. * Added models. * Added generic package registry. * Added tests. * Added NuGet package registry. * Moved service index to api file. * Added NPM package registry. * Added Maven package registry. * Added PyPI package registry. * Summary is deprecated. * Changed npm name. * Sanitize project url. * Allow only scoped packages. * Added user interface. * Changed method name. * Added missing migration file. * Set page info. * Added documentation. * Added documentation links. * Fixed wrong error message. * Lint template files. * Fixed merge errors. * Fixed unit test storage path. * Switch to json module. * Added suggestions. * Added package webhook. * Add package api. * Fixed swagger file. * Fixed enum and comments. * Fixed NuGet pagination. * Print test names. * Added api tests. * Fixed access level. * Fix User unmarshal. * Added RubyGems package registry. * Fix lint. * Implemented io.Writer. * Added support for sha256/sha512 checksum files. * Improved maven-metadata.xml support. * Added support for symbol package uploads. * Added tests. * Added overview docs. * Added npm dependencies and keywords. * Added no-packages information. * Display file size. * Display asset count. * Fixed filter alignment. * Added package icons. * Formatted instructions. * Allow anonymous package downloads. * Fixed comments. * Fixed postgres test. * Moved file. * Moved models to models/packages. * Use correct error response format per client. * Use simpler search form. * Fixed IsProd. * Restructured data model. * Prevent empty filename. * Fix swagger. * Implemented user/org registry. * Implemented UI. * Use GetUserByIDCtx. * Use table for dependencies. * make svg * Added support for unscoped npm packages. * Add support for npm dist tags. * Added tests for npm tags. * Unlink packages if repository gets deleted. * Prevent user/org delete if a packages exist. * Use package unlink in repository service. * Added support for composer packages. * Restructured package docs. * Added missing tests. * Fixed generic content page. * Fixed docs. * Fixed swagger. * Added missing type. * Fixed ambiguous column. * Organize content store by sha256 hash. * Added admin package management. * Added support for sorting. * Add support for multiple identical versions/files. * Added missing repository unlink. * Added file properties. * make fmt * lint * Added Conan package registry. * Updated docs. * Unify package names. * Added swagger enum. * Use longer TEXT column type. * Removed version composite key. * Merged package and container registry. * Removed index. * Use dedicated package router. * Moved files to new location. * Updated docs. * Fixed JOIN order. * Fixed GROUP BY statement. * Fixed GROUP BY #2. * Added symbol server support. * Added more tests. * Set NOT NULL. * Added setting to disable package registries. * Moved auth into service. * refactor * Use ctx everywhere. * Added package cleanup task. * Changed packages path. * Added container registry. * Refactoring * Updated comparison. * Fix swagger. * Fixed table order. * Use token auth for npm routes. * Enabled ReverseProxy auth. * Added packages link for orgs. * Fixed anonymous org access. * Enable copy button for setup instructions. * Merge error * Added suggestions. * Fixed merge. * Handle "generic". * Added link for TODO. * Added suggestions. * Changed temporary buffer filename. * Added suggestions. * Apply suggestions from code review Co-authored-by: Thomas Boerger <thomas@webhippie.de> * Update docs/content/doc/packages/nuget.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Thomas Boerger <thomas@webhippie.de>
2 年之前
Implement actions (#21937) Close #13539. Co-authored by: @lunny @appleboy @fuxiaohei and others. Related projects: - https://gitea.com/gitea/actions-proto-def - https://gitea.com/gitea/actions-proto-go - https://gitea.com/gitea/act - https://gitea.com/gitea/act_runner ### Summary The target of this PR is to bring a basic implementation of "Actions", an internal CI/CD system of Gitea. That means even though it has been merged, the state of the feature is **EXPERIMENTAL**, and please note that: - It is disabled by default; - It shouldn't be used in a production environment currently; - It shouldn't be used in a public Gitea instance currently; - Breaking changes may be made before it's stable. **Please comment on #13539 if you have any different product design ideas**, all decisions reached there will be adopted here. But in this PR, we don't talk about **naming, feature-creep or alternatives**. ### ⚠️ Breaking `gitea-actions` will become a reserved user name. If a user with the name already exists in the database, it is recommended to rename it. ### Some important reviews - What is `DEFAULT_ACTIONS_URL` in `app.ini` for? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1055954954 - Why the api for runners is not under the normal `/api/v1` prefix? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1061173592 - Why DBFS? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1061301178 - Why ignore events triggered by `gitea-actions` bot? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1063254103 - Why there's no permission control for actions? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1090229868 ### What it looks like <details> #### Manage runners <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205870657-c72f590e-2e08-4cd4-be7f-2e0abb299bbf.png"> #### List runs <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205872794-50fde990-2b45-48c1-a178-908e4ec5b627.png"> #### View logs <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205872501-9b7b9000-9542-4991-8f55-18ccdada77c3.png"> </details> ### How to try it <details> #### 1. Start Gitea Clone this branch and [install from source](https://docs.gitea.io/en-us/install-from-source). Add additional configurations in `app.ini` to enable Actions: ```ini [actions] ENABLED = true ``` Start it. If all is well, you'll see the management page of runners: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205877365-8e30a780-9b10-4154-b3e8-ee6c3cb35a59.png"> #### 2. Start runner Clone the [act_runner](https://gitea.com/gitea/act_runner), and follow the [README](https://gitea.com/gitea/act_runner/src/branch/main/README.md) to start it. If all is well, you'll see a new runner has been added: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205878000-216f5937-e696-470d-b66c-8473987d91c3.png"> #### 3. Enable actions for a repo Create a new repo or open an existing one, check the `Actions` checkbox in settings and submit. <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205879705-53e09208-73c0-4b3e-a123-2dcf9aba4b9c.png"> <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205879383-23f3d08f-1a85-41dd-a8b3-54e2ee6453e8.png"> If all is well, you'll see a new tab "Actions": <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205881648-a8072d8c-5803-4d76-b8a8-9b2fb49516c1.png"> #### 4. Upload workflow files Upload some workflow files to `.gitea/workflows/xxx.yaml`, you can follow the [quickstart](https://docs.github.com/en/actions/quickstart) of GitHub Actions. Yes, Gitea Actions is compatible with GitHub Actions in most cases, you can use the same demo: ```yaml name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v3 - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." ``` If all is well, you'll see a new run in `Actions` tab: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205884473-79a874bc-171b-4aaf-acd5-0241a45c3b53.png"> #### 5. Check the logs of jobs Click a run and you'll see the logs: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205884800-994b0374-67f7-48ff-be9a-4c53f3141547.png"> #### 6. Go on You can try more examples in [the documents](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions) of GitHub Actions, then you might find a lot of bugs. Come on, PRs are welcome. </details> See also: [Feature Preview: Gitea Actions](https://blog.gitea.io/2022/12/feature-preview-gitea-actions/) --------- Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: ChristopherHX <christopher.homberger@web.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
1 年之前
Implement actions (#21937) Close #13539. Co-authored by: @lunny @appleboy @fuxiaohei and others. Related projects: - https://gitea.com/gitea/actions-proto-def - https://gitea.com/gitea/actions-proto-go - https://gitea.com/gitea/act - https://gitea.com/gitea/act_runner ### Summary The target of this PR is to bring a basic implementation of "Actions", an internal CI/CD system of Gitea. That means even though it has been merged, the state of the feature is **EXPERIMENTAL**, and please note that: - It is disabled by default; - It shouldn't be used in a production environment currently; - It shouldn't be used in a public Gitea instance currently; - Breaking changes may be made before it's stable. **Please comment on #13539 if you have any different product design ideas**, all decisions reached there will be adopted here. But in this PR, we don't talk about **naming, feature-creep or alternatives**. ### ⚠️ Breaking `gitea-actions` will become a reserved user name. If a user with the name already exists in the database, it is recommended to rename it. ### Some important reviews - What is `DEFAULT_ACTIONS_URL` in `app.ini` for? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1055954954 - Why the api for runners is not under the normal `/api/v1` prefix? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1061173592 - Why DBFS? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1061301178 - Why ignore events triggered by `gitea-actions` bot? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1063254103 - Why there's no permission control for actions? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1090229868 ### What it looks like <details> #### Manage runners <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205870657-c72f590e-2e08-4cd4-be7f-2e0abb299bbf.png"> #### List runs <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205872794-50fde990-2b45-48c1-a178-908e4ec5b627.png"> #### View logs <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205872501-9b7b9000-9542-4991-8f55-18ccdada77c3.png"> </details> ### How to try it <details> #### 1. Start Gitea Clone this branch and [install from source](https://docs.gitea.io/en-us/install-from-source). Add additional configurations in `app.ini` to enable Actions: ```ini [actions] ENABLED = true ``` Start it. If all is well, you'll see the management page of runners: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205877365-8e30a780-9b10-4154-b3e8-ee6c3cb35a59.png"> #### 2. Start runner Clone the [act_runner](https://gitea.com/gitea/act_runner), and follow the [README](https://gitea.com/gitea/act_runner/src/branch/main/README.md) to start it. If all is well, you'll see a new runner has been added: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205878000-216f5937-e696-470d-b66c-8473987d91c3.png"> #### 3. Enable actions for a repo Create a new repo or open an existing one, check the `Actions` checkbox in settings and submit. <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205879705-53e09208-73c0-4b3e-a123-2dcf9aba4b9c.png"> <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205879383-23f3d08f-1a85-41dd-a8b3-54e2ee6453e8.png"> If all is well, you'll see a new tab "Actions": <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205881648-a8072d8c-5803-4d76-b8a8-9b2fb49516c1.png"> #### 4. Upload workflow files Upload some workflow files to `.gitea/workflows/xxx.yaml`, you can follow the [quickstart](https://docs.github.com/en/actions/quickstart) of GitHub Actions. Yes, Gitea Actions is compatible with GitHub Actions in most cases, you can use the same demo: ```yaml name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v3 - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." ``` If all is well, you'll see a new run in `Actions` tab: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205884473-79a874bc-171b-4aaf-acd5-0241a45c3b53.png"> #### 5. Check the logs of jobs Click a run and you'll see the logs: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205884800-994b0374-67f7-48ff-be9a-4c53f3141547.png"> #### 6. Go on You can try more examples in [the documents](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions) of GitHub Actions, then you might find a lot of bugs. Come on, PRs are welcome. </details> See also: [Feature Preview: Gitea Actions](https://blog.gitea.io/2022/12/feature-preview-gitea-actions/) --------- Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: ChristopherHX <christopher.homberger@web.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
1 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622
  1. ; This file lists the default values used by Gitea
  2. ;; Copy required sections to your own app.ini (default is custom/conf/app.ini)
  3. ;; and modify as needed.
  4. ;; Do not copy the whole file as-is, as it contains some invalid sections for illustrative purposes.
  5. ;; If you don't know what a setting is you should not set it.
  6. ;;
  7. ;; see https://docs.gitea.com/administration/config-cheat-sheet for additional documentation.
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9. ;; Default Configuration (non-`app.ini` configuration)
  10. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  11. ;;
  12. ;; These values are environment-dependent but form the basis of a lot of values. They will be
  13. ;; reported as part of the default configuration when running `gitea help` or on start-up. The order they are emitted there is slightly different but we will list them here in the order they are set-up.
  14. ;;
  15. ;; - _`AppPath`_: This is the absolute path of the running gitea binary.
  16. ;; - _`AppWorkPath`_: This refers to "working path" of the `gitea` binary. It is determined by using the first set thing in the following hierarchy:
  17. ;; - The "WORK_PATH" option in "app.ini" file
  18. ;; - The `--work-path` flag passed to the binary
  19. ;; - The environment variable `$GITEA_WORK_DIR`
  20. ;; - A built-in value set at build time (see building from source)
  21. ;; - Otherwise it defaults to the directory of the _`AppPath`_
  22. ;; - If any of the above are relative paths then they are made absolute against the directory of the _`AppPath`_
  23. ;; - _`CustomPath`_: This is the base directory for custom templates and other options. It is determined by using the first set thing in the following hierarchy:
  24. ;; - The `--custom-path` flag passed to the binary
  25. ;; - The environment variable `$GITEA_CUSTOM`
  26. ;; - A built-in value set at build time (see building from source)
  27. ;; - Otherwise it defaults to _`AppWorkPath`_`/custom`
  28. ;; - If any of the above are relative paths then they are made absolute against the directory of the _`AppWorkPath`_
  29. ;; - _`CustomConf`_: This is the path to the `app.ini` file.
  30. ;; - The `--config` flag passed to the binary
  31. ;; - A built-in value set at build time (see building from source)
  32. ;; - Otherwise it defaults to _`CustomPath`_`/conf/app.ini`
  33. ;; - If any of the above are relative paths then they are made absolute against the directory of the _`CustomPath`_
  34. ;;
  35. ;; In addition there is _`StaticRootPath`_ which can be set as a built-in at build time, but will otherwise default to _`AppWorkPath`_
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37. ;; General Settings
  38. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  39. ;;
  40. ;; App name that shows in every page title
  41. APP_NAME = ; Gitea: Git with a cup of tea
  42. ;;
  43. ;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally
  44. RUN_USER = ; git
  45. ;;
  46. ;; Application run mode, affects performance and debugging: "dev" or "prod", default is "prod"
  47. ;; Mode "dev" makes Gitea easier to develop and debug, values other than "dev" are treated as "prod" which is for production use.
  48. ;RUN_MODE = prod
  49. ;;
  50. ;; The working directory, see the comment of AppWorkPath above
  51. ;WORK_PATH =
  52. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  53. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  54. [server]
  55. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  56. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  57. ;;
  58. ;; The protocol the server listens on. One of 'http', 'https', 'http+unix', 'fcgi' or 'fcgi+unix'. Defaults to 'http'
  59. ;; Note: Value must be lowercase.
  60. ;PROTOCOL = http
  61. ;;
  62. ;; Expect PROXY protocol headers on connections
  63. ;USE_PROXY_PROTOCOL = false
  64. ;;
  65. ;; Use PROXY protocol in TLS Bridging mode
  66. ;PROXY_PROTOCOL_TLS_BRIDGING = false
  67. ;;
  68. ; Timeout to wait for PROXY protocol header (set to 0 to have no timeout)
  69. ;PROXY_PROTOCOL_HEADER_TIMEOUT=5s
  70. ;;
  71. ; Accept PROXY protocol headers with UNKNOWN type
  72. ;PROXY_PROTOCOL_ACCEPT_UNKNOWN=false
  73. ;;
  74. ;; Set the domain for the server
  75. ;DOMAIN = localhost
  76. ;;
  77. ;; Overwrite the automatically generated public URL. Necessary for proxies and docker.
  78. ;ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  79. ;;
  80. ;; when STATIC_URL_PREFIX is empty it will follow ROOT_URL
  81. ;STATIC_URL_PREFIX =
  82. ;;
  83. ;; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
  84. ;; If PROTOCOL is set to `http+unix` or `fcgi+unix`, this should be the name of the Unix socket file to use.
  85. ;; Relative paths will be made absolute against the _`AppWorkPath`_.
  86. ;HTTP_ADDR = 0.0.0.0
  87. ;;
  88. ;; The port to listen on. Leave empty when using a unix socket.
  89. ;HTTP_PORT = 3000
  90. ;;
  91. ;; If REDIRECT_OTHER_PORT is true, and PROTOCOL is set to https an http server
  92. ;; will be started on PORT_TO_REDIRECT and it will redirect plain, non-secure http requests to the main
  93. ;; ROOT_URL. Defaults are false for REDIRECT_OTHER_PORT and 80 for
  94. ;; PORT_TO_REDIRECT.
  95. ;REDIRECT_OTHER_PORT = false
  96. ;PORT_TO_REDIRECT = 80
  97. ;;
  98. ;; expect PROXY protocol header on connections to https redirector.
  99. ;REDIRECTOR_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)s
  100. ;; Minimum and maximum supported TLS versions
  101. ;SSL_MIN_VERSION=TLSv1.2
  102. ;SSL_MAX_VERSION=
  103. ;;
  104. ;; SSL Curve Preferences
  105. ;SSL_CURVE_PREFERENCES=X25519,P256
  106. ;;
  107. ;; SSL Cipher Suites
  108. ;SSL_CIPHER_SUITES=; Will default to "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" if aes is supported by hardware, otherwise chacha will be first.
  109. ;;
  110. ;; Timeout for any write to the connection. (Set to -1 to disable all timeouts.)
  111. ;PER_WRITE_TIMEOUT = 30s
  112. ;;
  113. ;; Timeout per Kb written to connections.
  114. ;PER_WRITE_PER_KB_TIMEOUT = 30s
  115. ;;
  116. ;; Permission for unix socket
  117. ;UNIX_SOCKET_PERMISSION = 666
  118. ;;
  119. ;; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service. In
  120. ;; most cases you do not need to change the default value. Alter it only if
  121. ;; your SSH server node is not the same as HTTP node. For different protocol, the default
  122. ;; values are different. If `PROTOCOL` is `http+unix`, the default value is `http://unix/`.
  123. ;; If `PROTOCOL` is `fcgi` or `fcgi+unix`, the default value is `%(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/`.
  124. ;; If listen on `0.0.0.0`, the default value is `%(PROTOCOL)s://localhost:%(HTTP_PORT)s/`, Otherwise the default
  125. ;; value is `%(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/`.
  126. ;LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
  127. ;;
  128. ;; When making local connections pass the PROXY protocol header.
  129. ;LOCAL_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)s
  130. ;;
  131. ;; Disable SSH feature when not available
  132. ;DISABLE_SSH = false
  133. ;;
  134. ;; Whether to use the builtin SSH server or not.
  135. ;START_SSH_SERVER = false
  136. ;;
  137. ;; Expect PROXY protocol header on connections to the built-in SSH server
  138. ;SSH_SERVER_USE_PROXY_PROTOCOL = false
  139. ;;
  140. ;; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER.
  141. ;BUILTIN_SSH_SERVER_USER = %(RUN_USER)s
  142. ;;
  143. ;; Domain name to be exposed in clone URL
  144. ;SSH_DOMAIN = %(DOMAIN)s
  145. ;;
  146. ;; SSH username displayed in clone URLs.
  147. ;SSH_USER = %(BUILTIN_SSH_SERVER_USER)s
  148. ;;
  149. ;; The network interface the builtin SSH server should listen on
  150. ;SSH_LISTEN_HOST =
  151. ;;
  152. ;; Port number to be exposed in clone URL
  153. ;SSH_PORT = 22
  154. ;;
  155. ;; The port number the builtin SSH server should listen on
  156. ;SSH_LISTEN_PORT = %(SSH_PORT)s
  157. ;;
  158. ;; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
  159. ;SSH_ROOT_PATH =
  160. ;;
  161. ;; Gitea will create a authorized_keys file by default when it is not using the internal ssh server
  162. ;; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
  163. ;SSH_CREATE_AUTHORIZED_KEYS_FILE = true
  164. ;;
  165. ;; Gitea will create a authorized_principals file by default when it is not using the internal ssh server
  166. ;; If you intend to use the AuthorizedPrincipalsCommand functionality then you should turn this off.
  167. ;SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE = true
  168. ;;
  169. ;; For the built-in SSH server, choose the ciphers to support for SSH connections,
  170. ;; for system SSH this setting has no effect
  171. ;SSH_SERVER_CIPHERS = chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com
  172. ;;
  173. ;; For the built-in SSH server, choose the key exchange algorithms to support for SSH connections,
  174. ;; for system SSH this setting has no effect
  175. ;SSH_SERVER_KEY_EXCHANGES = curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1
  176. ;;
  177. ;; For the built-in SSH server, choose the MACs to support for SSH connections,
  178. ;; for system SSH this setting has no effect
  179. ;SSH_SERVER_MACS = hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1
  180. ;;
  181. ;; For the built-in SSH server, choose the keypair to offer as the host key
  182. ;; The private key should be at SSH_SERVER_HOST_KEY and the public SSH_SERVER_HOST_KEY.pub
  183. ;; relative paths are made absolute relative to the %(APP_DATA_PATH)s
  184. ;SSH_SERVER_HOST_KEYS=ssh/gitea.rsa, ssh/gogs.rsa
  185. ;;
  186. ;; Directory to create temporary files in when testing public keys using ssh-keygen,
  187. ;; default is the system temporary directory.
  188. ;SSH_KEY_TEST_PATH =
  189. ;;
  190. ;; Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself.
  191. ;SSH_KEYGEN_PATH =
  192. ;;
  193. ;; Enable SSH Authorized Key Backup when rewriting all keys, default is false
  194. ;SSH_AUTHORIZED_KEYS_BACKUP = false
  195. ;;
  196. ;; Determines which principals to allow
  197. ;; - empty: if SSH_TRUSTED_USER_CA_KEYS is empty this will default to off, otherwise will default to email, username.
  198. ;; - off: Do not allow authorized principals
  199. ;; - email: the principal must match the user's email
  200. ;; - username: the principal must match the user's username
  201. ;; - anything: there will be no checking on the content of the principal
  202. ;SSH_AUTHORIZED_PRINCIPALS_ALLOW = email, username
  203. ;;
  204. ;; Enable SSH Authorized Principals Backup when rewriting all keys, default is true
  205. ;SSH_AUTHORIZED_PRINCIPALS_BACKUP = true
  206. ;;
  207. ;; Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication.
  208. ;; Multiple keys should be comma separated.
  209. ;; E.g."ssh-<algorithm> <key>". or "ssh-<algorithm> <key1>, ssh-<algorithm> <key2>".
  210. ;; For more information see "TrustedUserCAKeys" in the sshd config manpages.
  211. ;SSH_TRUSTED_USER_CA_KEYS =
  212. ;; Absolute path of the `TrustedUserCaKeys` file gitea will manage.
  213. ;; Default this `RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem
  214. ;; If you're running your own ssh server and you want to use the gitea managed file you'll also need to modify your
  215. ;; sshd_config to point to this file. The official docker image will automatically work without further configuration.
  216. ;SSH_TRUSTED_USER_CA_KEYS_FILENAME =
  217. ;;
  218. ;; Enable exposure of SSH clone URL to anonymous visitors, default is false
  219. ;SSH_EXPOSE_ANONYMOUS = false
  220. ;;
  221. ;; Timeout for any write to ssh connections. (Set to -1 to disable all timeouts.)
  222. ;; Will default to the PER_WRITE_TIMEOUT.
  223. ;SSH_PER_WRITE_TIMEOUT = 30s
  224. ;;
  225. ;; Timeout per Kb written to ssh connections.
  226. ;; Will default to the PER_WRITE_PER_KB_TIMEOUT.
  227. ;SSH_PER_WRITE_PER_KB_TIMEOUT = 30s
  228. ;;
  229. ;; Indicate whether to check minimum key size with corresponding type
  230. ;MINIMUM_KEY_SIZE_CHECK = false
  231. ;;
  232. ;; Disable CDN even in "prod" mode
  233. ;OFFLINE_MODE = true
  234. ;;
  235. ;; TLS Settings: Either ACME or manual
  236. ;; (Other common TLS configuration are found before)
  237. ;ENABLE_ACME = false
  238. ;;
  239. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  240. ;;
  241. ;; ACME automatic TLS settings
  242. ;;
  243. ;; ACME directory URL (e.g. LetsEncrypt's staging/testing URL: https://acme-staging-v02.api.letsencrypt.org/directory)
  244. ;; Leave empty to default to LetsEncrypt's (production) URL
  245. ;ACME_URL =
  246. ;;
  247. ;; Explicitly accept the ACME's TOS. The specific TOS cannot be retrieved at the moment.
  248. ;ACME_ACCEPTTOS = false
  249. ;;
  250. ;; If the ACME CA is not in your system's CA trust chain, it can be manually added here
  251. ;ACME_CA_ROOT =
  252. ;;
  253. ;; Email used for the ACME registration service
  254. ;; Can be left blank to initialize at first run and use the cached value
  255. ;ACME_EMAIL =
  256. ;;
  257. ;; ACME live directory (not to be confused with ACME directory URL: ACME_URL)
  258. ;; (Refer to caddy's ACME manager https://github.com/caddyserver/certmagic)
  259. ;ACME_DIRECTORY = https
  260. ;;
  261. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  262. ;;
  263. ;; Manual TLS settings: (Only applicable if ENABLE_ACME=false)
  264. ;;
  265. ;; Generate steps:
  266. ;; $ ./gitea cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  267. ;;
  268. ;; Or from a .pfx file exported from the Windows certificate store (do
  269. ;; not forget to export the private key):
  270. ;; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  271. ;; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  272. ;; Paths are relative to CUSTOM_PATH
  273. ;CERT_FILE = https/cert.pem
  274. ;KEY_FILE = https/key.pem
  275. ;;
  276. ;; Root directory containing templates and static files.
  277. ;; default is the path where Gitea is executed
  278. ;STATIC_ROOT_PATH = ; Will default to the built-in value _`StaticRootPath`_
  279. ;;
  280. ;; Default path for App data
  281. ;APP_DATA_PATH = data ; relative paths will be made absolute with _`AppWorkPath`_
  282. ;;
  283. ;; Enable gzip compression for runtime-generated content, static resources excluded
  284. ;ENABLE_GZIP = false
  285. ;;
  286. ;; Application profiling (memory and cpu)
  287. ;; For "web" command it listens on localhost:6060
  288. ;; For "serve" command it dumps to disk at PPROF_DATA_PATH as (cpuprofile|memprofile)_<username>_<temporary id>
  289. ;ENABLE_PPROF = false
  290. ;;
  291. ;; PPROF_DATA_PATH, use an absolute path when you start gitea as service
  292. ;PPROF_DATA_PATH = data/tmp/pprof ; Path is relative to _`AppWorkPath`_
  293. ;;
  294. ;; Landing page, can be "home", "explore", "organizations", "login", or any URL such as "/org/repo" or even "https://anotherwebsite.com"
  295. ;; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in.
  296. ;LANDING_PAGE = home
  297. ;;
  298. ;; Enables git-lfs support. true or false, default is false.
  299. ;LFS_START_SERVER = false
  300. ;;
  301. ;;
  302. ;; LFS authentication secret, change this yourself
  303. ;LFS_JWT_SECRET =
  304. ;;
  305. ;; Alternative location to specify LFS authentication secret. You cannot specify both this and LFS_JWT_SECRET, and must pick one
  306. ;LFS_JWT_SECRET_URI = file:/etc/gitea/lfs_jwt_secret
  307. ;;
  308. ;; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail.
  309. ;LFS_HTTP_AUTH_EXPIRY = 24h
  310. ;;
  311. ;; Maximum allowed LFS file size in bytes (Set to 0 for no limit).
  312. ;LFS_MAX_FILE_SIZE = 0
  313. ;;
  314. ;; Maximum number of locks returned per page
  315. ;LFS_LOCKS_PAGING_NUM = 50
  316. ;;
  317. ;; Allow graceful restarts using SIGHUP to fork
  318. ;ALLOW_GRACEFUL_RESTARTS = true
  319. ;;
  320. ;; After a restart the parent will finish ongoing requests before
  321. ;; shutting down. Force shutdown if this process takes longer than this delay.
  322. ;; set to a negative value to disable
  323. ;GRACEFUL_HAMMER_TIME = 60s
  324. ;;
  325. ;; Allows the setting of a startup timeout and waithint for Windows as SVC service
  326. ;; 0 disables this.
  327. ;STARTUP_TIMEOUT = 0
  328. ;;
  329. ;; Static resources, includes resources on custom/, public/ and all uploaded avatars web browser cache time. Note that this cache is disabled when RUN_MODE is "dev". Default is 6h
  330. ;STATIC_CACHE_TIME = 6h
  331. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  332. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  333. [database]
  334. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  335. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  336. ;;
  337. ;; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3".
  338. ;;
  339. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  340. ;;
  341. ;; MySQL Configuration
  342. ;;
  343. DB_TYPE = mysql
  344. HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
  345. NAME = gitea
  346. USER = root
  347. ;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.
  348. ;SSL_MODE = false ; either "false" (default), "true", or "skip-verify"
  349. ;CHARSET_COLLATION = ; Empty as default, Gitea will try to find a case-sensitive collation. Don't change it unless you clearly know what you need.
  350. ;;
  351. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  352. ;;
  353. ;; Postgres Configuration
  354. ;;
  355. ;DB_TYPE = postgres
  356. ;HOST = 127.0.0.1:5432 ; can use socket e.g. /var/run/postgresql/
  357. ;NAME = gitea
  358. ;USER = root
  359. ;PASSWD =
  360. ;SCHEMA =
  361. ;SSL_MODE=disable ;either "disable" (default), "require", or "verify-full"
  362. ;;
  363. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  364. ;;
  365. ;; SQLite Configuration
  366. ;;
  367. ;DB_TYPE = sqlite3
  368. ;PATH= ; defaults to data/gitea.db
  369. ;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
  370. ;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
  371. ;;
  372. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  373. ;;
  374. ;; MSSQL Configuration
  375. ;;
  376. ;DB_TYPE = mssql
  377. ;HOST = 172.17.0.2:1433
  378. ;NAME = gitea
  379. ;USER = SA
  380. ;PASSWD = MwantsaSecurePassword1
  381. ;CHARSET_COLLATION = ; Empty as default, Gitea will try to find a case-sensitive collation. Don't change it unless you clearly know what you need.
  382. ;;
  383. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  384. ;;
  385. ;; Other settings
  386. ;;
  387. ;; For iterate buffer, default is 50
  388. ;ITERATE_BUFFER_SIZE = 50
  389. ;;
  390. ;; Show the database generated SQL
  391. ;LOG_SQL = false
  392. ;;
  393. ;; Maximum number of DB Connect retries
  394. ;DB_RETRIES = 10
  395. ;;
  396. ;; Backoff time per DB retry (time.Duration)
  397. ;DB_RETRY_BACKOFF = 3s
  398. ;;
  399. ;; Max idle database connections on connection pool, default is 2
  400. ;MAX_IDLE_CONNS = 2
  401. ;;
  402. ;; Database connection max life time, default is 0 or 3s mysql (See #6804 & #7071 for reasoning)
  403. ;CONN_MAX_LIFETIME = 3s
  404. ;;
  405. ;; Database maximum number of open connections, default is 0 meaning no maximum
  406. ;MAX_OPEN_CONNS = 0
  407. ;;
  408. ;; Whether execute database models migrations automatically
  409. ;AUTO_MIGRATION = true
  410. ;;
  411. ;; Threshold value (in seconds) beyond which query execution time is logged as a warning in the xorm logger
  412. ;;
  413. ;SLOW_QUERY_THRESHOLD = 5s
  414. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  415. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  416. [security]
  417. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  418. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  419. ;;
  420. ;; Whether the installer is disabled (set to true to disable the installer)
  421. INSTALL_LOCK = false
  422. ;;
  423. ;; Global secret key that will be used
  424. ;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
  425. SECRET_KEY =
  426. ;;
  427. ;; Alternative location to specify secret key, instead of this file; you cannot specify both this and SECRET_KEY, and must pick one
  428. ;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
  429. ;SECRET_KEY_URI = file:/etc/gitea/secret_key
  430. ;;
  431. ;; Secret used to validate communication within Gitea binary.
  432. INTERNAL_TOKEN =
  433. ;;
  434. ;; Alternative location to specify internal token, instead of this file; you cannot specify both this and INTERNAL_TOKEN, and must pick one
  435. ;INTERNAL_TOKEN_URI = file:/etc/gitea/internal_token
  436. ;;
  437. ;; How long to remember that a user is logged in before requiring relogin (in days)
  438. ;LOGIN_REMEMBER_DAYS = 31
  439. ;;
  440. ;; Name of the cookie used to store the current username.
  441. ;COOKIE_USERNAME = gitea_awesome
  442. ;;
  443. ;; Name of cookie used to store authentication information.
  444. ;COOKIE_REMEMBER_NAME = gitea_incredible
  445. ;;
  446. ;; Reverse proxy authentication header name of user name, email, and full name
  447. ;REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  448. ;REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL
  449. ;REVERSE_PROXY_AUTHENTICATION_FULL_NAME = X-WEBAUTH-FULLNAME
  450. ;;
  451. ;; Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request
  452. ;REVERSE_PROXY_LIMIT = 1
  453. ;;
  454. ;; List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all.
  455. ;REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128
  456. ;;
  457. ;; The minimum password length for new Users
  458. ;MIN_PASSWORD_LENGTH = 8
  459. ;;
  460. ;; Set to true to allow users to import local server paths
  461. ;IMPORT_LOCAL_PATHS = false
  462. ;;
  463. ;; Set to false to allow users with git hook privileges to create custom git hooks.
  464. ;; Custom git hooks can be used to perform arbitrary code execution on the host operating system.
  465. ;; This enables the users to access and modify this config file and the Gitea database and interrupt the Gitea service.
  466. ;; By modifying the Gitea database, users can gain Gitea administrator privileges.
  467. ;; It also enables them to access other resources available to the user on the operating system that is running the Gitea instance and perform arbitrary actions in the name of the Gitea OS user.
  468. ;; WARNING: This maybe harmful to you website or your operating system.
  469. ;; WARNING: Setting this to true does not change existing hooks in git repos; adjust it before if necessary.
  470. ;DISABLE_GIT_HOOKS = true
  471. ;;
  472. ;; Set to true to disable webhooks feature.
  473. ;DISABLE_WEBHOOKS = false
  474. ;;
  475. ;; Set to false to allow pushes to gitea repositories despite having an incomplete environment - NOT RECOMMENDED
  476. ;ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true
  477. ;;
  478. ;;Comma separated list of character classes required to pass minimum complexity.
  479. ;;If left empty or no valid values are specified, the default is off (no checking)
  480. ;;Classes include "lower,upper,digit,spec"
  481. ;PASSWORD_COMPLEXITY = off
  482. ;;
  483. ;; Password Hash algorithm, either "argon2", "pbkdf2", "scrypt" or "bcrypt"
  484. ;PASSWORD_HASH_ALGO = pbkdf2
  485. ;;
  486. ;; Set false to allow JavaScript to read CSRF cookie
  487. ;CSRF_COOKIE_HTTP_ONLY = true
  488. ;;
  489. ;; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed
  490. ;PASSWORD_CHECK_PWN = false
  491. ;;
  492. ;; Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations.
  493. ;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
  494. ;SUCCESSFUL_TOKENS_CACHE_SIZE = 20
  495. ;;
  496. ;; Reject API tokens sent in URL query string (Accept Header-based API tokens only). This avoids security vulnerabilities
  497. ;; stemming from cached/logged plain-text API tokens.
  498. ;; In future releases, this will become the default behavior
  499. ;DISABLE_QUERY_AUTH_TOKEN = false
  500. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  501. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  502. [camo]
  503. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  504. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  505. ;;
  506. ;; At the moment we only support images
  507. ;;
  508. ;; if the camo is enabled
  509. ;ENABLED = false
  510. ;; url to a camo image proxy, it **is required** if camo is enabled.
  511. ;SERVER_URL =
  512. ;; HMAC to encode urls with, it **is required** if camo is enabled.
  513. ;HMAC_KEY =
  514. ;; Set to true to use camo for https too lese only non https urls are proxyed
  515. ;ALLWAYS = false
  516. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  517. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  518. [oauth2]
  519. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  520. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  521. ;;
  522. ;; Enables OAuth2 provider
  523. ENABLED = true
  524. ;;
  525. ;; Algorithm used to sign OAuth2 tokens. Valid values: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512, EdDSA
  526. ;JWT_SIGNING_ALGORITHM = RS256
  527. ;;
  528. ;; Private key file path used to sign OAuth2 tokens. The path is relative to APP_DATA_PATH.
  529. ;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to RS256, RS384, RS512, ES256, ES384 or ES512.
  530. ;; 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.
  531. ;JWT_SIGNING_PRIVATE_KEY_FILE = jwt/private.pem
  532. ;;
  533. ;; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate
  534. ;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to HS256, HS384 or HS512.
  535. ;JWT_SECRET =
  536. ;;
  537. ;; Alternative location to specify OAuth2 authentication secret. You cannot specify both this and JWT_SECRET, and must pick one
  538. ;JWT_SECRET_URI = file:/etc/gitea/oauth2_jwt_secret
  539. ;;
  540. ;; Lifetime of an OAuth2 access token in seconds
  541. ;ACCESS_TOKEN_EXPIRATION_TIME = 3600
  542. ;;
  543. ;; Lifetime of an OAuth2 refresh token in hours
  544. ;REFRESH_TOKEN_EXPIRATION_TIME = 730
  545. ;;
  546. ;; Check if refresh token got already used
  547. ;INVALIDATE_REFRESH_TOKENS = false
  548. ;;
  549. ;; Maximum length of oauth2 token/cookie stored on server
  550. ;MAX_TOKEN_LENGTH = 32767
  551. ;;
  552. ;; Pre-register OAuth2 applications for some universally useful services
  553. ;; * https://github.com/hickford/git-credential-oauth
  554. ;; * https://github.com/git-ecosystem/git-credential-manager
  555. ;; * https://gitea.com/gitea/tea
  556. ;DEFAULT_APPLICATIONS = git-credential-oauth, git-credential-manager, tea
  557. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  558. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  559. [log]
  560. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  561. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  562. ;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log
  563. ;ROOT_PATH =
  564. ;;
  565. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  566. ;; Main Logger
  567. ;;
  568. ;; Either "console", "file" or "conn", default is "console"
  569. ;; Use comma to separate multiple modes, e.g. "console, file"
  570. MODE = console
  571. ;;
  572. ;; Either "Trace", "Debug", "Info", "Warn", "Error" or "None", default is "Info"
  573. LEVEL = Info
  574. ;;
  575. ;; Print Stacktrace with logs (rarely helpful, do not set) Either "Trace", "Debug", "Info", "Warn", "Error", default is "None"
  576. ;STACKTRACE_LEVEL = None
  577. ;;
  578. ;; Buffer length of the channel, keep it as it is if you don't know what it is.
  579. ;BUFFER_LEN = 10000
  580. ;;
  581. ;; Sub logger modes, a single comma means use default MODE above, empty means disable it
  582. ;logger.access.MODE=
  583. ;logger.router.MODE=,
  584. ;logger.xorm.MODE=,
  585. ;;
  586. ;; Collect SSH logs (Creates log from ssh git request)
  587. ;;
  588. ;ENABLE_SSH_LOG = false
  589. ;;
  590. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  591. ;;
  592. ;; Access Logger (Creates log in NCSA common log format)
  593. ;;
  594. ;; Print request id which parsed from request headers in access log, when access log is enabled.
  595. ;; * E.g:
  596. ;; * In request Header: X-Request-ID: test-id-123
  597. ;; * Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
  598. ;; * Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "test-id-123"
  599. ;;
  600. ;; If you configure more than one in the .ini file, it will match in the order of configuration,
  601. ;; and the first match will be finally printed in the log.
  602. ;; * E.g:
  603. ;; * In request Header: X-Trace-ID: trace-id-1q2w3e4r
  604. ;; * Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID, X-Trace-ID, X-Req-ID
  605. ;; * Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "trace-id-1q2w3e4r"
  606. ;;
  607. ;REQUEST_ID_HEADERS =
  608. ;;
  609. ;; Sets the template used to create the access log.
  610. ;ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}" "{{.Ctx.Req.UserAgent}}"
  611. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  612. ;;
  613. ;; Log modes (aka log writers)
  614. ;;
  615. ;[log.%(WriterMode)]
  616. ;MODE=console/file/conn/...
  617. ;LEVEL=
  618. ;FLAGS = stdflags
  619. ;EXPRESSION =
  620. ;PREFIX =
  621. ;COLORIZE = false
  622. ;;
  623. ;[log.console]
  624. ;STDERR = false
  625. ;;
  626. ;[log.file]
  627. ;; Set the file_name for the logger. If this is a relative path this will be relative to ROOT_PATH
  628. ;FILE_NAME =
  629. ;; This enables automated log rotate(switch of following options), default is true
  630. ;LOG_ROTATE = true
  631. ;; Max size shift of a single file, default is 28 means 1 << 28, 256MB
  632. ;MAX_SIZE_SHIFT = 28
  633. ;; Segment log daily, default is true
  634. ;DAILY_ROTATE = true
  635. ;; delete the log file after n days, default is 7
  636. ;MAX_DAYS = 7
  637. ;; compress logs with gzip
  638. ;COMPRESS = true
  639. ;; compression level see godoc for compress/gzip
  640. ;COMPRESSION_LEVEL = -1
  641. ;;
  642. ;[log.conn]
  643. ;; Reconnect host for every single message, default is false
  644. ;RECONNECT_ON_MSG = false
  645. ;; Try to reconnect when connection is lost, default is false
  646. ;RECONNECT = false
  647. ;; Either "tcp", "unix" or "udp", default is "tcp"
  648. ;PROTOCOL = tcp
  649. ;; Host address
  650. ;ADDR =
  651. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  652. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  653. [git]
  654. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  655. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  656. ;;
  657. ;; The path of git executable. If empty, Gitea searches through the PATH environment.
  658. ;PATH =
  659. ;;
  660. ;; The HOME directory for Git
  661. ;HOME_PATH = %(APP_DATA_PATH)s/home
  662. ;;
  663. ;; Disables highlight of added and removed changes
  664. ;DISABLE_DIFF_HIGHLIGHT = false
  665. ;;
  666. ;; Max number of lines allowed in a single file in diff view
  667. ;MAX_GIT_DIFF_LINES = 1000
  668. ;;
  669. ;; Max number of allowed characters in a line in diff view
  670. ;MAX_GIT_DIFF_LINE_CHARACTERS = 5000
  671. ;;
  672. ;; Max number of files shown in diff view
  673. ;MAX_GIT_DIFF_FILES = 100
  674. ;;
  675. ;; Set the default commits range size
  676. ;COMMITS_RANGE_SIZE = 50
  677. ;;
  678. ;; Set the default branches range size
  679. ;BRANCHES_RANGE_SIZE = 20
  680. ;;
  681. ;; Arguments for command 'git gc', e.g. "--aggressive --auto"
  682. ;; see more on http://git-scm.com/docs/git-gc/
  683. ;GC_ARGS =
  684. ;;
  685. ;; 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
  686. ;; To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file.
  687. ;ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
  688. ;;
  689. ;; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
  690. ;PULL_REQUEST_PUSH_MESSAGE = true
  691. ;;
  692. ;; (Go-Git only) Don't cache objects greater than this in memory. (Set to 0 to disable.)
  693. ;LARGE_OBJECT_THRESHOLD = 1048576
  694. ;; Set to true to forcibly set core.protectNTFS=false
  695. ;DISABLE_CORE_PROTECT_NTFS=false
  696. ;; Disable the usage of using partial clones for git.
  697. ;DISABLE_PARTIAL_CLONE = false
  698. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  699. ;; Git Operation timeout in seconds
  700. ;[git.timeout]
  701. ;DEFAULT = 360
  702. ;MIGRATE = 600
  703. ;MIRROR = 300
  704. ;CLONE = 300
  705. ;PULL = 300
  706. ;GC = 60
  707. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  708. ;; Git config options
  709. ;; This section only does "set" config, a removed config key from this section won't be removed from git config automatically. The format is `some.configKey = value`.
  710. ;[git.config]
  711. ;diff.algorithm = histogram
  712. ;core.logAllRefUpdates = true
  713. ;gc.reflogExpire = 90
  714. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  715. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  716. [service]
  717. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  718. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  719. ;;
  720. ;; Time limit to confirm account/email registration
  721. ;ACTIVE_CODE_LIVE_MINUTES = 180
  722. ;;
  723. ;; Time limit to perform the reset of a forgotten password
  724. ;RESET_PASSWD_CODE_LIVE_MINUTES = 180
  725. ;;
  726. ;; Whether a new user needs to confirm their email when registering.
  727. ;REGISTER_EMAIL_CONFIRM = false
  728. ;;
  729. ;; Whether a new user needs to be confirmed manually after registration. (Requires `REGISTER_EMAIL_CONFIRM` to be disabled.)
  730. ;REGISTER_MANUAL_CONFIRM = false
  731. ;;
  732. ;; List of domain names that are allowed to be used to register on a Gitea instance, wildcard is supported
  733. ;; eg: gitea.io,example.com,*.mydomain.com
  734. ;EMAIL_DOMAIN_ALLOWLIST =
  735. ;;
  736. ;; Comma-separated list of domain names that are not allowed to be used to register on a Gitea instance, wildcard is supported
  737. ;EMAIL_DOMAIN_BLOCKLIST =
  738. ;;
  739. ;; Disallow registration, only allow admins to create accounts.
  740. ;DISABLE_REGISTRATION = false
  741. ;;
  742. ;; Allow registration only using gitea itself, it works only when DISABLE_REGISTRATION is false
  743. ;ALLOW_ONLY_INTERNAL_REGISTRATION = false
  744. ;;
  745. ;; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false
  746. ;ALLOW_ONLY_EXTERNAL_REGISTRATION = false
  747. ;;
  748. ;; User must sign in to view anything.
  749. ;REQUIRE_SIGNIN_VIEW = false
  750. ;;
  751. ;; Mail notification
  752. ;ENABLE_NOTIFY_MAIL = false
  753. ;;
  754. ;; This setting enables gitea to be signed in with HTTP BASIC Authentication using the user's password
  755. ;; If you set this to false you will not be able to access the tokens endpoints on the API with your password
  756. ;; Please note that setting this to false will not disable OAuth Basic or Basic authentication using a token
  757. ;ENABLE_BASIC_AUTHENTICATION = true
  758. ;;
  759. ;; More detail: https://github.com/gogits/gogs/issues/165
  760. ;ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  761. ; Enable this to allow reverse proxy authentication for API requests, the reverse proxy is responsible for ensuring that no CSRF is possible.
  762. ;ENABLE_REVERSE_PROXY_AUTHENTICATION_API = false
  763. ;ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  764. ;ENABLE_REVERSE_PROXY_EMAIL = false
  765. ;ENABLE_REVERSE_PROXY_FULL_NAME = false
  766. ;;
  767. ;; Enable captcha validation for registration
  768. ;ENABLE_CAPTCHA = false
  769. ;;
  770. ;; Enable this to require captcha validation for login
  771. ;REQUIRE_CAPTCHA_FOR_LOGIN = false
  772. ;;
  773. ;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha, mcaptcha, cfturnstile.
  774. ;CAPTCHA_TYPE = image
  775. ;;
  776. ;; Change this to use recaptcha.net or other recaptcha service
  777. ;RECAPTCHA_URL = https://www.google.com/recaptcha/
  778. ;; Enable recaptcha to use Google's recaptcha service
  779. ;; Go to https://www.google.com/recaptcha/admin to sign up for a key
  780. ;RECAPTCHA_SECRET =
  781. ;RECAPTCHA_SITEKEY =
  782. ;;
  783. ;; For hCaptcha, create an account at https://accounts.hcaptcha.com/login to get your keys
  784. ;HCAPTCHA_SECRET =
  785. ;HCAPTCHA_SITEKEY =
  786. ;;
  787. ;; Change this to use demo.mcaptcha.org or your self-hosted mcaptcha.org instance.
  788. ;MCAPTCHA_URL = https://demo.mcaptcha.org
  789. ;;
  790. ;; Go to your configured mCaptcha instance and register a sitekey
  791. ;; and use your account's secret.
  792. ;MCAPTCHA_SECRET =
  793. ;MCAPTCHA_SITEKEY =
  794. ;;
  795. ;; Go to https://dash.cloudflare.com/?to=/:account/turnstile to sign up for a key
  796. ;CF_TURNSTILE_SITEKEY =
  797. ;CF_TURNSTILE_SECRET =
  798. ;;
  799. ;; Default value for KeepEmailPrivate
  800. ;; Each new user will get the value of this setting copied into their profile
  801. ;DEFAULT_KEEP_EMAIL_PRIVATE = false
  802. ;;
  803. ;; Default value for AllowCreateOrganization
  804. ;; Every new user will have rights set to create organizations depending on this setting
  805. ;DEFAULT_ALLOW_CREATE_ORGANIZATION = true
  806. ;; Default value for IsRestricted
  807. ;; Every new user will have restricted permissions depending on this setting
  808. ;DEFAULT_USER_IS_RESTRICTED = false
  809. ;;
  810. ;; Either "public", "limited" or "private", default is "public"
  811. ;; Limited is for users visible only to signed users
  812. ;; Private is for users visible only to members of their organizations
  813. ;; Public is for users visible for everyone
  814. ;DEFAULT_USER_VISIBILITY = public
  815. ;;
  816. ;; Set which visibility modes a user can have
  817. ;ALLOWED_USER_VISIBILITY_MODES = public,limited,private
  818. ;;
  819. ;; Either "public", "limited" or "private", default is "public"
  820. ;; Limited is for organizations visible only to signed users
  821. ;; Private is for organizations visible only to members of the organization
  822. ;; Public is for organizations visible to everyone
  823. ;DEFAULT_ORG_VISIBILITY = public
  824. ;;
  825. ;; Default value for DefaultOrgMemberVisible
  826. ;; True will make the membership of the users visible when added to the organisation
  827. ;DEFAULT_ORG_MEMBER_VISIBLE = false
  828. ;;
  829. ;; Default value for EnableDependencies
  830. ;; Repositories will use dependencies by default depending on this setting
  831. ;DEFAULT_ENABLE_DEPENDENCIES = true
  832. ;;
  833. ;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.
  834. ;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
  835. ;;
  836. ;; Default map service. No external API support has been included. A service has to allow
  837. ;; searching using URL parameters, the location will be appended to the URL as escaped query parameter.
  838. ;; Disabled by default, some example values are:
  839. ;; - OpenStreetMap: https://www.openstreetmap.org/search?query=
  840. ;; - Google Maps: https://www.google.com/maps/place/
  841. ;; - MapQuest: https://www.mapquest.com/search/
  842. ;; - Bing Maps: https://www.bing.com/maps?where1=
  843. ; USER_LOCATION_MAP_URL =
  844. ;;
  845. ;; Enable heatmap on users profiles.
  846. ;ENABLE_USER_HEATMAP = true
  847. ;;
  848. ;; Enable Timetracking
  849. ;ENABLE_TIMETRACKING = true
  850. ;;
  851. ;; Default value for EnableTimetracking
  852. ;; Repositories will use timetracking by default depending on this setting
  853. ;DEFAULT_ENABLE_TIMETRACKING = true
  854. ;;
  855. ;; Default value for AllowOnlyContributorsToTrackTime
  856. ;; Only users with write permissions can track time if this is true
  857. ;DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
  858. ;;
  859. ;; Value for the domain part of the user's email address in the git log if user
  860. ;; has set KeepEmailPrivate to true. The user's email will be replaced with a
  861. ;; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS. Default
  862. ;; value is "noreply." + DOMAIN, where DOMAIN resolves to the value from server.DOMAIN
  863. ;; Note: do not use the <DOMAIN> notation below
  864. ;NO_REPLY_ADDRESS = ; noreply.<DOMAIN>
  865. ;;
  866. ;; Show Registration button
  867. ;SHOW_REGISTRATION_BUTTON = true
  868. ;;
  869. ;; Show milestones dashboard page - a view of all the user's milestones
  870. ;SHOW_MILESTONES_DASHBOARD_PAGE = true
  871. ;;
  872. ;; Default value for AutoWatchNewRepos
  873. ;; When adding a repo to a team or creating a new repo all team members will watch the
  874. ;; repo automatically if enabled
  875. ;AUTO_WATCH_NEW_REPOS = true
  876. ;;
  877. ;; Default value for AutoWatchOnChanges
  878. ;; Make the user watch a repository When they commit for the first time
  879. ;AUTO_WATCH_ON_CHANGES = false
  880. ;;
  881. ;; Minimum amount of time a user must exist before comments are kept when the user is deleted.
  882. ;USER_DELETE_WITH_COMMENTS_MAX_TIME = 0
  883. ;; Valid site url schemes for user profiles
  884. ;VALID_SITE_URL_SCHEMES=http,https
  885. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  886. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  887. ;; Other Settings
  888. ;;
  889. ;; Uncomment the [section.header] if you wish to
  890. ;; set the below settings.
  891. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  892. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  893. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  894. ;[repository]
  895. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  896. ;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)s/gitea-repositories.
  897. ;; A relative path is interpreted as _`AppWorkPath`_/%(ROOT)s
  898. ;ROOT =
  899. ;;
  900. ;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
  901. ;SCRIPT_TYPE = bash
  902. ;;
  903. ;; DETECTED_CHARSETS_ORDER tie-break order for detected charsets.
  904. ;; If the charsets have equal confidence, tie-breaking will be done by order in this list
  905. ;; with charsets earlier in the list chosen in preference to those later.
  906. ;; Adding "defaults" will place the unused charsets at that position.
  907. ;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
  908. ;;
  909. ;; Default ANSI charset to override non-UTF-8 charsets to
  910. ;ANSI_CHARSET =
  911. ;;
  912. ;; Force every new repository to be private
  913. ;FORCE_PRIVATE = false
  914. ;;
  915. ;; Default privacy setting when creating a new repository, allowed values: last, private, public. Default is last which means the last setting used.
  916. ;DEFAULT_PRIVATE = last
  917. ;;
  918. ;; Default private when using push-to-create
  919. ;DEFAULT_PUSH_CREATE_PRIVATE = true
  920. ;;
  921. ;; Global limit of repositories per user, applied at creation time. -1 means no limit
  922. ;MAX_CREATION_LIMIT = -1
  923. ;;
  924. ;; Preferred Licenses to place at the top of the List
  925. ;; The name here must match the filename in options/license or custom/options/license
  926. ;PREFERRED_LICENSES = Apache License 2.0,MIT License
  927. ;;
  928. ;; Disable the ability to interact with repositories using the HTTP protocol
  929. ;DISABLE_HTTP_GIT = false
  930. ;;
  931. ;; Value for Access-Control-Allow-Origin header, default is not to present
  932. ;; WARNING: This may be harmful to your website if you do not give it a right value.
  933. ;ACCESS_CONTROL_ALLOW_ORIGIN =
  934. ;;
  935. ;; Force ssh:// clone url instead of scp-style uri when default SSH port is used
  936. ;USE_COMPAT_SSH_URI = false
  937. ;;
  938. ;; Value for the "go get" request returns the repository url as https or ssh, default is https
  939. ;GO_GET_CLONE_URL_PROTOCOL = https
  940. ;;
  941. ;; Close issues as long as a commit on any branch marks it as fixed
  942. ;DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = false
  943. ;;
  944. ;; Allow users to push local repositories to Gitea and have them automatically created for a user or an org
  945. ;ENABLE_PUSH_CREATE_USER = false
  946. ;ENABLE_PUSH_CREATE_ORG = false
  947. ;;
  948. ;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects, repo.packages, repo.actions.
  949. ;DISABLED_REPO_UNITS =
  950. ;;
  951. ;; Comma separated list of default new repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects, repo.packages, repo.actions.
  952. ;; Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility.
  953. ;; External wiki and issue tracker can't be enabled by default as it requires additional settings.
  954. ;; Disabled repo units will not be added to new repositories regardless if it is in the default list.
  955. ;DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages,repo.actions
  956. ;;
  957. ;; Comma separated list of default forked repo units.
  958. ;; The set of allowed values and rules are the same as DEFAULT_REPO_UNITS.
  959. ;DEFAULT_FORK_REPO_UNITS = repo.code,repo.pulls
  960. ;;
  961. ;; Prefix archive files by placing them in a directory named after the repository
  962. ;PREFIX_ARCHIVE_FILES = true
  963. ;;
  964. ;; Disable migrating feature.
  965. ;DISABLE_MIGRATIONS = false
  966. ;;
  967. ;; Disable stars feature.
  968. ;DISABLE_STARS = false
  969. ;;
  970. ;; The default branch name of new repositories
  971. ;DEFAULT_BRANCH = main
  972. ;;
  973. ;; Allow adoption of unadopted repositories
  974. ;ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES = false
  975. ;;
  976. ;; Allow deletion of unadopted repositories
  977. ;ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false
  978. ;; Don't allow download source archive files from UI
  979. ;DISABLE_DOWNLOAD_SOURCE_ARCHIVES = false
  980. ;; Allow fork repositories without maximum number limit
  981. ;ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT = true
  982. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  983. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  984. ;[repository.editor]
  985. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  986. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  987. ;;
  988. ;; List of file extensions for which lines should be wrapped in the Monaco editor
  989. ;; Separate extensions with a comma. To line wrap files without an extension, just put a comma
  990. ;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,.livemd,
  991. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  992. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  993. ;[repository.local]
  994. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  995. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  996. ;;
  997. ;; Path for local repository copy. Defaults to `tmp/local-repo` (content gets deleted on gitea restart)
  998. ;LOCAL_COPY_PATH = tmp/local-repo
  999. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1000. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1001. ;[repository.upload]
  1002. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1003. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1004. ;;
  1005. ;; Whether repository file uploads are enabled. Defaults to `true`
  1006. ;ENABLED = true
  1007. ;;
  1008. ;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
  1009. ;TEMP_PATH = data/tmp/uploads
  1010. ;;
  1011. ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  1012. ;ALLOWED_TYPES =
  1013. ;;
  1014. ;; Max size of each file in megabytes. Defaults to 50MB
  1015. ;FILE_MAX_SIZE = 50
  1016. ;;
  1017. ;; Max number of files per upload. Defaults to 5
  1018. ;MAX_FILES = 5
  1019. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1020. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1021. ;[repository.pull-request]
  1022. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1023. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1024. ;;
  1025. ;; List of prefixes used in Pull Request title to mark them as Work In Progress (matched in a case-insensitive manner)
  1026. ;WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP]
  1027. ;;
  1028. ;; List of keywords used in Pull Request comments to automatically close a related issue
  1029. ;CLOSE_KEYWORDS = close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved
  1030. ;;
  1031. ;; List of keywords used in Pull Request comments to automatically reopen a related issue
  1032. ;REOPEN_KEYWORDS = reopen,reopens,reopened
  1033. ;;
  1034. ;; Set default merge style for repository creating, valid options: merge, rebase, rebase-merge, squash, fast-forward-only
  1035. ;DEFAULT_MERGE_STYLE = merge
  1036. ;;
  1037. ;; In the default merge message for squash commits include at most this many commits
  1038. ;DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT = 50
  1039. ;;
  1040. ;; In the default merge message for squash commits limit the size of the commit messages to this
  1041. ;DEFAULT_MERGE_MESSAGE_SIZE = 5120
  1042. ;;
  1043. ;; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list
  1044. ;DEFAULT_MERGE_MESSAGE_ALL_AUTHORS = false
  1045. ;;
  1046. ;; In default merge messages limit the number of approvers listed as Reviewed-by: to this many
  1047. ;DEFAULT_MERGE_MESSAGE_MAX_APPROVERS = 10
  1048. ;;
  1049. ;; In default merge messages only include approvers who are official
  1050. ;DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = true
  1051. ;;
  1052. ;; Add co-authored-by and co-committed-by trailers if committer does not match author
  1053. ;ADD_CO_COMMITTER_TRAILERS = true
  1054. ;;
  1055. ;; In addition to testing patches using the three-way merge method, re-test conflicting patches with git apply
  1056. ;TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY = false
  1057. ;;
  1058. ;; Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo.
  1059. ;RETARGET_CHILDREN_ON_MERGE = true
  1060. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1061. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1062. ;[repository.issue]
  1063. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1064. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1065. ;; List of reasons why a Pull Request or Issue can be locked
  1066. ;LOCK_REASONS = Too heated,Off-topic,Resolved,Spam
  1067. ;; Maximum number of pinned Issues per repo
  1068. ;; Set to 0 to disable pinning Issues
  1069. ;MAX_PINNED = 3
  1070. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1071. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1072. ;[repository.release]
  1073. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1074. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1075. ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  1076. ;ALLOWED_TYPES =
  1077. ;DEFAULT_PAGING_NUM = 10
  1078. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1079. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1080. ;[repository.signing]
  1081. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1082. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1083. ;;
  1084. ;; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey
  1085. ;; run in the context of the RUN_USER
  1086. ;; Switch to none to stop signing completely
  1087. ;SIGNING_KEY = default
  1088. ;;
  1089. ;; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer.
  1090. ;; These should match a publicized name and email address for the key. (When SIGNING_KEY is default these are set to
  1091. ;; the results of git config --get user.name and git config --get user.email respectively and can only be overridden
  1092. ;; by setting the SIGNING_KEY ID to the correct ID.)
  1093. ;SIGNING_NAME =
  1094. ;SIGNING_EMAIL =
  1095. ;;
  1096. ;; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter
  1097. ;DEFAULT_TRUST_MODEL = collaborator
  1098. ;;
  1099. ;; Determines when gitea should sign the initial commit when creating a repository
  1100. ;; Either:
  1101. ;; - never
  1102. ;; - pubkey: only sign if the user has a pubkey
  1103. ;; - twofa: only sign if the user has logged in with twofa
  1104. ;; - always
  1105. ;; options other than none and always can be combined as comma separated list
  1106. ;INITIAL_COMMIT = always
  1107. ;;
  1108. ;; Determines when to sign for CRUD actions
  1109. ;; - as above
  1110. ;; - parentsigned: requires that the parent commit is signed.
  1111. ;CRUD_ACTIONS = pubkey, twofa, parentsigned
  1112. ;; Determines when to sign Wiki commits
  1113. ;; - as above
  1114. ;WIKI = never
  1115. ;;
  1116. ;; Determines when to sign on merges
  1117. ;; - basesigned: require that the parent of commit on the base repo is signed.
  1118. ;; - commitssigned: require that all the commits in the head branch are signed.
  1119. ;; - approved: only sign when merging an approved pr to a protected branch
  1120. ;MERGES = pubkey, twofa, basesigned, commitssigned
  1121. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1122. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1123. ;[repository.mimetype_mapping]
  1124. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1125. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1126. ;;
  1127. ;; Custom MIME type mapping for downloadable files
  1128. ;.apk=application/vnd.android.package-archive
  1129. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1130. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1131. ;[project]
  1132. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1133. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1134. ;; Default templates for project boards
  1135. ;PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done
  1136. ;PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed
  1137. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1138. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1139. ;[cors]
  1140. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1141. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1142. ;;
  1143. ;; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers
  1144. ;; enable cors headers (disabled by default)
  1145. ;ENABLED = false
  1146. ;;
  1147. ;; list of requesting origins that are allowed, eg: "https://*.example.com"
  1148. ;ALLOW_DOMAIN = *
  1149. ;;
  1150. ;; list of methods allowed to request
  1151. ;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
  1152. ;;
  1153. ;; max time to cache response
  1154. ;MAX_AGE = 10m
  1155. ;;
  1156. ;; allow request with credentials
  1157. ;ALLOW_CREDENTIALS = false
  1158. ;;
  1159. ;; headers to permit
  1160. ;HEADERS = Content-Type,User-Agent
  1161. ;;
  1162. ;; set X-FRAME-OPTIONS header
  1163. ;X_FRAME_OPTIONS = SAMEORIGIN
  1164. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1165. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1166. ;[ui]
  1167. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1168. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1169. ;;
  1170. ;; Number of repositories that are displayed on one explore page
  1171. ;EXPLORE_PAGING_NUM = 20
  1172. ;;
  1173. ;; Number of issues that are displayed on one page
  1174. ;ISSUE_PAGING_NUM = 20
  1175. ;;
  1176. ;; Number of maximum commits displayed in one activity feed
  1177. ;FEED_MAX_COMMIT_NUM = 5
  1178. ;;
  1179. ;; Number of items that are displayed in home feed
  1180. ;FEED_PAGING_NUM = 20
  1181. ;;
  1182. ;; Number of items that are displayed in a single subsitemap
  1183. ;SITEMAP_PAGING_NUM = 20
  1184. ;;
  1185. ;; Number of maximum commits displayed in commit graph.
  1186. ;GRAPH_MAX_COMMIT_NUM = 100
  1187. ;;
  1188. ;; Number of line of codes shown for a code comment
  1189. ;CODE_COMMENT_LINES = 4
  1190. ;;
  1191. ;; Max size of files to be displayed (default is 8MiB)
  1192. ;MAX_DISPLAY_FILE_SIZE = 8388608
  1193. ;;
  1194. ;; Detect ambiguous unicode characters in file contents and show warnings on the UI
  1195. ;AMBIGUOUS_UNICODE_DETECTION = true
  1196. ;;
  1197. ;; Whether the email of the user should be shown in the Explore Users page
  1198. ;SHOW_USER_EMAIL = true
  1199. ;;
  1200. ;; Set the default theme for the Gitea install
  1201. ;DEFAULT_THEME = gitea-auto
  1202. ;;
  1203. ;; All available themes. Allow users select personalized themes regardless of the value of `DEFAULT_THEME`.
  1204. ;THEMES = gitea-auto,gitea-light,gitea-dark
  1205. ;;
  1206. ;; All available reactions users can choose on issues/prs and comments.
  1207. ;; Values can be emoji alias (:smile:) or a unicode emoji.
  1208. ;; For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png
  1209. ;REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes
  1210. ;;
  1211. ;; Change the number of users that are displayed in reactions tooltip (triggered by mouse hover).
  1212. ;REACTION_MAX_USER_NUM = 10
  1213. ;;
  1214. ;; Additional Emojis not defined in the utf8 standard
  1215. ;; By default we support gitea (:gitea:), to add more copy them to public/assets/img/emoji/emoji_name.png and add it to this config.
  1216. ;; Dont mistake it for Reactions.
  1217. ;CUSTOM_EMOJIS = gitea, codeberg, gitlab, git, github, gogs
  1218. ;;
  1219. ;; Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
  1220. ;DEFAULT_SHOW_FULL_NAME = false
  1221. ;;
  1222. ;; Whether to search within description at repository search on explore page.
  1223. ;SEARCH_REPO_DESCRIPTION = true
  1224. ;;
  1225. ;; Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.
  1226. ;; A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic).
  1227. ;ONLY_SHOW_RELEVANT_REPOS = false
  1228. ;;
  1229. ;; Change the sort type of the explore pages.
  1230. ;; Default is "recentupdate", but you also have "alphabetically", "reverselastlogin", "newest", "oldest".
  1231. ;EXPLORE_PAGING_DEFAULT_SORT = recentupdate
  1232. ;;
  1233. ;; The tense all timestamps should be rendered in. Possible values are `absolute` time (i.e. 1970-01-01, 11:59) and `mixed`.
  1234. ;; `mixed` means most timestamps are rendered in relative time (i.e. 2 days ago).
  1235. ;PREFERRED_TIMESTAMP_TENSE = mixed
  1236. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1237. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1238. ;[ui.admin]
  1239. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1240. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1241. ;;
  1242. ;; Number of users that are displayed on one page
  1243. ;USER_PAGING_NUM = 50
  1244. ;;
  1245. ;; Number of repos that are displayed on one page
  1246. ;REPO_PAGING_NUM = 50
  1247. ;;
  1248. ;; Number of notices that are displayed on one page
  1249. ;NOTICE_PAGING_NUM = 25
  1250. ;;
  1251. ;; Number of organizations that are displayed on one page
  1252. ;ORG_PAGING_NUM = 50
  1253. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1254. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1255. ;[ui.user]
  1256. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1257. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1258. ;; Number of repos that are displayed on one page
  1259. ;REPO_PAGING_NUM = 15
  1260. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1261. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1262. ;[ui.meta]
  1263. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1264. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1265. ;AUTHOR = Gitea - Git with a cup of tea
  1266. ;DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go
  1267. ;KEYWORDS = go,git,self-hosted,gitea
  1268. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1269. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1270. ;[ui.notification]
  1271. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1272. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1273. ;;
  1274. ;; Control how often the notification endpoint is polled to update the notification
  1275. ;; The timeout will increase to MAX_TIMEOUT in TIMEOUT_STEPs if the notification count is unchanged
  1276. ;; Set MIN_TIMEOUT to -1 to turn off
  1277. ;MIN_TIMEOUT = 10s
  1278. ;MAX_TIMEOUT = 60s
  1279. ;TIMEOUT_STEP = 10s
  1280. ;;
  1281. ;; This setting determines how often the db is queried to get the latest notification counts.
  1282. ;; If the browser client supports EventSource and SharedWorker, a SharedWorker will be used in preference to polling notification. Set to -1 to disable the EventSource
  1283. ;EVENT_SOURCE_UPDATE_TIME = 10s
  1284. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1285. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1286. ;[ui.svg]
  1287. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1288. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1289. ;;
  1290. ;; Whether to render SVG files as images. If SVG rendering is disabled, SVG files are displayed as text and cannot be embedded in markdown files as images.
  1291. ;ENABLE_RENDER = true
  1292. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1293. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1294. ;[ui.csv]
  1295. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1296. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1297. ;;
  1298. ;; Maximum allowed file size in bytes to render CSV files as table. (Set to 0 for no limit).
  1299. ;MAX_FILE_SIZE = 524288
  1300. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1301. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1302. ;[markdown]
  1303. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1304. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1305. ;;
  1306. ;; Render soft line breaks as hard line breaks, which means a single newline character between
  1307. ;; paragraphs will cause a line break and adding trailing whitespace to paragraphs is not
  1308. ;; necessary to force a line break.
  1309. ;; Render soft line breaks as hard line breaks for comments
  1310. ;ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true
  1311. ;;
  1312. ;; Render soft line breaks as hard line breaks for markdown documents
  1313. ;ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS = false
  1314. ;;
  1315. ;; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown
  1316. ;; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes)
  1317. ;; URLs starting with http and https are always displayed, whatever is put in this entry.
  1318. ;; If this entry is empty, all URL schemes are allowed.
  1319. ;CUSTOM_URL_SCHEMES =
  1320. ;;
  1321. ;; List of file extensions that should be rendered/edited as Markdown
  1322. ;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma
  1323. ;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd,.livemd
  1324. ;;
  1325. ;; Enables math inline and block detection
  1326. ;ENABLE_MATH = true
  1327. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1328. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1329. ;[ssh.minimum_key_sizes]
  1330. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1331. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1332. ;;
  1333. ;; Define allowed algorithms and their minimum key length (use -1 to disable a type)
  1334. ;ED25519 = 256
  1335. ;ECDSA = 256
  1336. ;RSA = 3071 ; we allow 3071 here because an otherwise valid 3072 bit RSA key can be reported as having 3071 bit length
  1337. ;DSA = -1 ; set to 1024 to switch on
  1338. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1339. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1340. ;[indexer]
  1341. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1342. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1343. ;;
  1344. ;; Issue Indexer settings
  1345. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1346. ;;
  1347. ;; Issue indexer type, currently support: bleve, db, elasticsearch or meilisearch default is bleve
  1348. ;ISSUE_INDEXER_TYPE = bleve
  1349. ;;
  1350. ;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
  1351. ;ISSUE_INDEXER_PATH = indexers/issues.bleve ; Relative paths will be made absolute against _`AppWorkPath`_.
  1352. ;;
  1353. ;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch (e.g. http://elastic:password@localhost:9200) or meilisearch (e.g. http://:apikey@localhost:7700)
  1354. ;ISSUE_INDEXER_CONN_STR =
  1355. ;;
  1356. ;; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch or meilisearch.
  1357. ;ISSUE_INDEXER_NAME = gitea_issues
  1358. ;;
  1359. ;; Timeout the indexer if it takes longer than this to start.
  1360. ;; Set to -1 to disable timeout.
  1361. ;STARTUP_TIMEOUT = 30s
  1362. ;;
  1363. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1364. ;; Repository Indexer settings
  1365. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1366. ;;
  1367. ;; repo indexer by default disabled, since it uses a lot of disk space
  1368. ;REPO_INDEXER_ENABLED = false
  1369. ;;
  1370. ;; repo indexer units, the items to index, could be `sources`, `forks`, `mirrors`, `templates` or any combination of them separated by a comma.
  1371. ;; If empty then it defaults to `sources` only, as if you'd like to disable fully please see REPO_INDEXER_ENABLED.
  1372. ;REPO_INDEXER_REPO_TYPES = sources,forks,mirrors,templates
  1373. ;;
  1374. ;; Code search engine type, could be `bleve` or `elasticsearch`.
  1375. ;REPO_INDEXER_TYPE = bleve
  1376. ;;
  1377. ;; Index file used for code search. available when `REPO_INDEXER_TYPE` is bleve
  1378. ;REPO_INDEXER_PATH = indexers/repos.bleve
  1379. ;;
  1380. ;; Code indexer connection string, available when `REPO_INDEXER_TYPE` is elasticsearch. i.e. http://elastic:changeme@localhost:9200
  1381. ;REPO_INDEXER_CONN_STR =
  1382. ;;
  1383. ;; Code indexer name, available when `REPO_INDEXER_TYPE` is elasticsearch
  1384. ;REPO_INDEXER_NAME = gitea_codes
  1385. ;;
  1386. ;; A comma separated list of glob patterns (see https://github.com/gobwas/glob) to include
  1387. ;; in the index; default is empty
  1388. ;REPO_INDEXER_INCLUDE =
  1389. ;;
  1390. ;; A comma separated list of glob patterns to exclude from the index; ; default is empty
  1391. ;REPO_INDEXER_EXCLUDE =
  1392. ;;
  1393. ;MAX_FILE_SIZE = 1048576
  1394. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1395. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1396. ;[queue]
  1397. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1398. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1399. ;;
  1400. ;; Specific queues can be individually configured with [queue.name]. [queue] provides defaults
  1401. ;; ([queue.issue_indexer] is special due to the old configuration described above)
  1402. ;;
  1403. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1404. ;;
  1405. ;; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy
  1406. ;; default to persistable-channel
  1407. ;TYPE = persistable-channel
  1408. ;;
  1409. ;; data-dir for storing persistable queues and level queues, individual queues will default to `queues/common` meaning the queue is shared.
  1410. ;DATADIR = queues/ ; Relative paths will be made absolute against `%(APP_DATA_PATH)s`.
  1411. ;;
  1412. ;; Default queue length before a channel queue will block
  1413. ;LENGTH = 100000
  1414. ;;
  1415. ;; Batch size to send for batched queues
  1416. ;BATCH_LENGTH = 20
  1417. ;;
  1418. ;; Connection string for redis queues this will store the redis or redis-cluster connection string.
  1419. ;; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb
  1420. ;; or additional options of the form `leveldb://path/to/db?option=value&....`, and will override `DATADIR`.
  1421. ;CONN_STR = "redis://127.0.0.1:6379/0"
  1422. ;;
  1423. ;; Provides the suffix of the default redis/disk queue name - specific queues can be overridden within in their [queue.name] sections.
  1424. ;QUEUE_NAME = "_queue"
  1425. ;;
  1426. ;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
  1427. ;SET_NAME = "_unique"
  1428. ;;
  1429. ;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
  1430. ;MAX_WORKERS = ; (dynamic)
  1431. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1432. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1433. ;[admin]
  1434. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1435. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1436. ;;
  1437. ;; Disallow regular (non-admin) users from creating organizations.
  1438. ;DISABLE_REGULAR_ORG_CREATION = false
  1439. ;;
  1440. ;; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled
  1441. ;DEFAULT_EMAIL_NOTIFICATIONS = enabled
  1442. ;; Disabled features for users, could be "deletion", "manage_ssh_keys","manage_gpg_keys" more features can be disabled in future
  1443. ;; - deletion: a user cannot delete their own account
  1444. ;; - manage_ssh_keys: a user cannot configure ssh keys
  1445. ;; - manage_gpg_keys: a user cannot configure gpg keys
  1446. ;USER_DISABLED_FEATURES =
  1447. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1448. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1449. ;[openid]
  1450. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1451. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1452. ;;
  1453. ;; OpenID is an open, standard and decentralized authentication protocol.
  1454. ;; Your identity is the address of a webpage you provide, which describes
  1455. ;; how to prove you are in control of that page.
  1456. ;;
  1457. ;; For more info: https://en.wikipedia.org/wiki/OpenID
  1458. ;;
  1459. ;; Current implementation supports OpenID-2.0
  1460. ;;
  1461. ;; Tested to work providers at the time of writing:
  1462. ;; - Any GNUSocial node (your.hostname.tld/username)
  1463. ;; - Any SimpleID provider (http://simpleid.koinic.net)
  1464. ;; - http://openid.org.cn/
  1465. ;; - openid.stackexchange.com
  1466. ;; - login.launchpad.net
  1467. ;; - <username>.livejournal.com
  1468. ;;
  1469. ;; Whether to allow signin in via OpenID
  1470. ;ENABLE_OPENID_SIGNIN = true
  1471. ;;
  1472. ;; Whether to allow registering via OpenID
  1473. ;; Do not include to rely on rhw DISABLE_REGISTRATION setting
  1474. ;;ENABLE_OPENID_SIGNUP = true
  1475. ;;
  1476. ;; Allowed URI patterns (POSIX regexp).
  1477. ;; Space separated.
  1478. ;; Only these would be allowed if non-blank.
  1479. ;; Example value: trusted.domain.org trusted.domain.net
  1480. ;WHITELISTED_URIS =
  1481. ;;
  1482. ;; Forbidden URI patterns (POSIX regexp).
  1483. ;; Space separated.
  1484. ;; Only used if WHITELISTED_URIS is blank.
  1485. ;; Example value: loadaverage.org/badguy stackexchange.com/.*spammer
  1486. ;BLACKLISTED_URIS =
  1487. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1488. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1489. ;[oauth2_client]
  1490. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1491. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1492. ;;
  1493. ;; Whether a new auto registered oauth2 user needs to confirm their email.
  1494. ;; Do not include to use the REGISTER_EMAIL_CONFIRM setting from the `[service]` section.
  1495. ;REGISTER_EMAIL_CONFIRM =
  1496. ;;
  1497. ;; Scopes for the openid connect oauth2 provider (separated by space, the openid scope is implicitly added).
  1498. ;; Typical values are profile and email.
  1499. ;; For more information about the possible values see https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
  1500. ;OPENID_CONNECT_SCOPES =
  1501. ;;
  1502. ;; Automatically create user accounts for new oauth2 users.
  1503. ;ENABLE_AUTO_REGISTRATION = false
  1504. ;;
  1505. ;; The source of the username for new oauth2 accounts:
  1506. ;; userid = use the userid / sub attribute
  1507. ;; nickname = use the nickname attribute
  1508. ;; email = use the username part of the email attribute
  1509. ;; Note: `nickname` and `email` options will normalize input strings using the following criteria:
  1510. ;; - diacritics are removed
  1511. ;; - the characters in the set `['´\x60]` are removed
  1512. ;; - the characters in the set `[\s~+]` are replaced with `-`
  1513. ;USERNAME = nickname
  1514. ;;
  1515. ;; Update avatar if available from oauth2 provider.
  1516. ;; Update will be performed on each login.
  1517. ;UPDATE_AVATAR = false
  1518. ;;
  1519. ;; How to handle if an account / email already exists:
  1520. ;; disabled = show an error
  1521. ;; login = show an account linking login
  1522. ;; auto = link directly with the account
  1523. ;ACCOUNT_LINKING = login
  1524. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1525. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1526. ;[webhook]
  1527. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1528. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1529. ;;
  1530. ;; Hook task queue length, increase if webhook shooting starts hanging
  1531. ;QUEUE_LENGTH = 1000
  1532. ;;
  1533. ;; Deliver timeout in seconds
  1534. ;DELIVER_TIMEOUT = 5
  1535. ;;
  1536. ;; Webhook can only call allowed hosts for security reasons. Comma separated list, eg: external, 192.168.1.0/24, *.mydomain.com
  1537. ;; Built-in: loopback (for localhost), private (for LAN/intranet), external (for public hosts on internet), * (for all hosts)
  1538. ;; CIDR list: 1.2.3.0/8, 2001:db8::/32
  1539. ;; Wildcard hosts: *.mydomain.com, 192.168.100.*
  1540. ;; Since 1.15.7. Default to * for 1.15.x, external for 1.16 and later
  1541. ;ALLOWED_HOST_LIST = external
  1542. ;;
  1543. ;; Allow insecure certification
  1544. ;SKIP_TLS_VERIFY = false
  1545. ;;
  1546. ;; Number of history information in each page
  1547. ;PAGING_NUM = 10
  1548. ;;
  1549. ;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy
  1550. ;PROXY_URL =
  1551. ;;
  1552. ;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
  1553. ;PROXY_HOSTS =
  1554. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1555. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1556. ;[mailer]
  1557. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1558. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1559. ;;
  1560. ;; NOTICE: this section is for Gitea 1.18 and later. If you are using Gitea 1.17 or older,
  1561. ;; please refer to
  1562. ;; https://github.com/go-gitea/gitea/blob/release/v1.17/custom/conf/app.example.ini
  1563. ;; https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md
  1564. ;;
  1565. ;ENABLED = false
  1566. ;;
  1567. ;; Buffer length of channel, keep it as it is if you don't know what it is.
  1568. ;SEND_BUFFER_LEN = 100
  1569. ;;
  1570. ;; Prefix displayed before subject in mail
  1571. ;SUBJECT_PREFIX =
  1572. ;;
  1573. ;; Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy".
  1574. ;; - sendmail: use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
  1575. ;; - dummy: send email messages to the log as a testing phase.
  1576. ;; If your provider does not explicitly say which protocol it uses but does provide a port,
  1577. ;; you can set SMTP_PORT instead and this will be inferred.
  1578. ;; (Before 1.18, see the notice, this was controlled via MAILER_TYPE and IS_TLS_ENABLED.)
  1579. ;PROTOCOL =
  1580. ;;
  1581. ;; Mail server address, e.g. smtp.gmail.com.
  1582. ;; For smtp+unix, this should be a path to a unix socket instead.
  1583. ;; (Before 1.18, see the notice, this was combined with SMTP_PORT as HOST.)
  1584. ;SMTP_ADDR =
  1585. ;;
  1586. ;; Mail server port. Common ports are:
  1587. ;; 25: insecure SMTP
  1588. ;; 465: SMTP Secure
  1589. ;; 587: StartTLS
  1590. ;; If no protocol is specified, it will be inferred by this setting.
  1591. ;; (Before 1.18, this was combined with SMTP_ADDR as HOST.)
  1592. ;SMTP_PORT =
  1593. ;;
  1594. ;; Enable HELO operation. Defaults to true.
  1595. ;ENABLE_HELO = true
  1596. ;;
  1597. ;; Custom hostname for HELO operation.
  1598. ;; If no value is provided, one is retrieved from system.
  1599. ;HELO_HOSTNAME =
  1600. ;;
  1601. ;; If set to `true`, completely ignores server certificate validation errors.
  1602. ;; This option is unsafe. Consider adding the certificate to the system trust store instead.
  1603. ;FORCE_TRUST_SERVER_CERT = false
  1604. ;;
  1605. ;; Use client certificate in connection.
  1606. ;USE_CLIENT_CERT = false
  1607. ;CLIENT_CERT_FILE = custom/mailer/cert.pem
  1608. ;CLIENT_KEY_FILE = custom/mailer/key.pem
  1609. ;;
  1610. ;; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  1611. ;FROM =
  1612. ;;
  1613. ;; Sometimes it is helpful to use a different address on the envelope. Set this to use ENVELOPE_FROM as the from on the envelope. Set to `<>` to send an empty address.
  1614. ;ENVELOPE_FROM =
  1615. ;;
  1616. ;; Mailer user name and password, if required by provider.
  1617. ;USER =
  1618. ;;
  1619. ;; Use PASSWD = `your password` for quoting if you use special characters in the password.
  1620. ;PASSWD =
  1621. ;;
  1622. ;; Send mails only in plain text, without HTML alternative
  1623. ;SEND_AS_PLAIN_TEXT = false
  1624. ;;
  1625. ;; Specify an alternative sendmail binary
  1626. ;SENDMAIL_PATH = sendmail
  1627. ;;
  1628. ;; Specify any extra sendmail arguments
  1629. ;; WARNING: if your sendmail program interprets options you should set this to "--" or terminate these args with "--"
  1630. ;SENDMAIL_ARGS =
  1631. ;;
  1632. ;; Timeout for Sendmail
  1633. ;SENDMAIL_TIMEOUT = 5m
  1634. ;;
  1635. ;; convert \r\n to \n for Sendmail
  1636. ;SENDMAIL_CONVERT_CRLF = true
  1637. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1638. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1639. ;[email.incoming]
  1640. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1641. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1642. ;;
  1643. ;; Enable handling of incoming emails.
  1644. ;ENABLED = false
  1645. ;;
  1646. ;; The email address including the %{token} placeholder that will be replaced per user/action.
  1647. ;; Example: incoming+%{token}@example.com
  1648. ;; The placeholder must appear in the user part of the address (before the @).
  1649. ;REPLY_TO_ADDRESS =
  1650. ;;
  1651. ;; IMAP server host
  1652. ;HOST =
  1653. ;;
  1654. ;; IMAP server port
  1655. ;PORT =
  1656. ;;
  1657. ;; Username of the receiving account
  1658. ;USERNAME =
  1659. ;;
  1660. ;; Password of the receiving account
  1661. ;PASSWORD =
  1662. ;;
  1663. ;; Whether the IMAP server uses TLS.
  1664. ;USE_TLS = false
  1665. ;;
  1666. ;; If set to true, completely ignores server certificate validation errors. This option is unsafe.
  1667. ;SKIP_TLS_VERIFY = true
  1668. ;;
  1669. ;; The mailbox name where incoming mail will end up.
  1670. ;MAILBOX = INBOX
  1671. ;;
  1672. ;; Whether handled messages should be deleted from the mailbox.
  1673. ;DELETE_HANDLED_MESSAGE = true
  1674. ;;
  1675. ;; Maximum size of a message to handle. Bigger messages are ignored. Set to 0 to allow every size.
  1676. ;MAXIMUM_MESSAGE_SIZE = 10485760
  1677. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1678. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1679. ;[cache]
  1680. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1681. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1682. ;;
  1683. ;; Either "memory", "redis", "memcache", or "twoqueue". default is "memory"
  1684. ;ADAPTER = memory
  1685. ;;
  1686. ;; For "memory" only, GC interval in seconds, default is 60
  1687. ;INTERVAL = 60
  1688. ;;
  1689. ;; For "redis", "redis-cluster" and "memcache", connection host address
  1690. ;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1691. ;; redis-cluster: `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1692. ;; memcache: `127.0.0.1:11211`
  1693. ;; twoqueue: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000`
  1694. ;HOST =
  1695. ;;
  1696. ;; Time to keep items in cache if not used, default is 16 hours.
  1697. ;; Setting it to -1 disables caching
  1698. ;ITEM_TTL = 16h
  1699. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1700. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1701. ;; Last commit cache
  1702. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1703. ;[cache.last_commit]
  1704. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1705. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1706. ;;
  1707. ;; Time to keep items in cache if not used, default is 8760 hours.
  1708. ;; Setting it to -1 disables caching
  1709. ;ITEM_TTL = 8760h
  1710. ;;
  1711. ;; Only enable the cache when repository's commits count great than
  1712. ;COMMITS_COUNT = 1000
  1713. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1714. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1715. ;[session]
  1716. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1717. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1718. ;;
  1719. ;; Either "memory", "file", "redis", "redis-cluster", "db", "mysql", "couchbase", "memcache" or "postgres"
  1720. ;; Default is "memory". "db" will reuse the configuration in [database]
  1721. ;PROVIDER = memory
  1722. ;;
  1723. ;; Provider config options
  1724. ;; memory: doesn't have any config yet
  1725. ;; file: session file path, e.g. `data/sessions`
  1726. ;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1727. ;; redis-cluster: `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1728. ;; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  1729. ;PROVIDER_CONFIG = data/sessions ; Relative paths will be made absolute against _`AppWorkPath`_.
  1730. ;;
  1731. ;; Session cookie name
  1732. ;COOKIE_NAME = i_like_gitea
  1733. ;;
  1734. ;; If you use session in https only: true or false. If not set, it defaults to `true` if the ROOT_URL is an HTTPS URL.
  1735. ;COOKIE_SECURE =
  1736. ;;
  1737. ;; Session GC time interval in seconds, default is 86400 (1 day)
  1738. ;GC_INTERVAL_TIME = 86400
  1739. ;;
  1740. ;; Session life time in seconds, default is 86400 (1 day)
  1741. ;SESSION_LIFE_TIME = 86400
  1742. ;;
  1743. ;; SameSite settings. Either "none", "lax", or "strict"
  1744. ;SAME_SITE=lax
  1745. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1746. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1747. ;[picture]
  1748. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1749. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1750. ;;
  1751. ;AVATAR_UPLOAD_PATH = data/avatars
  1752. ;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
  1753. ;;
  1754. ;; How Gitea deals with missing repository avatars
  1755. ;; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used
  1756. ;REPOSITORY_AVATAR_FALLBACK = none
  1757. ;REPOSITORY_AVATAR_FALLBACK_IMAGE = /img/repo_default.png
  1758. ;;
  1759. ;; Max Width and Height of uploaded avatars.
  1760. ;; This is to limit the amount of RAM used when resizing the image.
  1761. ;AVATAR_MAX_WIDTH = 4096
  1762. ;AVATAR_MAX_HEIGHT = 4096
  1763. ;;
  1764. ;; The multiplication factor for rendered avatar images.
  1765. ;; Larger values result in finer rendering on HiDPI devices.
  1766. ;AVATAR_RENDERED_SIZE_FACTOR = 2
  1767. ;;
  1768. ;; Maximum allowed file size for uploaded avatars.
  1769. ;; This is to limit the amount of RAM used when resizing the image.
  1770. ;AVATAR_MAX_FILE_SIZE = 1048576
  1771. ;;
  1772. ;; If the uploaded file is not larger than this byte size, the image will be used as is, without resizing/converting.
  1773. ;AVATAR_MAX_ORIGIN_SIZE = 262144
  1774. ;;
  1775. ;; Chinese users can choose "duoshuo"
  1776. ;; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  1777. ;GRAVATAR_SOURCE = gravatar
  1778. ;;
  1779. ;; This value will always be true in offline mode.
  1780. ;DISABLE_GRAVATAR = false
  1781. ;;
  1782. ;; Federated avatar lookup uses DNS to discover avatar associated
  1783. ;; with emails, see https://www.libravatar.org
  1784. ;; This value will always be false in offline mode or when Gravatar is disabled.
  1785. ;ENABLE_FEDERATED_AVATAR = false
  1786. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1787. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1788. ;[attachment]
  1789. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1790. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1791. ;;
  1792. ;; Whether issue and pull request attachments are enabled. Defaults to `true`
  1793. ;ENABLED = true
  1794. ;;
  1795. ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  1796. ;ALLOWED_TYPES = .csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip
  1797. ;;
  1798. ;; Max size of each file. Defaults to 2048MB
  1799. ;MAX_SIZE = 2048
  1800. ;;
  1801. ;; Max number of files per upload. Defaults to 5
  1802. ;MAX_FILES = 5
  1803. ;;
  1804. ;; Storage type for attachments, `local` for local disk or `minio` for s3 compatible
  1805. ;; object storage service, default is `local`.
  1806. ;STORAGE_TYPE = local
  1807. ;;
  1808. ;; Allows the storage driver to redirect to authenticated URLs to serve files directly
  1809. ;; Currently, only `minio` is supported.
  1810. ;SERVE_DIRECT = false
  1811. ;;
  1812. ;; Path for attachments. Defaults to `attachments`. Only available when STORAGE_TYPE is `local`
  1813. ;; Relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`
  1814. ;PATH = attachments
  1815. ;;
  1816. ;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
  1817. ;MINIO_ENDPOINT = localhost:9000
  1818. ;;
  1819. ;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
  1820. ;MINIO_ACCESS_KEY_ID =
  1821. ;;
  1822. ;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
  1823. ;MINIO_SECRET_ACCESS_KEY =
  1824. ;;
  1825. ;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
  1826. ;MINIO_BUCKET = gitea
  1827. ;;
  1828. ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
  1829. ;MINIO_LOCATION = us-east-1
  1830. ;;
  1831. ;; Minio base path on the bucket only available when STORAGE_TYPE is `minio`
  1832. ;MINIO_BASE_PATH = attachments/
  1833. ;;
  1834. ;; Minio enabled ssl only available when STORAGE_TYPE is `minio`
  1835. ;MINIO_USE_SSL = false
  1836. ;;
  1837. ;; Minio skip SSL verification available when STORAGE_TYPE is `minio`
  1838. ;MINIO_INSECURE_SKIP_VERIFY = false
  1839. ;;
  1840. ;; Minio checksum algorithm: default (for MinIO or AWS S3) or md5 (for Cloudflare or Backblaze)
  1841. ;MINIO_CHECKSUM_ALGORITHM = default
  1842. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1843. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1844. ;[time]
  1845. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1846. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1847. ;;
  1848. ;; Location the UI time display i.e. Asia/Shanghai
  1849. ;; Empty means server's location setting
  1850. ;DEFAULT_UI_LOCATION =
  1851. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1852. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1853. ;[cron]
  1854. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1855. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1856. ;;
  1857. ;; Common settings
  1858. ;;
  1859. ;; Setting this to true will enable all cron tasks periodically with default settings.
  1860. ;ENABLED = false
  1861. ;; Setting this to true will run all enabled cron tasks when Gitea starts.
  1862. ;RUN_AT_START = false
  1863. ;;
  1864. ;; Note: ``SCHEDULE`` accept formats
  1865. ;; - Full crontab specs, e.g. "* * * * * ?"
  1866. ;; - Descriptors, e.g. "@midnight", "@every 1h30m"
  1867. ;; See more: https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14
  1868. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1869. ;; Basic cron tasks - enabled by default
  1870. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1871. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1872. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1873. ;; Clean up old repository archives
  1874. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1875. ;[cron.archive_cleanup]
  1876. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1877. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1878. ;; Whether to enable the job
  1879. ;ENABLED = true
  1880. ;; Whether to always run at least once at start up time (if ENABLED)
  1881. ;RUN_AT_START = true
  1882. ;; Whether to emit notice on successful execution too
  1883. ;NOTICE_ON_SUCCESS = false
  1884. ;; Time interval for job to run
  1885. ;SCHEDULE = @midnight
  1886. ;; Archives created more than OLDER_THAN ago are subject to deletion
  1887. ;OLDER_THAN = 24h
  1888. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1889. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1890. ;; Update mirrors
  1891. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1892. ;[cron.update_mirrors]
  1893. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1894. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1895. ;SCHEDULE = @every 10m
  1896. ;; Enable running Update mirrors task periodically.
  1897. ;ENABLED = true
  1898. ;; Run Update mirrors task when Gitea starts.
  1899. ;RUN_AT_START = false
  1900. ;; Notice if not success
  1901. ;NOTICE_ON_SUCCESS = false
  1902. ;; Limit the number of mirrors added to the queue to this number
  1903. ;; (negative values mean no limit, 0 will result in no result in no mirrors being queued effectively disabling pull mirror updating.)
  1904. ;PULL_LIMIT=50
  1905. ;; Limit the number of mirrors added to the queue to this number
  1906. ;; (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling push mirror updating)
  1907. ;PUSH_LIMIT=50
  1908. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1909. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1910. ;; Repository health check
  1911. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1912. ;[cron.repo_health_check]
  1913. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1914. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1915. ;SCHEDULE = @midnight
  1916. ;; Enable running Repository health check task periodically.
  1917. ;ENABLED = true
  1918. ;; Run Repository health check task when Gitea starts.
  1919. ;RUN_AT_START = false
  1920. ;; Notice if not success
  1921. ;NOTICE_ON_SUCCESS = false
  1922. ;TIMEOUT = 60s
  1923. ;; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  1924. ;; see more on http://git-scm.com/docs/git-fsck
  1925. ;ARGS =
  1926. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1927. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1928. ;; Check repository statistics
  1929. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1930. ;[cron.check_repo_stats]
  1931. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1932. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1933. ;; Enable running check repository statistics task periodically.
  1934. ;ENABLED = true
  1935. ;; Run check repository statistics task when Gitea starts.
  1936. ;RUN_AT_START = true
  1937. ;; Notice if not success
  1938. ;NOTICE_ON_SUCCESS = false
  1939. ;SCHEDULE = @midnight
  1940. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1941. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1942. ;[cron.update_migration_poster_id]
  1943. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1944. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1945. ; Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts.
  1946. ;ENABLED = true
  1947. ;; Update migrated repositories' issues and comments' posterid when starting server (default true)
  1948. ;RUN_AT_START = true
  1949. ;; Notice if not success
  1950. ;NOTICE_ON_SUCCESS = false
  1951. ;; Interval as a duration between each synchronization. (default every 24h)
  1952. ;SCHEDULE = @midnight
  1953. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1954. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1955. ;; Synchronize external user data (only LDAP user synchronization is supported)
  1956. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1957. ;[cron.sync_external_users]
  1958. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1959. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1960. ;ENABLED = true
  1961. ;; Synchronize external user data when starting server (default false)
  1962. ;RUN_AT_START = false
  1963. ;; Notice if not success
  1964. ;NOTICE_ON_SUCCESS = false
  1965. ;; Interval as a duration between each synchronization (default every 24h)
  1966. ;SCHEDULE = @midnight
  1967. ;; Create new users, update existing user data and disable users that are not in external source anymore (default)
  1968. ;; or only create new users if UPDATE_EXISTING is set to false
  1969. ;UPDATE_EXISTING = true
  1970. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1971. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1972. ;; Clean-up deleted branches
  1973. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1974. ;[cron.deleted_branches_cleanup]
  1975. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1976. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1977. ;ENABLED = true
  1978. ;; Clean-up deleted branches when starting server (default true)
  1979. ;RUN_AT_START = true
  1980. ;; Notice if not success
  1981. ;NOTICE_ON_SUCCESS = false
  1982. ;; Interval as a duration between each synchronization (default every 24h)
  1983. ;SCHEDULE = @midnight
  1984. ;; deleted branches than OLDER_THAN ago are subject to deletion
  1985. ;OLDER_THAN = 24h
  1986. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1987. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1988. ;; Cleanup hook_task table
  1989. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1990. ;[cron.cleanup_hook_task_table]
  1991. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1992. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1993. ;; Whether to enable the job
  1994. ;ENABLED = true
  1995. ;; Whether to always run at start up time (if ENABLED)
  1996. ;RUN_AT_START = false
  1997. ;; Time interval for job to run
  1998. ;SCHEDULE = @midnight
  1999. ;; OlderThan or PerWebhook. How the records are removed, either by age (i.e. how long ago hook_task record was delivered) or by the number to keep per webhook (i.e. keep most recent x deliveries per webhook).
  2000. ;CLEANUP_TYPE = OlderThan
  2001. ;; If CLEANUP_TYPE is set to OlderThan, then any delivered hook_task records older than this expression will be deleted.
  2002. ;OLDER_THAN = 168h
  2003. ;; If CLEANUP_TYPE is set to PerWebhook, this is number of hook_task records to keep for a webhook (i.e. keep the most recent x deliveries).
  2004. ;NUMBER_TO_KEEP = 10
  2005. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2006. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2007. ;; Cleanup expired packages
  2008. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2009. ;[cron.cleanup_packages]
  2010. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2011. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2012. ;; Whether to enable the job
  2013. ;ENABLED = true
  2014. ;; Whether to always run at least once at start up time (if ENABLED)
  2015. ;RUN_AT_START = true
  2016. ;; Whether to emit notice on successful execution too
  2017. ;NOTICE_ON_SUCCESS = false
  2018. ;; Time interval for job to run
  2019. ;SCHEDULE = @midnight
  2020. ;; Unreferenced blobs created more than OLDER_THAN ago are subject to deletion
  2021. ;OLDER_THAN = 24h
  2022. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2023. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2024. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2025. ; Extended cron task - not enabled by default
  2026. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2027. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2028. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2029. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2030. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2031. ;; Delete all unactivated accounts
  2032. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2033. ;[cron.delete_inactive_accounts]
  2034. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2035. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2036. ;ENABLED = false
  2037. ;RUN_AT_START = false
  2038. ;NOTICE_ON_SUCCESS = false
  2039. ;SCHEDULE = @annually
  2040. ;OLDER_THAN = 168h
  2041. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2042. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2043. ;; Delete all repository archives
  2044. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2045. ;[cron.delete_repo_archives]
  2046. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2047. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2048. ;ENABLED = false
  2049. ;RUN_AT_START = false
  2050. ;NOTICE_ON_SUCCESS = false
  2051. ;SCHEDULE = @annually;
  2052. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2053. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2054. ;; Garbage collect all repositories
  2055. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2056. ;[cron.git_gc_repos]
  2057. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2058. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2059. ;ENABLED = false
  2060. ;RUN_AT_START = false
  2061. ;NOTICE_ON_SUCCESS = false
  2062. ;SCHEDULE = @every 72h
  2063. ;TIMEOUT = 60s
  2064. ;; Arguments for command 'git gc'
  2065. ;; The default value is same with [git] -> GC_ARGS
  2066. ;ARGS =
  2067. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2068. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2069. ;; Update the '.ssh/authorized_keys' file with Gitea SSH keys
  2070. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2071. ;[cron.resync_all_sshkeys]
  2072. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2073. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2074. ;ENABLED = false
  2075. ;RUN_AT_START = false
  2076. ;NOTICE_ON_SUCCESS = false
  2077. ;SCHEDULE = @every 72h
  2078. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2079. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2080. ;; Resynchronize pre-receive, update and post-receive hooks of all repositories.
  2081. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2082. ;[cron.resync_all_hooks]
  2083. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2084. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2085. ;ENABLED = false
  2086. ;RUN_AT_START = false
  2087. ;NOTICE_ON_SUCCESS = false
  2088. ;SCHEDULE = @every 72h
  2089. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2090. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2091. ;; Reinitialize all missing Git repositories for which records exist
  2092. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2093. ;[cron.reinit_missing_repos]
  2094. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2095. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2096. ;ENABLED = false
  2097. ;RUN_AT_START = false
  2098. ;NOTICE_ON_SUCCESS = false
  2099. ;SCHEDULE = @every 72h
  2100. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2101. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2102. ;; Delete all repositories missing their Git files
  2103. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2104. ;[cron.delete_missing_repos]
  2105. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2106. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2107. ;ENABLED = false
  2108. ;RUN_AT_START = false
  2109. ;NOTICE_ON_SUCCESS = false
  2110. ;SCHEDULE = @every 72h
  2111. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2112. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2113. ;; Delete generated repository avatars
  2114. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2115. ;[cron.delete_generated_repository_avatars]
  2116. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2117. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2118. ;ENABLED = false
  2119. ;RUN_AT_START = false
  2120. ;NOTICE_ON_SUCCESS = false
  2121. ;SCHEDULE = @every 72h
  2122. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2123. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2124. ;; Delete all old actions from database
  2125. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2126. ;[cron.delete_old_actions]
  2127. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2128. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2129. ;ENABLED = false
  2130. ;RUN_AT_START = false
  2131. ;NOTICE_ON_SUCCESS = false
  2132. ;SCHEDULE = @every 168h
  2133. ;OLDER_THAN = 8760h
  2134. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2135. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2136. ;; Check for new Gitea versions
  2137. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2138. ;[cron.update_checker]
  2139. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2140. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2141. ;ENABLED = true
  2142. ;RUN_AT_START = false
  2143. ;ENABLE_SUCCESS_NOTICE = false
  2144. ;SCHEDULE = @every 168h
  2145. ;HTTP_ENDPOINT = https://dl.gitea.com/gitea/version.json
  2146. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2147. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2148. ;; Delete all old system notices from database
  2149. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2150. ;[cron.delete_old_system_notices]
  2151. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2152. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2153. ;ENABLED = false
  2154. ;RUN_AT_START = false
  2155. ;NO_SUCCESS_NOTICE = false
  2156. ;SCHEDULE = @every 168h
  2157. ;OLDER_THAN = 8760h
  2158. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2159. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2160. ;; Garbage collect LFS pointers in repositories
  2161. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2162. ;[cron.gc_lfs]
  2163. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2164. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2165. ;ENABLED = false
  2166. ;; Garbage collect LFS pointers in repositories (default false)
  2167. ;RUN_AT_START = false
  2168. ;; Interval as a duration between each gc run (default every 24h)
  2169. ;SCHEDULE = @every 24h
  2170. ;; Only attempt to garbage collect LFSMetaObjects older than this (default 7 days)
  2171. ;OLDER_THAN = 168h
  2172. ;; Only attempt to garbage collect LFSMetaObjects that have not been attempted to be garbage collected for this long (default 3 days)
  2173. ;LAST_UPDATED_MORE_THAN_AGO = 72h
  2174. ; Minimum number of stale LFSMetaObjects to check per repo. Set to `0` to always check all.
  2175. ;NUMBER_TO_CHECK_PER_REPO = 100
  2176. ;Check at least this proportion of LFSMetaObjects per repo. (This may cause all stale LFSMetaObjects to be checked.)
  2177. ;PROPORTION_TO_CHECK_PER_REPO = 0.6
  2178. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2179. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2180. ;[mirror]
  2181. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2182. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2183. ;; Enables the mirror functionality. Set to **false** to disable all mirrors. Pre-existing mirrors remain valid but won't be updated; may be converted to regular repo.
  2184. ;ENABLED = true
  2185. ;; Disable the creation of **new** pull mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
  2186. ;DISABLE_NEW_PULL = false
  2187. ;; Disable the creation of **new** push mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
  2188. ;DISABLE_NEW_PUSH = false
  2189. ;; Default interval as a duration between each check
  2190. ;DEFAULT_INTERVAL = 8h
  2191. ;; Min interval as a duration must be > 1m
  2192. ;MIN_INTERVAL = 10m
  2193. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2194. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2195. ;[api]
  2196. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2197. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2198. ;; Enables the API documentation endpoints (/api/swagger, /api/v1/swagger, …). True or false.
  2199. ;ENABLE_SWAGGER = true
  2200. ;; Max number of items in a page
  2201. ;MAX_RESPONSE_ITEMS = 50
  2202. ;; Default paging number of api
  2203. ;DEFAULT_PAGING_NUM = 30
  2204. ;; Default and maximum number of items per page for git trees api
  2205. ;DEFAULT_GIT_TREES_PER_PAGE = 1000
  2206. ;; Default max size of a blob returned by the blobs API (default is 10MiB)
  2207. ;DEFAULT_MAX_BLOB_SIZE = 10485760
  2208. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2209. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2210. ;[i18n]
  2211. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2212. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2213. ;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
  2214. ;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
  2215. ;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം
  2216. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2217. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2218. ;[highlight.mapping]
  2219. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2220. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2221. ;; Extension mapping to highlight class
  2222. ;; e.g. .toml=ini
  2223. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2224. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2225. ;[other]
  2226. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2227. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2228. ;; Show version information about Gitea and Go in the footer
  2229. ;SHOW_FOOTER_VERSION = true
  2230. ;; Show template execution time in the footer
  2231. ;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
  2232. ;; Generate sitemap. Defaults to `true`.
  2233. ;ENABLE_SITEMAP = true
  2234. ;; Enable/Disable RSS/Atom feed
  2235. ;ENABLE_FEED = true
  2236. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2237. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2238. ;[markup]
  2239. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2240. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2241. ;; Set the maximum number of characters in a mermaid source. (Set to -1 to disable limits)
  2242. ;MERMAID_MAX_SOURCE_CHARACTERS = 5000
  2243. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2244. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2245. ;[markup.sanitizer.1]
  2246. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2247. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2248. ;; The following keys can appear once to define a sanitation policy rule.
  2249. ;; This section can appear multiple times by adding a unique alphanumeric suffix to define multiple rules.
  2250. ;; e.g., [markup.sanitizer.1] -> [markup.sanitizer.2] -> [markup.sanitizer.TeX]
  2251. ;ELEMENT = span
  2252. ;ALLOW_ATTR = class
  2253. ;REGEXP = ^(info|warning|error)$
  2254. ;;
  2255. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2256. ;; Other markup formats e.g. asciidoc
  2257. ;;
  2258. ;; uncomment and enable the below section.
  2259. ;; (You can add other markup formats by copying the section and adjusting
  2260. ;; the section name suffix "asciidoc" to something else.)
  2261. ;[markup.asciidoc]
  2262. ;ENABLED = false
  2263. ;; List of file extensions that should be rendered by an external command
  2264. ;FILE_EXTENSIONS = .adoc,.asciidoc
  2265. ;; External command to render all matching extensions
  2266. ;RENDER_COMMAND = "asciidoc --out-file=- -"
  2267. ;; Don't pass the file on STDIN, pass the filename as argument instead.
  2268. ;IS_INPUT_FILE = false
  2269. ;; How the content will be rendered.
  2270. ;; * sanitized: Sanitize the content and render it inside current page, default to only allow a few HTML tags and attributes. Customized sanitizer rules can be defined in [markup.sanitizer.*] .
  2271. ;; * no-sanitizer: Disable the sanitizer and render the content inside current page. It's **insecure** and may lead to XSS attack if the content contains malicious code.
  2272. ;; * iframe: Render the content in a separate standalone page and embed it into current page by iframe. The iframe is in sandbox mode with same-origin disabled, and the JS code are safely isolated from parent page.
  2273. ;RENDER_CONTENT_MODE=sanitized
  2274. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2275. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2276. ;[metrics]
  2277. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2278. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2279. ;; Enables metrics endpoint. True or false; default is false.
  2280. ;ENABLED = false
  2281. ;; If you want to add authorization, specify a token here
  2282. ;TOKEN =
  2283. ;; Enable issue by label metrics; default is false
  2284. ;ENABLED_ISSUE_BY_LABEL = false
  2285. ;; Enable issue by repository metrics; default is false
  2286. ;ENABLED_ISSUE_BY_REPOSITORY = false
  2287. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2288. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2289. ;[task]
  2290. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2291. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2292. ;;
  2293. ;; Task queue type, could be `channel` or `redis`.
  2294. ;QUEUE_TYPE = channel
  2295. ;;
  2296. ;; Task queue length, available only when `QUEUE_TYPE` is `channel`.
  2297. ;QUEUE_LENGTH = 1000
  2298. ;;
  2299. ;; Task queue connection string, available only when `QUEUE_TYPE` is `redis`.
  2300. ;; If there is a password of redis, use `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` or `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` for `redis-clsuter`.
  2301. ;QUEUE_CONN_STR = "redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s"
  2302. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2303. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2304. ;[migrations]
  2305. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2306. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2307. ;;
  2308. ;; Max attempts per http/https request on migrations.
  2309. ;MAX_ATTEMPTS = 3
  2310. ;;
  2311. ;; Backoff time per http/https request retry (seconds)
  2312. ;RETRY_BACKOFF = 3
  2313. ;;
  2314. ;; Allowed domains for migrating, default is blank. Blank means everything will be allowed.
  2315. ;; Multiple domains could be separated by commas.
  2316. ;; Wildcard is supported: "github.com, *.github.com"
  2317. ;ALLOWED_DOMAINS =
  2318. ;;
  2319. ;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas.
  2320. ;; When ALLOWED_DOMAINS is not blank, this option has a higher priority to deny domains.
  2321. ;; Wildcard is supported.
  2322. ;BLOCKED_DOMAINS =
  2323. ;;
  2324. ;; Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 (false by default)
  2325. ;; If a domain is allowed by ALLOWED_DOMAINS, this option will be ignored.
  2326. ;ALLOW_LOCALNETWORKS = false
  2327. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2328. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2329. ;[federation]
  2330. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2331. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2332. ;;
  2333. ;; Enable/Disable federation capabilities
  2334. ;ENABLED = false
  2335. ;;
  2336. ;; Enable/Disable user statistics for nodeinfo if federation is enabled
  2337. ;SHARE_USER_STATISTICS = true
  2338. ;;
  2339. ;; Maximum federation request and response size (MB)
  2340. ;MAX_SIZE = 4
  2341. ;;
  2342. ;; WARNING: Changing the settings below can break federation.
  2343. ;;
  2344. ;; HTTP signature algorithms
  2345. ;ALGORITHMS = rsa-sha256, rsa-sha512, ed25519
  2346. ;;
  2347. ;; HTTP signature digest algorithm
  2348. ;DIGEST_ALGORITHM = SHA-256
  2349. ;;
  2350. ;; GET headers for federation requests
  2351. ;GET_HEADERS = (request-target), Date
  2352. ;;
  2353. ;; POST headers for federation requests
  2354. ;POST_HEADERS = (request-target), Date, Digest
  2355. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2356. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2357. ;[packages]
  2358. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2359. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2360. ;;
  2361. ;; Enable/Disable package registry capabilities
  2362. ;ENABLED = true
  2363. ;;
  2364. ;STORAGE_TYPE = local
  2365. ;; override the minio base path if storage type is minio
  2366. ;MINIO_BASE_PATH = packages/
  2367. ;;
  2368. ;; Path for chunked uploads. Defaults to APP_DATA_PATH + `tmp/package-upload`
  2369. ;CHUNKED_UPLOAD_PATH = tmp/package-upload
  2370. ;;
  2371. ;; Maximum count of package versions a single owner can have (`-1` means no limits)
  2372. ;LIMIT_TOTAL_OWNER_COUNT = -1
  2373. ;; Maximum size of packages a single owner can use (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2374. ;LIMIT_TOTAL_OWNER_SIZE = -1
  2375. ;; Maximum size of an Alpine upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2376. ;LIMIT_SIZE_ALPINE = -1
  2377. ;; Maximum size of a Cargo upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2378. ;LIMIT_SIZE_CARGO = -1
  2379. ;; Maximum size of a Chef upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2380. ;LIMIT_SIZE_CHEF = -1
  2381. ;; Maximum size of a Composer upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2382. ;LIMIT_SIZE_COMPOSER = -1
  2383. ;; Maximum size of a Conan upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2384. ;LIMIT_SIZE_CONAN = -1
  2385. ;; Maximum size of a Conda upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2386. ;LIMIT_SIZE_CONDA = -1
  2387. ;; Maximum size of a Container upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2388. ;LIMIT_SIZE_CONTAINER = -1
  2389. ;; Maximum size of a CRAN upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2390. ;LIMIT_SIZE_CRAN = -1
  2391. ;; Maximum size of a Debian upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2392. ;LIMIT_SIZE_DEBIAN = -1
  2393. ;; Maximum size of a Generic upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2394. ;LIMIT_SIZE_GENERIC = -1
  2395. ;; Maximum size of a Go upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2396. ;LIMIT_SIZE_GO = -1
  2397. ;; Maximum size of a Helm upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2398. ;LIMIT_SIZE_HELM = -1
  2399. ;; Maximum size of a Maven upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2400. ;LIMIT_SIZE_MAVEN = -1
  2401. ;; Maximum size of a npm upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2402. ;LIMIT_SIZE_NPM = -1
  2403. ;; Maximum size of a NuGet upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2404. ;LIMIT_SIZE_NUGET = -1
  2405. ;; Maximum size of a Pub upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2406. ;LIMIT_SIZE_PUB = -1
  2407. ;; Maximum size of a PyPI upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2408. ;LIMIT_SIZE_PYPI = -1
  2409. ;; Maximum size of a RPM upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2410. ;LIMIT_SIZE_RPM = -1
  2411. ;; Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2412. ;LIMIT_SIZE_RUBYGEMS = -1
  2413. ;; Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2414. ;LIMIT_SIZE_SWIFT = -1
  2415. ;; Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2416. ;LIMIT_SIZE_VAGRANT = -1
  2417. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2418. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2419. ;; default storage for attachments, lfs and avatars
  2420. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2421. ;[storage]
  2422. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2423. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2424. ;; storage type
  2425. ;STORAGE_TYPE = local
  2426. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2427. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2428. ;; repo-archive storage will override storage
  2429. ;;
  2430. ;[repo-archive]
  2431. ;STORAGE_TYPE = local
  2432. ;;
  2433. ;; Where your lfs files reside, default is data/lfs.
  2434. ;PATH = data/repo-archive
  2435. ;;
  2436. ;; override the minio base path if storage type is minio
  2437. ;MINIO_BASE_PATH = repo-archive/
  2438. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2439. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2440. ;; settings for repository archives, will override storage setting
  2441. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2442. ;[storage.repo-archive]
  2443. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2444. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2445. ;; storage type
  2446. ;STORAGE_TYPE = local
  2447. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2448. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2449. ;; lfs storage will override storage
  2450. ;;
  2451. ;[lfs]
  2452. ;STORAGE_TYPE = local
  2453. ;;
  2454. ;; Where your lfs files reside, default is data/lfs.
  2455. ;PATH = data/lfs
  2456. ;;
  2457. ;; override the minio base path if storage type is minio
  2458. ;MINIO_BASE_PATH = lfs/
  2459. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2460. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2461. ;; settings for packages, will override storage setting
  2462. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2463. ;[storage.packages]
  2464. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2465. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2466. ;; storage type
  2467. ;STORAGE_TYPE = local
  2468. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2469. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2470. ;; customize storage
  2471. ;[storage.my_minio]
  2472. ;STORAGE_TYPE = minio
  2473. ;;
  2474. ;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
  2475. ;MINIO_ENDPOINT = localhost:9000
  2476. ;;
  2477. ;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
  2478. ;MINIO_ACCESS_KEY_ID =
  2479. ;;
  2480. ;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
  2481. ;MINIO_SECRET_ACCESS_KEY =
  2482. ;;
  2483. ;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
  2484. ;MINIO_BUCKET = gitea
  2485. ;;
  2486. ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
  2487. ;MINIO_LOCATION = us-east-1
  2488. ;;
  2489. ;; Minio enabled ssl only available when STORAGE_TYPE is `minio`
  2490. ;MINIO_USE_SSL = false
  2491. ;;
  2492. ;; Minio skip SSL verification available when STORAGE_TYPE is `minio`
  2493. ;MINIO_INSECURE_SKIP_VERIFY = false
  2494. ;[proxy]
  2495. ;; Enable the proxy, all requests to external via HTTP will be affected
  2496. ;PROXY_ENABLED = false
  2497. ;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy/no_proxy
  2498. ;PROXY_URL =
  2499. ;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
  2500. ;PROXY_HOSTS =
  2501. ; [actions]
  2502. ;; Enable/Disable actions capabilities
  2503. ;ENABLED = true
  2504. ;;
  2505. ;; Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
  2506. ;DEFAULT_ACTIONS_URL = github
  2507. ;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
  2508. ;ARTIFACT_RETENTION_DAYS = 90
  2509. ;; Timeout to stop the task which have running status, but haven't been updated for a long time
  2510. ;ZOMBIE_TASK_TIMEOUT = 10m
  2511. ;; Timeout to stop the tasks which have running status and continuous updates, but don't end for a long time
  2512. ;ENDLESS_TASK_TIMEOUT = 3h
  2513. ;; Timeout to cancel the jobs which have waiting status, but haven't been picked by a runner for a long time
  2514. ;ABANDONED_JOB_TIMEOUT = 24h
  2515. ;; Strings committers can place inside a commit message or PR title to skip executing the corresponding actions workflow
  2516. ;SKIP_WORKFLOW_STRINGS = [skip ci],[ci skip],[no ci],[skip actions],[actions skip]
  2517. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2518. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2519. ;; settings for action logs, will override storage setting
  2520. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2521. ;[storage.actions_log]
  2522. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2523. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2524. ;; storage type
  2525. ;STORAGE_TYPE = local