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 104KB

10 years ago
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 year ago
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 year ago
10 years ago
10 years ago
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 year ago
10 years ago
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 year ago
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 years ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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 year ago
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>
1 year ago
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>
1 year ago
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 year ago
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 years ago
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
2 years ago
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
2 years ago
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
2 years ago
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
2 years ago
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
2 years ago
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 years ago
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 years ago
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 years ago
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 years ago
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 year ago
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 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597
  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. ;PROTOCOL = http
  60. ;;
  61. ;; Expect PROXY protocol headers on connections
  62. ;USE_PROXY_PROTOCOL = false
  63. ;;
  64. ;; Use PROXY protocol in TLS Bridging mode
  65. ;PROXY_PROTOCOL_TLS_BRIDGING = false
  66. ;;
  67. ; Timeout to wait for PROXY protocol header (set to 0 to have no timeout)
  68. ;PROXY_PROTOCOL_HEADER_TIMEOUT=5s
  69. ;;
  70. ; Accept PROXY protocol headers with UNKNOWN type
  71. ;PROXY_PROTOCOL_ACCEPT_UNKNOWN=false
  72. ;;
  73. ;; Set the domain for the server
  74. ;DOMAIN = localhost
  75. ;;
  76. ;; Overwrite the automatically generated public URL. Necessary for proxies and docker.
  77. ;ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  78. ;;
  79. ;; when STATIC_URL_PREFIX is empty it will follow ROOT_URL
  80. ;STATIC_URL_PREFIX =
  81. ;;
  82. ;; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
  83. ;; If PROTOCOL is set to `http+unix` or `fcgi+unix`, this should be the name of the Unix socket file to use.
  84. ;; Relative paths will be made absolute against the _`AppWorkPath`_.
  85. ;HTTP_ADDR = 0.0.0.0
  86. ;;
  87. ;; The port to listen on. Leave empty when using a unix socket.
  88. ;HTTP_PORT = 3000
  89. ;;
  90. ;; If REDIRECT_OTHER_PORT is true, and PROTOCOL is set to https an http server
  91. ;; will be started on PORT_TO_REDIRECT and it will redirect plain, non-secure http requests to the main
  92. ;; ROOT_URL. Defaults are false for REDIRECT_OTHER_PORT and 80 for
  93. ;; PORT_TO_REDIRECT.
  94. ;REDIRECT_OTHER_PORT = false
  95. ;PORT_TO_REDIRECT = 80
  96. ;;
  97. ;; expect PROXY protocol header on connections to https redirector.
  98. ;REDIRECTOR_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)s
  99. ;; Minimum and maximum supported TLS versions
  100. ;SSL_MIN_VERSION=TLSv1.2
  101. ;SSL_MAX_VERSION=
  102. ;;
  103. ;; SSL Curve Preferences
  104. ;SSL_CURVE_PREFERENCES=X25519,P256
  105. ;;
  106. ;; SSL Cipher Suites
  107. ;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.
  108. ;;
  109. ;; Timeout for any write to the connection. (Set to -1 to disable all timeouts.)
  110. ;PER_WRITE_TIMEOUT = 30s
  111. ;;
  112. ;; Timeout per Kb written to connections.
  113. ;PER_WRITE_PER_KB_TIMEOUT = 30s
  114. ;;
  115. ;; Permission for unix socket
  116. ;UNIX_SOCKET_PERMISSION = 666
  117. ;;
  118. ;; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service. In
  119. ;; most cases you do not need to change the default value. Alter it only if
  120. ;; your SSH server node is not the same as HTTP node. For different protocol, the default
  121. ;; values are different. If `PROTOCOL` is `http+unix`, the default value is `http://unix/`.
  122. ;; If `PROTOCOL` is `fcgi` or `fcgi+unix`, the default value is `%(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/`.
  123. ;; If listen on `0.0.0.0`, the default value is `%(PROTOCOL)s://localhost:%(HTTP_PORT)s/`, Otherwise the default
  124. ;; value is `%(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/`.
  125. ;LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
  126. ;;
  127. ;; When making local connections pass the PROXY protocol header.
  128. ;LOCAL_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)s
  129. ;;
  130. ;; Disable SSH feature when not available
  131. ;DISABLE_SSH = false
  132. ;;
  133. ;; Whether to use the builtin SSH server or not.
  134. ;START_SSH_SERVER = false
  135. ;;
  136. ;; Expect PROXY protocol header on connections to the built-in SSH server
  137. ;SSH_SERVER_USE_PROXY_PROTOCOL = false
  138. ;;
  139. ;; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER.
  140. ;BUILTIN_SSH_SERVER_USER = %(RUN_USER)s
  141. ;;
  142. ;; Domain name to be exposed in clone URL
  143. ;SSH_DOMAIN = %(DOMAIN)s
  144. ;;
  145. ;; SSH username displayed in clone URLs.
  146. ;SSH_USER = %(BUILTIN_SSH_SERVER_USER)s
  147. ;;
  148. ;; The network interface the builtin SSH server should listen on
  149. ;SSH_LISTEN_HOST =
  150. ;;
  151. ;; Port number to be exposed in clone URL
  152. ;SSH_PORT = 22
  153. ;;
  154. ;; The port number the builtin SSH server should listen on
  155. ;SSH_LISTEN_PORT = %(SSH_PORT)s
  156. ;;
  157. ;; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
  158. ;SSH_ROOT_PATH =
  159. ;;
  160. ;; Gitea will create a authorized_keys file by default when it is not using the internal ssh server
  161. ;; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
  162. ;SSH_CREATE_AUTHORIZED_KEYS_FILE = true
  163. ;;
  164. ;; Gitea will create a authorized_principals file by default when it is not using the internal ssh server
  165. ;; If you intend to use the AuthorizedPrincipalsCommand functionality then you should turn this off.
  166. ;SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE = true
  167. ;;
  168. ;; For the built-in SSH server, choose the ciphers to support for SSH connections,
  169. ;; for system SSH this setting has no effect
  170. ;SSH_SERVER_CIPHERS = chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com
  171. ;;
  172. ;; For the built-in SSH server, choose the key exchange algorithms to support for SSH connections,
  173. ;; for system SSH this setting has no effect
  174. ;SSH_SERVER_KEY_EXCHANGES = curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1
  175. ;;
  176. ;; For the built-in SSH server, choose the MACs to support for SSH connections,
  177. ;; for system SSH this setting has no effect
  178. ;SSH_SERVER_MACS = hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1
  179. ;;
  180. ;; For the built-in SSH server, choose the keypair to offer as the host key
  181. ;; The private key should be at SSH_SERVER_HOST_KEY and the public SSH_SERVER_HOST_KEY.pub
  182. ;; relative paths are made absolute relative to the %(APP_DATA_PATH)s
  183. ;SSH_SERVER_HOST_KEYS=ssh/gitea.rsa, ssh/gogs.rsa
  184. ;;
  185. ;; Directory to create temporary files in when testing public keys using ssh-keygen,
  186. ;; default is the system temporary directory.
  187. ;SSH_KEY_TEST_PATH =
  188. ;;
  189. ;; Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself.
  190. ;SSH_KEYGEN_PATH =
  191. ;;
  192. ;; Enable SSH Authorized Key Backup when rewriting all keys, default is false
  193. ;SSH_AUTHORIZED_KEYS_BACKUP = false
  194. ;;
  195. ;; Determines which principals to allow
  196. ;; - empty: if SSH_TRUSTED_USER_CA_KEYS is empty this will default to off, otherwise will default to email, username.
  197. ;; - off: Do not allow authorized principals
  198. ;; - email: the principal must match the user's email
  199. ;; - username: the principal must match the user's username
  200. ;; - anything: there will be no checking on the content of the principal
  201. ;SSH_AUTHORIZED_PRINCIPALS_ALLOW = email, username
  202. ;;
  203. ;; Enable SSH Authorized Principals Backup when rewriting all keys, default is true
  204. ;SSH_AUTHORIZED_PRINCIPALS_BACKUP = true
  205. ;;
  206. ;; Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication.
  207. ;; Multiple keys should be comma separated.
  208. ;; E.g."ssh-<algorithm> <key>". or "ssh-<algorithm> <key1>, ssh-<algorithm> <key2>".
  209. ;; For more information see "TrustedUserCAKeys" in the sshd config manpages.
  210. ;SSH_TRUSTED_USER_CA_KEYS =
  211. ;; Absolute path of the `TrustedUserCaKeys` file gitea will manage.
  212. ;; Default this `RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem
  213. ;; If you're running your own ssh server and you want to use the gitea managed file you'll also need to modify your
  214. ;; sshd_config to point to this file. The official docker image will automatically work without further configuration.
  215. ;SSH_TRUSTED_USER_CA_KEYS_FILENAME =
  216. ;;
  217. ;; Enable exposure of SSH clone URL to anonymous visitors, default is false
  218. ;SSH_EXPOSE_ANONYMOUS = false
  219. ;;
  220. ;; Timeout for any write to ssh connections. (Set to -1 to disable all timeouts.)
  221. ;; Will default to the PER_WRITE_TIMEOUT.
  222. ;SSH_PER_WRITE_TIMEOUT = 30s
  223. ;;
  224. ;; Timeout per Kb written to ssh connections.
  225. ;; Will default to the PER_WRITE_PER_KB_TIMEOUT.
  226. ;SSH_PER_WRITE_PER_KB_TIMEOUT = 30s
  227. ;;
  228. ;; Indicate whether to check minimum key size with corresponding type
  229. ;MINIMUM_KEY_SIZE_CHECK = false
  230. ;;
  231. ;; Disable CDN even in "prod" mode
  232. ;OFFLINE_MODE = false
  233. ;;
  234. ;; TLS Settings: Either ACME or manual
  235. ;; (Other common TLS configuration are found before)
  236. ;ENABLE_ACME = false
  237. ;;
  238. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  239. ;;
  240. ;; ACME automatic TLS settings
  241. ;;
  242. ;; ACME directory URL (e.g. LetsEncrypt's staging/testing URL: https://acme-staging-v02.api.letsencrypt.org/directory)
  243. ;; Leave empty to default to LetsEncrypt's (production) URL
  244. ;ACME_URL =
  245. ;;
  246. ;; Explicitly accept the ACME's TOS. The specific TOS cannot be retrieved at the moment.
  247. ;ACME_ACCEPTTOS = false
  248. ;;
  249. ;; If the ACME CA is not in your system's CA trust chain, it can be manually added here
  250. ;ACME_CA_ROOT =
  251. ;;
  252. ;; Email used for the ACME registration service
  253. ;; Can be left blank to initialize at first run and use the cached value
  254. ;ACME_EMAIL =
  255. ;;
  256. ;; ACME live directory (not to be confused with ACME directory URL: ACME_URL)
  257. ;; (Refer to caddy's ACME manager https://github.com/caddyserver/certmagic)
  258. ;ACME_DIRECTORY = https
  259. ;;
  260. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  261. ;;
  262. ;; Manual TLS settings: (Only applicable if ENABLE_ACME=false)
  263. ;;
  264. ;; Generate steps:
  265. ;; $ ./gitea cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  266. ;;
  267. ;; Or from a .pfx file exported from the Windows certificate store (do
  268. ;; not forget to export the private key):
  269. ;; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  270. ;; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  271. ;; Paths are relative to CUSTOM_PATH
  272. ;CERT_FILE = https/cert.pem
  273. ;KEY_FILE = https/key.pem
  274. ;;
  275. ;; Root directory containing templates and static files.
  276. ;; default is the path where Gitea is executed
  277. ;STATIC_ROOT_PATH = ; Will default to the built-in value _`StaticRootPath`_
  278. ;;
  279. ;; Default path for App data
  280. ;APP_DATA_PATH = data ; relative paths will be made absolute with _`AppWorkPath`_
  281. ;;
  282. ;; Enable gzip compression for runtime-generated content, static resources excluded
  283. ;ENABLE_GZIP = false
  284. ;;
  285. ;; Application profiling (memory and cpu)
  286. ;; For "web" command it listens on localhost:6060
  287. ;; For "serve" command it dumps to disk at PPROF_DATA_PATH as (cpuprofile|memprofile)_<username>_<temporary id>
  288. ;ENABLE_PPROF = false
  289. ;;
  290. ;; PPROF_DATA_PATH, use an absolute path when you start gitea as service
  291. ;PPROF_DATA_PATH = data/tmp/pprof ; Path is relative to _`AppWorkPath`_
  292. ;;
  293. ;; Landing page, can be "home", "explore", "organizations", "login", or any URL such as "/org/repo" or even "https://anotherwebsite.com"
  294. ;; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in.
  295. ;LANDING_PAGE = home
  296. ;;
  297. ;; Enables git-lfs support. true or false, default is false.
  298. ;LFS_START_SERVER = false
  299. ;;
  300. ;;
  301. ;; LFS authentication secret, change this yourself
  302. ;LFS_JWT_SECRET =
  303. ;;
  304. ;; Alternative location to specify LFS authentication secret. You cannot specify both this and LFS_JWT_SECRET, and must pick one
  305. ;LFS_JWT_SECRET_URI = file:/etc/gitea/lfs_jwt_secret
  306. ;;
  307. ;; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail.
  308. ;LFS_HTTP_AUTH_EXPIRY = 24h
  309. ;;
  310. ;; Maximum allowed LFS file size in bytes (Set to 0 for no limit).
  311. ;LFS_MAX_FILE_SIZE = 0
  312. ;;
  313. ;; Maximum number of locks returned per page
  314. ;LFS_LOCKS_PAGING_NUM = 50
  315. ;;
  316. ;; Allow graceful restarts using SIGHUP to fork
  317. ;ALLOW_GRACEFUL_RESTARTS = true
  318. ;;
  319. ;; After a restart the parent will finish ongoing requests before
  320. ;; shutting down. Force shutdown if this process takes longer than this delay.
  321. ;; set to a negative value to disable
  322. ;GRACEFUL_HAMMER_TIME = 60s
  323. ;;
  324. ;; Allows the setting of a startup timeout and waithint for Windows as SVC service
  325. ;; 0 disables this.
  326. ;STARTUP_TIMEOUT = 0
  327. ;;
  328. ;; 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
  329. ;STATIC_CACHE_TIME = 6h
  330. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  331. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  332. [database]
  333. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  334. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  335. ;;
  336. ;; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3".
  337. ;;
  338. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  339. ;;
  340. ;; MySQL Configuration
  341. ;;
  342. DB_TYPE = mysql
  343. HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
  344. NAME = gitea
  345. USER = root
  346. ;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.
  347. ;SSL_MODE = false ; either "false" (default), "true", or "skip-verify"
  348. ;;
  349. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  350. ;;
  351. ;; Postgres Configuration
  352. ;;
  353. ;DB_TYPE = postgres
  354. ;HOST = 127.0.0.1:5432 ; can use socket e.g. /var/run/postgresql/
  355. ;NAME = gitea
  356. ;USER = root
  357. ;PASSWD =
  358. ;SCHEMA =
  359. ;SSL_MODE=disable ;either "disable" (default), "require", or "verify-full"
  360. ;;
  361. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  362. ;;
  363. ;; SQLite Configuration
  364. ;;
  365. ;DB_TYPE = sqlite3
  366. ;PATH= ; defaults to data/gitea.db
  367. ;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
  368. ;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
  369. ;;
  370. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  371. ;;
  372. ;; MSSQL Configuration
  373. ;;
  374. ;DB_TYPE = mssql
  375. ;HOST = 172.17.0.2:1433
  376. ;NAME = gitea
  377. ;USER = SA
  378. ;PASSWD = MwantsaSecurePassword1
  379. ;;
  380. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  381. ;;
  382. ;; Other settings
  383. ;;
  384. ;; For iterate buffer, default is 50
  385. ;ITERATE_BUFFER_SIZE = 50
  386. ;;
  387. ;; Show the database generated SQL
  388. ;LOG_SQL = false
  389. ;;
  390. ;; Maximum number of DB Connect retries
  391. ;DB_RETRIES = 10
  392. ;;
  393. ;; Backoff time per DB retry (time.Duration)
  394. ;DB_RETRY_BACKOFF = 3s
  395. ;;
  396. ;; Max idle database connections on connection pool, default is 2
  397. ;MAX_IDLE_CONNS = 2
  398. ;;
  399. ;; Database connection max life time, default is 0 or 3s mysql (See #6804 & #7071 for reasoning)
  400. ;CONN_MAX_LIFETIME = 3s
  401. ;;
  402. ;; Database maximum number of open connections, default is 0 meaning no maximum
  403. ;MAX_OPEN_CONNS = 0
  404. ;;
  405. ;; Whether execute database models migrations automatically
  406. ;AUTO_MIGRATION = true
  407. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  408. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  409. [security]
  410. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  411. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  412. ;;
  413. ;; Whether the installer is disabled (set to true to disable the installer)
  414. INSTALL_LOCK = false
  415. ;;
  416. ;; Global secret key that will be used
  417. ;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
  418. SECRET_KEY =
  419. ;;
  420. ;; Alternative location to specify secret key, instead of this file; you cannot specify both this and SECRET_KEY, and must pick one
  421. ;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
  422. ;SECRET_KEY_URI = file:/etc/gitea/secret_key
  423. ;;
  424. ;; Secret used to validate communication within Gitea binary.
  425. INTERNAL_TOKEN=
  426. ;;
  427. ;; Alternative location to specify internal token, instead of this file; you cannot specify both this and INTERNAL_TOKEN, and must pick one
  428. ;INTERNAL_TOKEN_URI = file:/etc/gitea/internal_token
  429. ;;
  430. ;; How long to remember that a user is logged in before requiring relogin (in days)
  431. ;LOGIN_REMEMBER_DAYS = 7
  432. ;;
  433. ;; Name of the cookie used to store the current username.
  434. ;COOKIE_USERNAME = gitea_awesome
  435. ;;
  436. ;; Name of cookie used to store authentication information.
  437. ;COOKIE_REMEMBER_NAME = gitea_incredible
  438. ;;
  439. ;; Reverse proxy authentication header name of user name, email, and full name
  440. ;REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  441. ;REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL
  442. ;REVERSE_PROXY_AUTHENTICATION_FULL_NAME = X-WEBAUTH-FULLNAME
  443. ;;
  444. ;; Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request
  445. ;REVERSE_PROXY_LIMIT = 1
  446. ;;
  447. ;; List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all.
  448. ;REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128
  449. ;;
  450. ;; The minimum password length for new Users
  451. ;MIN_PASSWORD_LENGTH = 8
  452. ;;
  453. ;; Set to true to allow users to import local server paths
  454. ;IMPORT_LOCAL_PATHS = false
  455. ;;
  456. ;; Set to false to allow users with git hook privileges to create custom git hooks.
  457. ;; Custom git hooks can be used to perform arbitrary code execution on the host operating system.
  458. ;; This enables the users to access and modify this config file and the Gitea database and interrupt the Gitea service.
  459. ;; By modifying the Gitea database, users can gain Gitea administrator privileges.
  460. ;; 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.
  461. ;; WARNING: This maybe harmful to you website or your operating system.
  462. ;; WARNING: Setting this to true does not change existing hooks in git repos; adjust it before if necessary.
  463. ;DISABLE_GIT_HOOKS = true
  464. ;;
  465. ;; Set to true to disable webhooks feature.
  466. ;DISABLE_WEBHOOKS = false
  467. ;;
  468. ;; Set to false to allow pushes to gitea repositories despite having an incomplete environment - NOT RECOMMENDED
  469. ;ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true
  470. ;;
  471. ;;Comma separated list of character classes required to pass minimum complexity.
  472. ;;If left empty or no valid values are specified, the default is off (no checking)
  473. ;;Classes include "lower,upper,digit,spec"
  474. ;PASSWORD_COMPLEXITY = off
  475. ;;
  476. ;; Password Hash algorithm, either "argon2", "pbkdf2", "scrypt" or "bcrypt"
  477. ;PASSWORD_HASH_ALGO = pbkdf2
  478. ;;
  479. ;; Set false to allow JavaScript to read CSRF cookie
  480. ;CSRF_COOKIE_HTTP_ONLY = true
  481. ;;
  482. ;; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed
  483. ;PASSWORD_CHECK_PWN = false
  484. ;;
  485. ;; 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.
  486. ;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
  487. ;SUCCESSFUL_TOKENS_CACHE_SIZE = 20
  488. ;;
  489. ;; Reject API tokens sent in URL query string (Accept Header-based API tokens only). This avoids security vulnerabilities
  490. ;; stemming from cached/logged plain-text API tokens.
  491. ;; In future releases, this will become the default behavior
  492. ;DISABLE_QUERY_AUTH_TOKEN = false
  493. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  494. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  495. [camo]
  496. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  497. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  498. ;;
  499. ;; At the moment we only support images
  500. ;;
  501. ;; if the camo is enabled
  502. ;ENABLED = false
  503. ;; url to a camo image proxy, it **is required** if camo is enabled.
  504. ;SERVER_URL =
  505. ;; HMAC to encode urls with, it **is required** if camo is enabled.
  506. ;HMAC_KEY =
  507. ;; Set to true to use camo for https too lese only non https urls are proxyed
  508. ;ALLWAYS = false
  509. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  510. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  511. [oauth2]
  512. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  513. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  514. ;;
  515. ;; Enables OAuth2 provider
  516. ENABLE = true
  517. ;;
  518. ;; Algorithm used to sign OAuth2 tokens. Valid values: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512, EdDSA
  519. ;JWT_SIGNING_ALGORITHM = RS256
  520. ;;
  521. ;; Private key file path used to sign OAuth2 tokens. The path is relative to APP_DATA_PATH.
  522. ;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to RS256, RS384, RS512, ES256, ES384 or ES512.
  523. ;; 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.
  524. ;JWT_SIGNING_PRIVATE_KEY_FILE = jwt/private.pem
  525. ;;
  526. ;; 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
  527. ;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to HS256, HS384 or HS512.
  528. ;JWT_SECRET =
  529. ;;
  530. ;; Alternative location to specify OAuth2 authentication secret. You cannot specify both this and JWT_SECRET, and must pick one
  531. ;JWT_SECRET_URI = file:/etc/gitea/oauth2_jwt_secret
  532. ;;
  533. ;; Lifetime of an OAuth2 access token in seconds
  534. ;ACCESS_TOKEN_EXPIRATION_TIME = 3600
  535. ;;
  536. ;; Lifetime of an OAuth2 refresh token in hours
  537. ;REFRESH_TOKEN_EXPIRATION_TIME = 730
  538. ;;
  539. ;; Check if refresh token got already used
  540. ;INVALIDATE_REFRESH_TOKENS = false
  541. ;;
  542. ;; Maximum length of oauth2 token/cookie stored on server
  543. ;MAX_TOKEN_LENGTH = 32767
  544. ;;
  545. ;; Pre-register OAuth2 applications for some universally useful services
  546. ;; * https://github.com/hickford/git-credential-oauth
  547. ;; * https://github.com/git-ecosystem/git-credential-manager
  548. ;DEFAULT_APPLICATIONS = git-credential-oauth, git-credential-manager
  549. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  550. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  551. [log]
  552. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  553. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  554. ;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log
  555. ;ROOT_PATH =
  556. ;;
  557. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  558. ;; Main Logger
  559. ;;
  560. ;; Either "console", "file" or "conn", default is "console"
  561. ;; Use comma to separate multiple modes, e.g. "console, file"
  562. MODE = console
  563. ;;
  564. ;; Either "Trace", "Debug", "Info", "Warn", "Error" or "None", default is "Info"
  565. LEVEL = Info
  566. ;;
  567. ;; Print Stacktrace with logs (rarely helpful, do not set) Either "Trace", "Debug", "Info", "Warn", "Error", default is "None"
  568. ;STACKTRACE_LEVEL = None
  569. ;;
  570. ;; Buffer length of the channel, keep it as it is if you don't know what it is.
  571. ;BUFFER_LEN = 10000
  572. ;;
  573. ;; Sub logger modes, a single comma means use default MODE above, empty means disable it
  574. ;logger.access.MODE=
  575. ;logger.router.MODE=,
  576. ;logger.xorm.MODE=,
  577. ;;
  578. ;; Collect SSH logs (Creates log from ssh git request)
  579. ;;
  580. ;ENABLE_SSH_LOG = false
  581. ;;
  582. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  583. ;;
  584. ;; Access Logger (Creates log in NCSA common log format)
  585. ;;
  586. ;; Print request id which parsed from request headers in access log, when access log is enabled.
  587. ;; * E.g:
  588. ;; * In request Header: X-Request-ID: test-id-123
  589. ;; * Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
  590. ;; * Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "test-id-123"
  591. ;;
  592. ;; If you configure more than one in the .ini file, it will match in the order of configuration,
  593. ;; and the first match will be finally printed in the log.
  594. ;; * E.g:
  595. ;; * In request Header: X-Trace-ID: trace-id-1q2w3e4r
  596. ;; * Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID, X-Trace-ID, X-Req-ID
  597. ;; * Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "trace-id-1q2w3e4r"
  598. ;;
  599. ;REQUEST_ID_HEADERS =
  600. ;;
  601. ;; Sets the template used to create the access log.
  602. ;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}}"
  603. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  604. ;;
  605. ;; Log modes (aka log writers)
  606. ;;
  607. ;[log.%(WriterMode)]
  608. ;MODE=console/file/conn/...
  609. ;LEVEL=
  610. ;FLAGS = stdflags
  611. ;EXPRESSION =
  612. ;PREFIX =
  613. ;COLORIZE = false
  614. ;;
  615. ;[log.console]
  616. ;STDERR = false
  617. ;;
  618. ;[log.file]
  619. ;; Set the file_name for the logger. If this is a relative path this will be relative to ROOT_PATH
  620. ;FILE_NAME =
  621. ;; This enables automated log rotate(switch of following options), default is true
  622. ;LOG_ROTATE = true
  623. ;; Max size shift of a single file, default is 28 means 1 << 28, 256MB
  624. ;MAX_SIZE_SHIFT = 28
  625. ;; Segment log daily, default is true
  626. ;DAILY_ROTATE = true
  627. ;; delete the log file after n days, default is 7
  628. ;MAX_DAYS = 7
  629. ;; compress logs with gzip
  630. ;COMPRESS = true
  631. ;; compression level see godoc for compress/gzip
  632. ;COMPRESSION_LEVEL = -1
  633. ;;
  634. ;[log.conn]
  635. ;; Reconnect host for every single message, default is false
  636. ;RECONNECT_ON_MSG = false
  637. ;; Try to reconnect when connection is lost, default is false
  638. ;RECONNECT = false
  639. ;; Either "tcp", "unix" or "udp", default is "tcp"
  640. ;PROTOCOL = tcp
  641. ;; Host address
  642. ;ADDR =
  643. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  644. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  645. [git]
  646. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  647. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  648. ;;
  649. ;; The path of git executable. If empty, Gitea searches through the PATH environment.
  650. ;PATH =
  651. ;;
  652. ;; The HOME directory for Git
  653. ;HOME_PATH = %(APP_DATA_PATH)s/home
  654. ;;
  655. ;; Disables highlight of added and removed changes
  656. ;DISABLE_DIFF_HIGHLIGHT = false
  657. ;;
  658. ;; Max number of lines allowed in a single file in diff view
  659. ;MAX_GIT_DIFF_LINES = 1000
  660. ;;
  661. ;; Max number of allowed characters in a line in diff view
  662. ;MAX_GIT_DIFF_LINE_CHARACTERS = 5000
  663. ;;
  664. ;; Max number of files shown in diff view
  665. ;MAX_GIT_DIFF_FILES = 100
  666. ;;
  667. ;; Set the default commits range size
  668. ;COMMITS_RANGE_SIZE = 50
  669. ;;
  670. ;; Set the default branches range size
  671. ;BRANCHES_RANGE_SIZE = 20
  672. ;;
  673. ;; Arguments for command 'git gc', e.g. "--aggressive --auto"
  674. ;; see more on http://git-scm.com/docs/git-gc/
  675. ;GC_ARGS =
  676. ;;
  677. ;; 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
  678. ;; To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file.
  679. ;ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
  680. ;;
  681. ;; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
  682. ;PULL_REQUEST_PUSH_MESSAGE = true
  683. ;;
  684. ;; (Go-Git only) Don't cache objects greater than this in memory. (Set to 0 to disable.)
  685. ;LARGE_OBJECT_THRESHOLD = 1048576
  686. ;; Set to true to forcibly set core.protectNTFS=false
  687. ;DISABLE_CORE_PROTECT_NTFS=false
  688. ;; Disable the usage of using partial clones for git.
  689. ;DISABLE_PARTIAL_CLONE = false
  690. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  691. ;; Git Operation timeout in seconds
  692. ;[git.timeout]
  693. ;DEFAULT = 360
  694. ;MIGRATE = 600
  695. ;MIRROR = 300
  696. ;CLONE = 300
  697. ;PULL = 300
  698. ;GC = 60
  699. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  700. ;; Git config options
  701. ;; 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`.
  702. ;[git.config]
  703. ;diff.algorithm = histogram
  704. ;core.logAllRefUpdates = true
  705. ;gc.reflogExpire = 90
  706. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  707. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  708. [service]
  709. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  710. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  711. ;;
  712. ;; Time limit to confirm account/email registration
  713. ;ACTIVE_CODE_LIVE_MINUTES = 180
  714. ;;
  715. ;; Time limit to perform the reset of a forgotten password
  716. ;RESET_PASSWD_CODE_LIVE_MINUTES = 180
  717. ;;
  718. ;; Whether a new user needs to confirm their email when registering.
  719. ;REGISTER_EMAIL_CONFIRM = false
  720. ;;
  721. ;; Whether a new user needs to be confirmed manually after registration. (Requires `REGISTER_EMAIL_CONFIRM` to be disabled.)
  722. ;REGISTER_MANUAL_CONFIRM = false
  723. ;;
  724. ;; List of domain names that are allowed to be used to register on a Gitea instance, wildcard is supported
  725. ;; eg: gitea.io,example.com,*.mydomain.com
  726. ;EMAIL_DOMAIN_ALLOWLIST =
  727. ;;
  728. ;; Comma-separated list of domain names that are not allowed to be used to register on a Gitea instance, wildcard is supported
  729. ;EMAIL_DOMAIN_BLOCKLIST =
  730. ;;
  731. ;; Disallow registration, only allow admins to create accounts.
  732. ;DISABLE_REGISTRATION = false
  733. ;;
  734. ;; Allow registration only using gitea itself, it works only when DISABLE_REGISTRATION is false
  735. ;ALLOW_ONLY_INTERNAL_REGISTRATION = false
  736. ;;
  737. ;; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false
  738. ;ALLOW_ONLY_EXTERNAL_REGISTRATION = false
  739. ;;
  740. ;; User must sign in to view anything.
  741. ;REQUIRE_SIGNIN_VIEW = false
  742. ;;
  743. ;; Mail notification
  744. ;ENABLE_NOTIFY_MAIL = false
  745. ;;
  746. ;; This setting enables gitea to be signed in with HTTP BASIC Authentication using the user's password
  747. ;; If you set this to false you will not be able to access the tokens endpoints on the API with your password
  748. ;; Please note that setting this to false will not disable OAuth Basic or Basic authentication using a token
  749. ;ENABLE_BASIC_AUTHENTICATION = true
  750. ;;
  751. ;; More detail: https://github.com/gogits/gogs/issues/165
  752. ;ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  753. ; Enable this to allow reverse proxy authentication for API requests, the reverse proxy is responsible for ensuring that no CSRF is possible.
  754. ;ENABLE_REVERSE_PROXY_AUTHENTICATION_API = false
  755. ;ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  756. ;ENABLE_REVERSE_PROXY_EMAIL = false
  757. ;ENABLE_REVERSE_PROXY_FULL_NAME = false
  758. ;;
  759. ;; Enable captcha validation for registration
  760. ;ENABLE_CAPTCHA = false
  761. ;;
  762. ;; Enable this to require captcha validation for login
  763. ;REQUIRE_CAPTCHA_FOR_LOGIN = false
  764. ;;
  765. ;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha, mcaptcha, cfturnstile.
  766. ;CAPTCHA_TYPE = image
  767. ;;
  768. ;; Change this to use recaptcha.net or other recaptcha service
  769. ;RECAPTCHA_URL = https://www.google.com/recaptcha/
  770. ;; Enable recaptcha to use Google's recaptcha service
  771. ;; Go to https://www.google.com/recaptcha/admin to sign up for a key
  772. ;RECAPTCHA_SECRET =
  773. ;RECAPTCHA_SITEKEY =
  774. ;;
  775. ;; For hCaptcha, create an account at https://accounts.hcaptcha.com/login to get your keys
  776. ;HCAPTCHA_SECRET =
  777. ;HCAPTCHA_SITEKEY =
  778. ;;
  779. ;; Change this to use demo.mcaptcha.org or your self-hosted mcaptcha.org instance.
  780. ;MCAPTCHA_URL = https://demo.mcaptcha.org
  781. ;;
  782. ;; Go to your configured mCaptcha instance and register a sitekey
  783. ;; and use your account's secret.
  784. ;MCAPTCHA_SECRET =
  785. ;MCAPTCHA_SITEKEY =
  786. ;;
  787. ;; Go to https://dash.cloudflare.com/?to=/:account/turnstile to sign up for a key
  788. ;CF_TURNSTILE_SITEKEY =
  789. ;CF_TURNSTILE_SECRET =
  790. ;;
  791. ;; Default value for KeepEmailPrivate
  792. ;; Each new user will get the value of this setting copied into their profile
  793. ;DEFAULT_KEEP_EMAIL_PRIVATE = false
  794. ;;
  795. ;; Default value for AllowCreateOrganization
  796. ;; Every new user will have rights set to create organizations depending on this setting
  797. ;DEFAULT_ALLOW_CREATE_ORGANIZATION = true
  798. ;; Default value for IsRestricted
  799. ;; Every new user will have restricted permissions depending on this setting
  800. ;DEFAULT_USER_IS_RESTRICTED = false
  801. ;;
  802. ;; Either "public", "limited" or "private", default is "public"
  803. ;; Limited is for users visible only to signed users
  804. ;; Private is for users visible only to members of their organizations
  805. ;; Public is for users visible for everyone
  806. ;DEFAULT_USER_VISIBILITY = public
  807. ;;
  808. ;; Set which visibility modes a user can have
  809. ;ALLOWED_USER_VISIBILITY_MODES = public,limited,private
  810. ;;
  811. ;; Either "public", "limited" or "private", default is "public"
  812. ;; Limited is for organizations visible only to signed users
  813. ;; Private is for organizations visible only to members of the organization
  814. ;; Public is for organizations visible to everyone
  815. ;DEFAULT_ORG_VISIBILITY = public
  816. ;;
  817. ;; Default value for DefaultOrgMemberVisible
  818. ;; True will make the membership of the users visible when added to the organisation
  819. ;DEFAULT_ORG_MEMBER_VISIBLE = false
  820. ;;
  821. ;; Default value for EnableDependencies
  822. ;; Repositories will use dependencies by default depending on this setting
  823. ;DEFAULT_ENABLE_DEPENDENCIES = true
  824. ;;
  825. ;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.
  826. ;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
  827. ;;
  828. ;; Default map service. No external API support has been included. A service has to allow
  829. ;; searching using URL parameters, the location will be appended to the URL as escaped query parameter.
  830. ;; Disabled by default, some example values are:
  831. ;; - OpenStreetMap: https://www.openstreetmap.org/search?query=
  832. ;; - Google Maps: https://www.google.com/maps/place/
  833. ;; - MapQuest: https://www.mapquest.com/search/
  834. ;; - Bing Maps: https://www.bing.com/maps?where1=
  835. ; USER_LOCATION_MAP_URL =
  836. ;;
  837. ;; Enable heatmap on users profiles.
  838. ;ENABLE_USER_HEATMAP = true
  839. ;;
  840. ;; Enable Timetracking
  841. ;ENABLE_TIMETRACKING = true
  842. ;;
  843. ;; Default value for EnableTimetracking
  844. ;; Repositories will use timetracking by default depending on this setting
  845. ;DEFAULT_ENABLE_TIMETRACKING = true
  846. ;;
  847. ;; Default value for AllowOnlyContributorsToTrackTime
  848. ;; Only users with write permissions can track time if this is true
  849. ;DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
  850. ;;
  851. ;; Value for the domain part of the user's email address in the git log if user
  852. ;; has set KeepEmailPrivate to true. The user's email will be replaced with a
  853. ;; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS. Default
  854. ;; value is "noreply." + DOMAIN, where DOMAIN resolves to the value from server.DOMAIN
  855. ;; Note: do not use the <DOMAIN> notation below
  856. ;NO_REPLY_ADDRESS = ; noreply.<DOMAIN>
  857. ;;
  858. ;; Show Registration button
  859. ;SHOW_REGISTRATION_BUTTON = true
  860. ;;
  861. ;; Show milestones dashboard page - a view of all the user's milestones
  862. ;SHOW_MILESTONES_DASHBOARD_PAGE = true
  863. ;;
  864. ;; Default value for AutoWatchNewRepos
  865. ;; When adding a repo to a team or creating a new repo all team members will watch the
  866. ;; repo automatically if enabled
  867. ;AUTO_WATCH_NEW_REPOS = true
  868. ;;
  869. ;; Default value for AutoWatchOnChanges
  870. ;; Make the user watch a repository When they commit for the first time
  871. ;AUTO_WATCH_ON_CHANGES = false
  872. ;;
  873. ;; Minimum amount of time a user must exist before comments are kept when the user is deleted.
  874. ;USER_DELETE_WITH_COMMENTS_MAX_TIME = 0
  875. ;; Valid site url schemes for user profiles
  876. ;VALID_SITE_URL_SCHEMES=http,https
  877. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  878. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  879. ;; Other Settings
  880. ;;
  881. ;; Uncomment the [section.header] if you wish to
  882. ;; set the below settings.
  883. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  884. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  885. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  886. ;[repository]
  887. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  888. ;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)s/gitea-repositories.
  889. ;; A relative path is interpreted as _`AppWorkPath`_/%(ROOT)s
  890. ;ROOT =
  891. ;;
  892. ;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
  893. ;SCRIPT_TYPE = bash
  894. ;;
  895. ;; DETECTED_CHARSETS_ORDER tie-break order for detected charsets.
  896. ;; If the charsets have equal confidence, tie-breaking will be done by order in this list
  897. ;; with charsets earlier in the list chosen in preference to those later.
  898. ;; Adding "defaults" will place the unused charsets at that position.
  899. ;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
  900. ;;
  901. ;; Default ANSI charset to override non-UTF-8 charsets to
  902. ;ANSI_CHARSET =
  903. ;;
  904. ;; Force every new repository to be private
  905. ;FORCE_PRIVATE = false
  906. ;;
  907. ;; Default privacy setting when creating a new repository, allowed values: last, private, public. Default is last which means the last setting used.
  908. ;DEFAULT_PRIVATE = last
  909. ;;
  910. ;; Default private when using push-to-create
  911. ;DEFAULT_PUSH_CREATE_PRIVATE = true
  912. ;;
  913. ;; Global limit of repositories per user, applied at creation time. -1 means no limit
  914. ;MAX_CREATION_LIMIT = -1
  915. ;;
  916. ;; Preferred Licenses to place at the top of the List
  917. ;; The name here must match the filename in options/license or custom/options/license
  918. ;PREFERRED_LICENSES = Apache License 2.0,MIT License
  919. ;;
  920. ;; Disable the ability to interact with repositories using the HTTP protocol
  921. ;DISABLE_HTTP_GIT = false
  922. ;;
  923. ;; Value for Access-Control-Allow-Origin header, default is not to present
  924. ;; WARNING: This may be harmful to your website if you do not give it a right value.
  925. ;ACCESS_CONTROL_ALLOW_ORIGIN =
  926. ;;
  927. ;; Force ssh:// clone url instead of scp-style uri when default SSH port is used
  928. ;USE_COMPAT_SSH_URI = false
  929. ;;
  930. ;; Value for the "go get" request returns the repository url as https or ssh, default is https
  931. ;GO_GET_CLONE_URL_PROTOCOL = https
  932. ;;
  933. ;; Close issues as long as a commit on any branch marks it as fixed
  934. ;; 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.
  935. ;DISABLED_REPO_UNITS =
  936. ;;
  937. ;; 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.
  938. ;; Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility.
  939. ;; External wiki and issue tracker can't be enabled by default as it requires additional settings.
  940. ;; Disabled repo units will not be added to new repositories regardless if it is in the default list.
  941. ;DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages
  942. ;;
  943. ;; Comma separated list of default forked repo units.
  944. ;; The set of allowed values and rules are the same as DEFAULT_REPO_UNITS.
  945. ;DEFAULT_FORK_REPO_UNITS = repo.code,repo.pulls
  946. ;;
  947. ;; Prefix archive files by placing them in a directory named after the repository
  948. ;PREFIX_ARCHIVE_FILES = true
  949. ;;
  950. ;; Disable migrating feature.
  951. ;DISABLE_MIGRATIONS = false
  952. ;;
  953. ;; Disable stars feature.
  954. ;DISABLE_STARS = false
  955. ;;
  956. ;; The default branch name of new repositories
  957. ;DEFAULT_BRANCH = main
  958. ;;
  959. ;; Allow adoption of unadopted repositories
  960. ;ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES = false
  961. ;;
  962. ;; Allow deletion of unadopted repositories
  963. ;ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false
  964. ;; Don't allow download source archive files from UI
  965. ;DISABLE_DOWNLOAD_SOURCE_ARCHIVES = false
  966. ;; Allow fork repositories without maximum number limit
  967. ;ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT = true
  968. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  969. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  970. ;[repository.editor]
  971. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  972. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  973. ;;
  974. ;; List of file extensions for which lines should be wrapped in the Monaco editor
  975. ;; Separate extensions with a comma. To line wrap files without an extension, just put a comma
  976. ;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,.livemd,
  977. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  978. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  979. ;[repository.local]
  980. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  981. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  982. ;;
  983. ;; Path for local repository copy. Defaults to `tmp/local-repo` (content gets deleted on gitea restart)
  984. ;LOCAL_COPY_PATH = tmp/local-repo
  985. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  986. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  987. ;[repository.upload]
  988. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  989. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  990. ;;
  991. ;; Whether repository file uploads are enabled. Defaults to `true`
  992. ;ENABLED = true
  993. ;;
  994. ;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
  995. ;TEMP_PATH = data/tmp/uploads
  996. ;;
  997. ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  998. ;ALLOWED_TYPES =
  999. ;;
  1000. ;; Max size of each file in megabytes. Defaults to 50MB
  1001. ;FILE_MAX_SIZE = 50
  1002. ;;
  1003. ;; Max number of files per upload. Defaults to 5
  1004. ;MAX_FILES = 5
  1005. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1006. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1007. ;[repository.pull-request]
  1008. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1009. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1010. ;;
  1011. ;; List of prefixes used in Pull Request title to mark them as Work In Progress (matched in a case-insensitive manner)
  1012. ;WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP]
  1013. ;;
  1014. ;; List of keywords used in Pull Request comments to automatically close a related issue
  1015. ;CLOSE_KEYWORDS = close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved
  1016. ;;
  1017. ;; List of keywords used in Pull Request comments to automatically reopen a related issue
  1018. ;REOPEN_KEYWORDS = reopen,reopens,reopened
  1019. ;;
  1020. ;; Set default merge style for repository creating, valid options: merge, rebase, rebase-merge, squash
  1021. ;DEFAULT_MERGE_STYLE = merge
  1022. ;;
  1023. ;; In the default merge message for squash commits include at most this many commits
  1024. ;DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT = 50
  1025. ;;
  1026. ;; In the default merge message for squash commits limit the size of the commit messages to this
  1027. ;DEFAULT_MERGE_MESSAGE_SIZE = 5120
  1028. ;;
  1029. ;; 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
  1030. ;DEFAULT_MERGE_MESSAGE_ALL_AUTHORS = false
  1031. ;;
  1032. ;; In default merge messages limit the number of approvers listed as Reviewed-by: to this many
  1033. ;DEFAULT_MERGE_MESSAGE_MAX_APPROVERS = 10
  1034. ;;
  1035. ;; In default merge messages only include approvers who are official
  1036. ;DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = true
  1037. ;;
  1038. ;; Add co-authored-by and co-committed-by trailers if committer does not match author
  1039. ;ADD_CO_COMMITTER_TRAILERS = true
  1040. ;;
  1041. ;; In addition to testing patches using the three-way merge method, re-test conflicting patches with git apply
  1042. ;TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY = false
  1043. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1044. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1045. ;[repository.issue]
  1046. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1047. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1048. ;; List of reasons why a Pull Request or Issue can be locked
  1049. ;LOCK_REASONS = Too heated,Off-topic,Resolved,Spam
  1050. ;; Maximum number of pinned Issues per repo
  1051. ;; Set to 0 to disable pinning Issues
  1052. ;MAX_PINNED = 3
  1053. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1054. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1055. ;[repository.release]
  1056. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1057. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1058. ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  1059. ;ALLOWED_TYPES =
  1060. ;DEFAULT_PAGING_NUM = 10
  1061. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1062. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1063. ;[repository.signing]
  1064. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1065. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1066. ;;
  1067. ;; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey
  1068. ;; run in the context of the RUN_USER
  1069. ;; Switch to none to stop signing completely
  1070. ;SIGNING_KEY = default
  1071. ;;
  1072. ;; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer.
  1073. ;; These should match a publicized name and email address for the key. (When SIGNING_KEY is default these are set to
  1074. ;; the results of git config --get user.name and git config --get user.email respectively and can only be overridden
  1075. ;; by setting the SIGNING_KEY ID to the correct ID.)
  1076. ;SIGNING_NAME =
  1077. ;SIGNING_EMAIL =
  1078. ;;
  1079. ;; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter
  1080. ;DEFAULT_TRUST_MODEL = collaborator
  1081. ;;
  1082. ;; Determines when gitea should sign the initial commit when creating a repository
  1083. ;; Either:
  1084. ;; - never
  1085. ;; - pubkey: only sign if the user has a pubkey
  1086. ;; - twofa: only sign if the user has logged in with twofa
  1087. ;; - always
  1088. ;; options other than none and always can be combined as comma separated list
  1089. ;INITIAL_COMMIT = always
  1090. ;;
  1091. ;; Determines when to sign for CRUD actions
  1092. ;; - as above
  1093. ;; - parentsigned: requires that the parent commit is signed.
  1094. ;CRUD_ACTIONS = pubkey, twofa, parentsigned
  1095. ;; Determines when to sign Wiki commits
  1096. ;; - as above
  1097. ;WIKI = never
  1098. ;;
  1099. ;; Determines when to sign on merges
  1100. ;; - basesigned: require that the parent of commit on the base repo is signed.
  1101. ;; - commitssigned: require that all the commits in the head branch are signed.
  1102. ;; - approved: only sign when merging an approved pr to a protected branch
  1103. ;MERGES = pubkey, twofa, basesigned, commitssigned
  1104. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1105. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1106. ;[repository.mimetype_mapping]
  1107. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1108. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1109. ;;
  1110. ;; Custom MIME type mapping for downloadable files
  1111. ;.apk=application/vnd.android.package-archive
  1112. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1113. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1114. ;[project]
  1115. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1116. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1117. ;; Default templates for project boards
  1118. ;PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done
  1119. ;PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed
  1120. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1121. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1122. ;[cors]
  1123. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1124. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1125. ;;
  1126. ;; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers
  1127. ;; enable cors headers (disabled by default)
  1128. ;ENABLED = false
  1129. ;;
  1130. ;; scheme of allowed requests
  1131. ;SCHEME = http
  1132. ;;
  1133. ;; list of requesting domains that are allowed
  1134. ;ALLOW_DOMAIN = *
  1135. ;;
  1136. ;; allow subdomains of headers listed above to request
  1137. ;ALLOW_SUBDOMAIN = false
  1138. ;;
  1139. ;; list of methods allowed to request
  1140. ;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
  1141. ;;
  1142. ;; max time to cache response
  1143. ;MAX_AGE = 10m
  1144. ;;
  1145. ;; allow request with credentials
  1146. ;ALLOW_CREDENTIALS = false
  1147. ;;
  1148. ;; headers to permit
  1149. ;HEADERS = Content-Type,User-Agent
  1150. ;;
  1151. ;; set X-FRAME-OPTIONS header
  1152. ;X_FRAME_OPTIONS = SAMEORIGIN
  1153. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1154. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1155. ;[ui]
  1156. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1157. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1158. ;;
  1159. ;; Number of repositories that are displayed on one explore page
  1160. ;EXPLORE_PAGING_NUM = 20
  1161. ;;
  1162. ;; Number of issues that are displayed on one page
  1163. ;ISSUE_PAGING_NUM = 20
  1164. ;;
  1165. ;; Number of maximum commits displayed in one activity feed
  1166. ;FEED_MAX_COMMIT_NUM = 5
  1167. ;;
  1168. ;; Number of items that are displayed in home feed
  1169. ;FEED_PAGING_NUM = 20
  1170. ;;
  1171. ;; Number of items that are displayed in a single subsitemap
  1172. ;SITEMAP_PAGING_NUM = 20
  1173. ;;
  1174. ;; Number of maximum commits displayed in commit graph.
  1175. ;GRAPH_MAX_COMMIT_NUM = 100
  1176. ;;
  1177. ;; Number of line of codes shown for a code comment
  1178. ;CODE_COMMENT_LINES = 4
  1179. ;;
  1180. ;; Max size of files to be displayed (default is 8MiB)
  1181. ;MAX_DISPLAY_FILE_SIZE = 8388608
  1182. ;;
  1183. ;; Detect ambiguous unicode characters in file contents and show warnings on the UI
  1184. ;AMBIGUOUS_UNICODE_DETECTION = true
  1185. ;;
  1186. ;; Whether the email of the user should be shown in the Explore Users page
  1187. ;SHOW_USER_EMAIL = true
  1188. ;;
  1189. ;; Set the default theme for the Gitea install
  1190. ;DEFAULT_THEME = auto
  1191. ;;
  1192. ;; All available themes. Allow users select personalized themes regardless of the value of `DEFAULT_THEME`.
  1193. ;THEMES = auto,gitea,arc-green
  1194. ;;
  1195. ;; All available reactions users can choose on issues/prs and comments.
  1196. ;; Values can be emoji alias (:smile:) or a unicode emoji.
  1197. ;; For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png
  1198. ;REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes
  1199. ;;
  1200. ;; Change the number of users that are displayed in reactions tooltip (triggered by mouse hover).
  1201. ;REACTION_MAX_USER_NUM = 10
  1202. ;;
  1203. ;; Additional Emojis not defined in the utf8 standard
  1204. ;; 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.
  1205. ;; Dont mistake it for Reactions.
  1206. ;CUSTOM_EMOJIS = gitea, codeberg, gitlab, git, github, gogs
  1207. ;;
  1208. ;; Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
  1209. ;DEFAULT_SHOW_FULL_NAME = false
  1210. ;;
  1211. ;; Whether to search within description at repository search on explore page.
  1212. ;SEARCH_REPO_DESCRIPTION = true
  1213. ;;
  1214. ;; Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.
  1215. ;; A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic).
  1216. ;ONLY_SHOW_RELEVANT_REPOS = false
  1217. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1218. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1219. ;[ui.admin]
  1220. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1221. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1222. ;;
  1223. ;; Number of users that are displayed on one page
  1224. ;USER_PAGING_NUM = 50
  1225. ;;
  1226. ;; Number of repos that are displayed on one page
  1227. ;REPO_PAGING_NUM = 50
  1228. ;;
  1229. ;; Number of notices that are displayed on one page
  1230. ;NOTICE_PAGING_NUM = 25
  1231. ;;
  1232. ;; Number of organizations that are displayed on one page
  1233. ;ORG_PAGING_NUM = 50
  1234. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1235. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1236. ;[ui.user]
  1237. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1238. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1239. ;; Number of repos that are displayed on one page
  1240. ;REPO_PAGING_NUM = 15
  1241. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1242. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1243. ;[ui.meta]
  1244. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1245. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1246. ;AUTHOR = Gitea - Git with a cup of tea
  1247. ;DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go
  1248. ;KEYWORDS = go,git,self-hosted,gitea
  1249. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1250. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1251. ;[ui.notification]
  1252. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1253. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1254. ;;
  1255. ;; Control how often the notification endpoint is polled to update the notification
  1256. ;; The timeout will increase to MAX_TIMEOUT in TIMEOUT_STEPs if the notification count is unchanged
  1257. ;; Set MIN_TIMEOUT to -1 to turn off
  1258. ;MIN_TIMEOUT = 10s
  1259. ;MAX_TIMEOUT = 60s
  1260. ;TIMEOUT_STEP = 10s
  1261. ;;
  1262. ;; This setting determines how often the db is queried to get the latest notification counts.
  1263. ;; 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
  1264. ;EVENT_SOURCE_UPDATE_TIME = 10s
  1265. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1266. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1267. ;[ui.svg]
  1268. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1269. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1270. ;;
  1271. ;; 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.
  1272. ;ENABLE_RENDER = true
  1273. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1274. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1275. ;[ui.csv]
  1276. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1277. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1278. ;;
  1279. ;; Maximum allowed file size in bytes to render CSV files as table. (Set to 0 for no limit).
  1280. ;MAX_FILE_SIZE = 524288
  1281. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1282. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1283. ;[markdown]
  1284. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1285. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1286. ;;
  1287. ;; Render soft line breaks as hard line breaks, which means a single newline character between
  1288. ;; paragraphs will cause a line break and adding trailing whitespace to paragraphs is not
  1289. ;; necessary to force a line break.
  1290. ;; Render soft line breaks as hard line breaks for comments
  1291. ;ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true
  1292. ;;
  1293. ;; Render soft line breaks as hard line breaks for markdown documents
  1294. ;ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS = false
  1295. ;;
  1296. ;; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown
  1297. ;; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes)
  1298. ;; URLs starting with http and https are always displayed, whatever is put in this entry.
  1299. ;; If this entry is empty, all URL schemes are allowed.
  1300. ;CUSTOM_URL_SCHEMES =
  1301. ;;
  1302. ;; List of file extensions that should be rendered/edited as Markdown
  1303. ;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma
  1304. ;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd,.livemd
  1305. ;;
  1306. ;; Enables math inline and block detection
  1307. ;ENABLE_MATH = true
  1308. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1309. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1310. ;[ssh.minimum_key_sizes]
  1311. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1312. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1313. ;;
  1314. ;; Define allowed algorithms and their minimum key length (use -1 to disable a type)
  1315. ;ED25519 = 256
  1316. ;ECDSA = 256
  1317. ;RSA = 3071 ; we allow 3071 here because an otherwise valid 3072 bit RSA key can be reported as having 3071 bit length
  1318. ;DSA = -1 ; set to 1024 to switch on
  1319. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1320. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1321. ;[indexer]
  1322. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1323. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1324. ;;
  1325. ;; Issue Indexer settings
  1326. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1327. ;;
  1328. ;; Issue indexer type, currently support: bleve, db, elasticsearch or meilisearch default is bleve
  1329. ;ISSUE_INDEXER_TYPE = bleve
  1330. ;;
  1331. ;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
  1332. ;ISSUE_INDEXER_PATH = indexers/issues.bleve ; Relative paths will be made absolute against _`AppWorkPath`_.
  1333. ;;
  1334. ;; 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)
  1335. ;ISSUE_INDEXER_CONN_STR =
  1336. ;;
  1337. ;; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch or meilisearch.
  1338. ;ISSUE_INDEXER_NAME = gitea_issues
  1339. ;;
  1340. ;; Timeout the indexer if it takes longer than this to start.
  1341. ;; Set to -1 to disable timeout.
  1342. ;STARTUP_TIMEOUT = 30s
  1343. ;;
  1344. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1345. ;; Repository Indexer settings
  1346. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1347. ;;
  1348. ;; repo indexer by default disabled, since it uses a lot of disk space
  1349. ;REPO_INDEXER_ENABLED = false
  1350. ;;
  1351. ;; repo indexer units, the items to index, could be `sources`, `forks`, `mirrors`, `templates` or any combination of them separated by a comma.
  1352. ;; If empty then it defaults to `sources` only, as if you'd like to disable fully please see REPO_INDEXER_ENABLED.
  1353. ;REPO_INDEXER_REPO_TYPES = sources,forks,mirrors,templates
  1354. ;;
  1355. ;; Code search engine type, could be `bleve` or `elasticsearch`.
  1356. ;REPO_INDEXER_TYPE = bleve
  1357. ;;
  1358. ;; Index file used for code search. available when `REPO_INDEXER_TYPE` is bleve
  1359. ;REPO_INDEXER_PATH = indexers/repos.bleve
  1360. ;;
  1361. ;; Code indexer connection string, available when `REPO_INDEXER_TYPE` is elasticsearch. i.e. http://elastic:changeme@localhost:9200
  1362. ;REPO_INDEXER_CONN_STR =
  1363. ;;
  1364. ;; Code indexer name, available when `REPO_INDEXER_TYPE` is elasticsearch
  1365. ;REPO_INDEXER_NAME = gitea_codes
  1366. ;;
  1367. ;; A comma separated list of glob patterns (see https://github.com/gobwas/glob) to include
  1368. ;; in the index; default is empty
  1369. ;REPO_INDEXER_INCLUDE =
  1370. ;;
  1371. ;; A comma separated list of glob patterns to exclude from the index; ; default is empty
  1372. ;REPO_INDEXER_EXCLUDE =
  1373. ;;
  1374. ;MAX_FILE_SIZE = 1048576
  1375. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1376. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1377. ;[queue]
  1378. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1379. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1380. ;;
  1381. ;; Specific queues can be individually configured with [queue.name]. [queue] provides defaults
  1382. ;; ([queue.issue_indexer] is special due to the old configuration described above)
  1383. ;;
  1384. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1385. ;;
  1386. ;; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy
  1387. ;; default to persistable-channel
  1388. ;TYPE = persistable-channel
  1389. ;;
  1390. ;; data-dir for storing persistable queues and level queues, individual queues will default to `queues/common` meaning the queue is shared.
  1391. ;DATADIR = queues/ ; Relative paths will be made absolute against `%(APP_DATA_PATH)s`.
  1392. ;;
  1393. ;; Default queue length before a channel queue will block
  1394. ;LENGTH = 100000
  1395. ;;
  1396. ;; Batch size to send for batched queues
  1397. ;BATCH_LENGTH = 20
  1398. ;;
  1399. ;; Connection string for redis queues this will store the redis or redis-cluster connection string.
  1400. ;; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb
  1401. ;; or additional options of the form `leveldb://path/to/db?option=value&....`, and will override `DATADIR`.
  1402. ;CONN_STR = "redis://127.0.0.1:6379/0"
  1403. ;;
  1404. ;; Provides the suffix of the default redis/disk queue name - specific queues can be overridden within in their [queue.name] sections.
  1405. ;QUEUE_NAME = "_queue"
  1406. ;;
  1407. ;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
  1408. ;SET_NAME = "_unique"
  1409. ;;
  1410. ;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
  1411. ;MAX_WORKERS = ; (dynamic)
  1412. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1413. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1414. ;[admin]
  1415. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1416. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1417. ;;
  1418. ;; Disallow regular (non-admin) users from creating organizations.
  1419. ;DISABLE_REGULAR_ORG_CREATION = false
  1420. ;;
  1421. ;; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled
  1422. ;DEFAULT_EMAIL_NOTIFICATIONS = enabled
  1423. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1424. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1425. ;[openid]
  1426. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1427. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1428. ;;
  1429. ;; OpenID is an open, standard and decentralized authentication protocol.
  1430. ;; Your identity is the address of a webpage you provide, which describes
  1431. ;; how to prove you are in control of that page.
  1432. ;;
  1433. ;; For more info: https://en.wikipedia.org/wiki/OpenID
  1434. ;;
  1435. ;; Current implementation supports OpenID-2.0
  1436. ;;
  1437. ;; Tested to work providers at the time of writing:
  1438. ;; - Any GNUSocial node (your.hostname.tld/username)
  1439. ;; - Any SimpleID provider (http://simpleid.koinic.net)
  1440. ;; - http://openid.org.cn/
  1441. ;; - openid.stackexchange.com
  1442. ;; - login.launchpad.net
  1443. ;; - <username>.livejournal.com
  1444. ;;
  1445. ;; Whether to allow signin in via OpenID
  1446. ;ENABLE_OPENID_SIGNIN = true
  1447. ;;
  1448. ;; Whether to allow registering via OpenID
  1449. ;; Do not include to rely on rhw DISABLE_REGISTRATION setting
  1450. ;;ENABLE_OPENID_SIGNUP = true
  1451. ;;
  1452. ;; Allowed URI patterns (POSIX regexp).
  1453. ;; Space separated.
  1454. ;; Only these would be allowed if non-blank.
  1455. ;; Example value: trusted.domain.org trusted.domain.net
  1456. ;WHITELISTED_URIS =
  1457. ;;
  1458. ;; Forbidden URI patterns (POSIX regexp).
  1459. ;; Space separated.
  1460. ;; Only used if WHITELISTED_URIS is blank.
  1461. ;; Example value: loadaverage.org/badguy stackexchange.com/.*spammer
  1462. ;BLACKLISTED_URIS =
  1463. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1464. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1465. ;[oauth2_client]
  1466. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1467. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1468. ;;
  1469. ;; Whether a new auto registered oauth2 user needs to confirm their email.
  1470. ;; Do not include to use the REGISTER_EMAIL_CONFIRM setting from the `[service]` section.
  1471. ;REGISTER_EMAIL_CONFIRM =
  1472. ;;
  1473. ;; Scopes for the openid connect oauth2 provider (separated by space, the openid scope is implicitly added).
  1474. ;; Typical values are profile and email.
  1475. ;; For more information about the possible values see https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
  1476. ;OPENID_CONNECT_SCOPES =
  1477. ;;
  1478. ;; Automatically create user accounts for new oauth2 users.
  1479. ;ENABLE_AUTO_REGISTRATION = false
  1480. ;;
  1481. ;; The source of the username for new oauth2 accounts:
  1482. ;; userid = use the userid / sub attribute
  1483. ;; nickname = use the nickname attribute
  1484. ;; email = use the username part of the email attribute
  1485. ;USERNAME = nickname
  1486. ;;
  1487. ;; Update avatar if available from oauth2 provider.
  1488. ;; Update will be performed on each login.
  1489. ;UPDATE_AVATAR = false
  1490. ;;
  1491. ;; How to handle if an account / email already exists:
  1492. ;; disabled = show an error
  1493. ;; login = show an account linking login
  1494. ;; auto = link directly with the account
  1495. ;ACCOUNT_LINKING = login
  1496. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1497. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1498. ;[webhook]
  1499. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1500. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1501. ;;
  1502. ;; Hook task queue length, increase if webhook shooting starts hanging
  1503. ;QUEUE_LENGTH = 1000
  1504. ;;
  1505. ;; Deliver timeout in seconds
  1506. ;DELIVER_TIMEOUT = 5
  1507. ;;
  1508. ;; Webhook can only call allowed hosts for security reasons. Comma separated list, eg: external, 192.168.1.0/24, *.mydomain.com
  1509. ;; Built-in: loopback (for localhost), private (for LAN/intranet), external (for public hosts on internet), * (for all hosts)
  1510. ;; CIDR list: 1.2.3.0/8, 2001:db8::/32
  1511. ;; Wildcard hosts: *.mydomain.com, 192.168.100.*
  1512. ;; Since 1.15.7. Default to * for 1.15.x, external for 1.16 and later
  1513. ;ALLOWED_HOST_LIST = external
  1514. ;;
  1515. ;; Allow insecure certification
  1516. ;SKIP_TLS_VERIFY = false
  1517. ;;
  1518. ;; Number of history information in each page
  1519. ;PAGING_NUM = 10
  1520. ;;
  1521. ;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy
  1522. ;PROXY_URL =
  1523. ;;
  1524. ;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
  1525. ;PROXY_HOSTS =
  1526. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1527. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1528. ;[mailer]
  1529. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1530. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1531. ;;
  1532. ;; NOTICE: this section is for Gitea 1.18 and later. If you are using Gitea 1.17 or older,
  1533. ;; please refer to
  1534. ;; https://github.com/go-gitea/gitea/blob/release/v1.17/custom/conf/app.example.ini
  1535. ;; https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md
  1536. ;;
  1537. ;ENABLED = false
  1538. ;;
  1539. ;; Buffer length of channel, keep it as it is if you don't know what it is.
  1540. ;SEND_BUFFER_LEN = 100
  1541. ;;
  1542. ;; Prefix displayed before subject in mail
  1543. ;SUBJECT_PREFIX =
  1544. ;;
  1545. ;; Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy".
  1546. ;; - sendmail: use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
  1547. ;; - dummy: send email messages to the log as a testing phase.
  1548. ;; If your provider does not explicitly say which protocol it uses but does provide a port,
  1549. ;; you can set SMTP_PORT instead and this will be inferred.
  1550. ;; (Before 1.18, see the notice, this was controlled via MAILER_TYPE and IS_TLS_ENABLED.)
  1551. ;PROTOCOL =
  1552. ;;
  1553. ;; Mail server address, e.g. smtp.gmail.com.
  1554. ;; For smtp+unix, this should be a path to a unix socket instead.
  1555. ;; (Before 1.18, see the notice, this was combined with SMTP_PORT as HOST.)
  1556. ;SMTP_ADDR =
  1557. ;;
  1558. ;; Mail server port. Common ports are:
  1559. ;; 25: insecure SMTP
  1560. ;; 465: SMTP Secure
  1561. ;; 587: StartTLS
  1562. ;; If no protocol is specified, it will be inferred by this setting.
  1563. ;; (Before 1.18, this was combined with SMTP_ADDR as HOST.)
  1564. ;SMTP_PORT =
  1565. ;;
  1566. ;; Enable HELO operation. Defaults to true.
  1567. ;ENABLE_HELO = true
  1568. ;;
  1569. ;; Custom hostname for HELO operation.
  1570. ;; If no value is provided, one is retrieved from system.
  1571. ;HELO_HOSTNAME =
  1572. ;;
  1573. ;; If set to `true`, completely ignores server certificate validation errors.
  1574. ;; This option is unsafe. Consider adding the certificate to the system trust store instead.
  1575. ;FORCE_TRUST_SERVER_CERT = false
  1576. ;;
  1577. ;; Use client certificate in connection.
  1578. ;USE_CLIENT_CERT = false
  1579. ;CLIENT_CERT_FILE = custom/mailer/cert.pem
  1580. ;CLIENT_KEY_FILE = custom/mailer/key.pem
  1581. ;;
  1582. ;; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  1583. ;FROM =
  1584. ;;
  1585. ;; 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.
  1586. ;ENVELOPE_FROM =
  1587. ;;
  1588. ;; Mailer user name and password, if required by provider.
  1589. ;USER =
  1590. ;;
  1591. ;; Use PASSWD = `your password` for quoting if you use special characters in the password.
  1592. ;PASSWD =
  1593. ;;
  1594. ;; Send mails only in plain text, without HTML alternative
  1595. ;SEND_AS_PLAIN_TEXT = false
  1596. ;;
  1597. ;; Specify an alternative sendmail binary
  1598. ;SENDMAIL_PATH = sendmail
  1599. ;;
  1600. ;; Specify any extra sendmail arguments
  1601. ;; WARNING: if your sendmail program interprets options you should set this to "--" or terminate these args with "--"
  1602. ;SENDMAIL_ARGS =
  1603. ;;
  1604. ;; Timeout for Sendmail
  1605. ;SENDMAIL_TIMEOUT = 5m
  1606. ;;
  1607. ;; convert \r\n to \n for Sendmail
  1608. ;SENDMAIL_CONVERT_CRLF = true
  1609. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1610. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1611. ;[email.incoming]
  1612. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1613. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1614. ;;
  1615. ;; Enable handling of incoming emails.
  1616. ;ENABLED = false
  1617. ;;
  1618. ;; The email address including the %{token} placeholder that will be replaced per user/action.
  1619. ;; Example: incoming+%{token}@example.com
  1620. ;; The placeholder must appear in the user part of the address (before the @).
  1621. ;REPLY_TO_ADDRESS =
  1622. ;;
  1623. ;; IMAP server host
  1624. ;HOST =
  1625. ;;
  1626. ;; IMAP server port
  1627. ;PORT =
  1628. ;;
  1629. ;; Username of the receiving account
  1630. ;USERNAME =
  1631. ;;
  1632. ;; Password of the receiving account
  1633. ;PASSWORD =
  1634. ;;
  1635. ;; Whether the IMAP server uses TLS.
  1636. ;USE_TLS = false
  1637. ;;
  1638. ;; If set to true, completely ignores server certificate validation errors. This option is unsafe.
  1639. ;SKIP_TLS_VERIFY = true
  1640. ;;
  1641. ;; The mailbox name where incoming mail will end up.
  1642. ;MAILBOX = INBOX
  1643. ;;
  1644. ;; Whether handled messages should be deleted from the mailbox.
  1645. ;DELETE_HANDLED_MESSAGE = true
  1646. ;;
  1647. ;; Maximum size of a message to handle. Bigger messages are ignored. Set to 0 to allow every size.
  1648. ;MAXIMUM_MESSAGE_SIZE = 10485760
  1649. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1650. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1651. ;[cache]
  1652. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1653. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1654. ;;
  1655. ;; if the cache enabled
  1656. ;ENABLED = true
  1657. ;;
  1658. ;; Either "memory", "redis", "memcache", or "twoqueue". default is "memory"
  1659. ;ADAPTER = memory
  1660. ;;
  1661. ;; For "memory" only, GC interval in seconds, default is 60
  1662. ;INTERVAL = 60
  1663. ;;
  1664. ;; For "redis", "redis-cluster" and "memcache", connection host address
  1665. ;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1666. ;; redis-cluster: `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1667. ;; memcache: `127.0.0.1:11211`
  1668. ;; twoqueue: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000`
  1669. ;HOST =
  1670. ;;
  1671. ;; Time to keep items in cache if not used, default is 16 hours.
  1672. ;; Setting it to -1 disables caching
  1673. ;ITEM_TTL = 16h
  1674. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1675. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1676. ;; Last commit cache
  1677. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1678. ;[cache.last_commit]
  1679. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1680. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1681. ;; if the cache enabled
  1682. ;ENABLED = true
  1683. ;;
  1684. ;; Time to keep items in cache if not used, default is 8760 hours.
  1685. ;; Setting it to -1 disables caching
  1686. ;ITEM_TTL = 8760h
  1687. ;;
  1688. ;; Only enable the cache when repository's commits count great than
  1689. ;COMMITS_COUNT = 1000
  1690. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1691. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1692. ;[session]
  1693. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1694. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1695. ;;
  1696. ;; Either "memory", "file", "redis", "redis-cluster", "db", "mysql", "couchbase", "memcache" or "postgres"
  1697. ;; Default is "memory". "db" will reuse the configuration in [database]
  1698. ;PROVIDER = memory
  1699. ;;
  1700. ;; Provider config options
  1701. ;; memory: doesn't have any config yet
  1702. ;; file: session file path, e.g. `data/sessions`
  1703. ;; redis: `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1704. ;; redis-cluster: `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s`
  1705. ;; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  1706. ;PROVIDER_CONFIG = data/sessions ; Relative paths will be made absolute against _`AppWorkPath`_.
  1707. ;;
  1708. ;; Session cookie name
  1709. ;COOKIE_NAME = i_like_gitea
  1710. ;;
  1711. ;; 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.
  1712. ;COOKIE_SECURE =
  1713. ;;
  1714. ;; Session GC time interval in seconds, default is 86400 (1 day)
  1715. ;GC_INTERVAL_TIME = 86400
  1716. ;;
  1717. ;; Session life time in seconds, default is 86400 (1 day)
  1718. ;SESSION_LIFE_TIME = 86400
  1719. ;;
  1720. ;; SameSite settings. Either "none", "lax", or "strict"
  1721. ;SAME_SITE=lax
  1722. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1723. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1724. ;[picture]
  1725. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1726. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1727. ;;
  1728. ;AVATAR_UPLOAD_PATH = data/avatars
  1729. ;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
  1730. ;;
  1731. ;; How Gitea deals with missing repository avatars
  1732. ;; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used
  1733. ;REPOSITORY_AVATAR_FALLBACK = none
  1734. ;REPOSITORY_AVATAR_FALLBACK_IMAGE = /img/repo_default.png
  1735. ;;
  1736. ;; Max Width and Height of uploaded avatars.
  1737. ;; This is to limit the amount of RAM used when resizing the image.
  1738. ;AVATAR_MAX_WIDTH = 4096
  1739. ;AVATAR_MAX_HEIGHT = 4096
  1740. ;;
  1741. ;; The multiplication factor for rendered avatar images.
  1742. ;; Larger values result in finer rendering on HiDPI devices.
  1743. ;AVATAR_RENDERED_SIZE_FACTOR = 2
  1744. ;;
  1745. ;; Maximum allowed file size for uploaded avatars.
  1746. ;; This is to limit the amount of RAM used when resizing the image.
  1747. ;AVATAR_MAX_FILE_SIZE = 1048576
  1748. ;;
  1749. ;; If the uploaded file is not larger than this byte size, the image will be used as is, without resizing/converting.
  1750. ;AVATAR_MAX_ORIGIN_SIZE = 262144
  1751. ;;
  1752. ;; Chinese users can choose "duoshuo"
  1753. ;; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  1754. ;GRAVATAR_SOURCE = gravatar
  1755. ;;
  1756. ;; This value will always be true in offline mode.
  1757. ;DISABLE_GRAVATAR = false
  1758. ;;
  1759. ;; Federated avatar lookup uses DNS to discover avatar associated
  1760. ;; with emails, see https://www.libravatar.org
  1761. ;; This value will always be false in offline mode or when Gravatar is disabled.
  1762. ;ENABLE_FEDERATED_AVATAR = false
  1763. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1764. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1765. ;[attachment]
  1766. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1767. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1768. ;;
  1769. ;; Whether issue and pull request attachments are enabled. Defaults to `true`
  1770. ;ENABLED = true
  1771. ;;
  1772. ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  1773. ;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
  1774. ;;
  1775. ;; Max size of each file. Defaults to 2048MB
  1776. ;MAX_SIZE = 2048
  1777. ;;
  1778. ;; Max number of files per upload. Defaults to 5
  1779. ;MAX_FILES = 5
  1780. ;;
  1781. ;; Storage type for attachments, `local` for local disk or `minio` for s3 compatible
  1782. ;; object storage service, default is `local`.
  1783. ;STORAGE_TYPE = local
  1784. ;;
  1785. ;; Allows the storage driver to redirect to authenticated URLs to serve files directly
  1786. ;; Currently, only `minio` is supported.
  1787. ;SERVE_DIRECT = false
  1788. ;;
  1789. ;; Path for attachments. Defaults to `attachments`. Only available when STORAGE_TYPE is `local`
  1790. ;; Relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`
  1791. ;PATH = attachments
  1792. ;;
  1793. ;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
  1794. ;MINIO_ENDPOINT = localhost:9000
  1795. ;;
  1796. ;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
  1797. ;MINIO_ACCESS_KEY_ID =
  1798. ;;
  1799. ;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
  1800. ;MINIO_SECRET_ACCESS_KEY =
  1801. ;;
  1802. ;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
  1803. ;MINIO_BUCKET = gitea
  1804. ;;
  1805. ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
  1806. ;MINIO_LOCATION = us-east-1
  1807. ;;
  1808. ;; Minio base path on the bucket only available when STORAGE_TYPE is `minio`
  1809. ;MINIO_BASE_PATH = attachments/
  1810. ;;
  1811. ;; Minio enabled ssl only available when STORAGE_TYPE is `minio`
  1812. ;MINIO_USE_SSL = false
  1813. ;;
  1814. ;; Minio skip SSL verification available when STORAGE_TYPE is `minio`
  1815. ;MINIO_INSECURE_SKIP_VERIFY = false
  1816. ;;
  1817. ;; Minio checksum algorithm: default (for MinIO or AWS S3) or md5 (for Cloudflare or Backblaze)
  1818. ;MINIO_CHECKSUM_ALGORITHM = default
  1819. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1820. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1821. ;[time]
  1822. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1823. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1824. ;;
  1825. ;; Location the UI time display i.e. Asia/Shanghai
  1826. ;; Empty means server's location setting
  1827. ;DEFAULT_UI_LOCATION =
  1828. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1829. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1830. ;[cron]
  1831. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1832. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1833. ;;
  1834. ;; Common settings
  1835. ;;
  1836. ;; Setting this to true will enable all cron tasks periodically with default settings.
  1837. ;ENABLED = false
  1838. ;; Setting this to true will run all enabled cron tasks when Gitea starts.
  1839. ;RUN_AT_START = false
  1840. ;;
  1841. ;; Note: ``SCHEDULE`` accept formats
  1842. ;; - Full crontab specs, e.g. "* * * * * ?"
  1843. ;; - Descriptors, e.g. "@midnight", "@every 1h30m"
  1844. ;; See more: https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14
  1845. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1846. ;; Basic cron tasks - enabled by default
  1847. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1848. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1849. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1850. ;; Clean up old repository archives
  1851. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1852. ;[cron.archive_cleanup]
  1853. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1854. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1855. ;; Whether to enable the job
  1856. ;ENABLED = true
  1857. ;; Whether to always run at least once at start up time (if ENABLED)
  1858. ;RUN_AT_START = true
  1859. ;; Whether to emit notice on successful execution too
  1860. ;NOTICE_ON_SUCCESS = false
  1861. ;; Time interval for job to run
  1862. ;SCHEDULE = @midnight
  1863. ;; Archives created more than OLDER_THAN ago are subject to deletion
  1864. ;OLDER_THAN = 24h
  1865. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1866. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1867. ;; Update mirrors
  1868. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1869. ;[cron.update_mirrors]
  1870. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1871. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1872. ;SCHEDULE = @every 10m
  1873. ;; Enable running Update mirrors task periodically.
  1874. ;ENABLED = true
  1875. ;; Run Update mirrors task when Gitea starts.
  1876. ;RUN_AT_START = false
  1877. ;; Notice if not success
  1878. ;NOTICE_ON_SUCCESS = false
  1879. ;; Limit the number of mirrors added to the queue to this number
  1880. ;; (negative values mean no limit, 0 will result in no result in no mirrors being queued effectively disabling pull mirror updating.)
  1881. ;PULL_LIMIT=50
  1882. ;; Limit the number of mirrors added to the queue to this number
  1883. ;; (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling push mirror updating)
  1884. ;PUSH_LIMIT=50
  1885. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1886. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1887. ;; Repository health check
  1888. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1889. ;[cron.repo_health_check]
  1890. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1891. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1892. ;SCHEDULE = @midnight
  1893. ;; Enable running Repository health check task periodically.
  1894. ;ENABLED = true
  1895. ;; Run Repository health check task when Gitea starts.
  1896. ;RUN_AT_START = false
  1897. ;; Notice if not success
  1898. ;NOTICE_ON_SUCCESS = false
  1899. ;TIMEOUT = 60s
  1900. ;; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  1901. ;; see more on http://git-scm.com/docs/git-fsck
  1902. ;ARGS =
  1903. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1904. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1905. ;; Check repository statistics
  1906. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1907. ;[cron.check_repo_stats]
  1908. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1909. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1910. ;; Enable running check repository statistics task periodically.
  1911. ;ENABLED = true
  1912. ;; Run check repository statistics task when Gitea starts.
  1913. ;RUN_AT_START = true
  1914. ;; Notice if not success
  1915. ;NOTICE_ON_SUCCESS = false
  1916. ;SCHEDULE = @midnight
  1917. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1918. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1919. ;[cron.update_migration_poster_id]
  1920. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1921. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1922. ; Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts.
  1923. ;ENABLED = true
  1924. ;; Update migrated repositories' issues and comments' posterid when starting server (default true)
  1925. ;RUN_AT_START = true
  1926. ;; Notice if not success
  1927. ;NOTICE_ON_SUCCESS = false
  1928. ;; Interval as a duration between each synchronization. (default every 24h)
  1929. ;SCHEDULE = @midnight
  1930. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1931. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1932. ;; Synchronize external user data (only LDAP user synchronization is supported)
  1933. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1934. ;[cron.sync_external_users]
  1935. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1936. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1937. ;ENABLED = true
  1938. ;; Synchronize external user data when starting server (default false)
  1939. ;RUN_AT_START = false
  1940. ;; Notice if not success
  1941. ;NOTICE_ON_SUCCESS = false
  1942. ;; Interval as a duration between each synchronization (default every 24h)
  1943. ;SCHEDULE = @midnight
  1944. ;; Create new users, update existing user data and disable users that are not in external source anymore (default)
  1945. ;; or only create new users if UPDATE_EXISTING is set to false
  1946. ;UPDATE_EXISTING = true
  1947. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1948. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1949. ;; Clean-up deleted branches
  1950. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1951. ;[cron.deleted_branches_cleanup]
  1952. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1953. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1954. ;ENABLED = true
  1955. ;; Clean-up deleted branches when starting server (default true)
  1956. ;RUN_AT_START = true
  1957. ;; Notice if not success
  1958. ;NOTICE_ON_SUCCESS = false
  1959. ;; Interval as a duration between each synchronization (default every 24h)
  1960. ;SCHEDULE = @midnight
  1961. ;; deleted branches than OLDER_THAN ago are subject to deletion
  1962. ;OLDER_THAN = 24h
  1963. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1964. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1965. ;; Cleanup hook_task table
  1966. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1967. ;[cron.cleanup_hook_task_table]
  1968. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1969. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1970. ;; Whether to enable the job
  1971. ;ENABLED = true
  1972. ;; Whether to always run at start up time (if ENABLED)
  1973. ;RUN_AT_START = false
  1974. ;; Time interval for job to run
  1975. ;SCHEDULE = @midnight
  1976. ;; 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).
  1977. ;CLEANUP_TYPE = OlderThan
  1978. ;; If CLEANUP_TYPE is set to OlderThan, then any delivered hook_task records older than this expression will be deleted.
  1979. ;OLDER_THAN = 168h
  1980. ;; 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).
  1981. ;NUMBER_TO_KEEP = 10
  1982. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1983. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1984. ;; Cleanup expired packages
  1985. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1986. ;[cron.cleanup_packages]
  1987. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1988. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1989. ;; Whether to enable the job
  1990. ;ENABLED = true
  1991. ;; Whether to always run at least once at start up time (if ENABLED)
  1992. ;RUN_AT_START = true
  1993. ;; Whether to emit notice on successful execution too
  1994. ;NOTICE_ON_SUCCESS = false
  1995. ;; Time interval for job to run
  1996. ;SCHEDULE = @midnight
  1997. ;; Unreferenced blobs created more than OLDER_THAN ago are subject to deletion
  1998. ;OLDER_THAN = 24h
  1999. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2000. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2001. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2002. ; Extended cron task - not enabled by default
  2003. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2004. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2005. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2006. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2007. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2008. ;; Delete all unactivated accounts
  2009. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2010. ;[cron.delete_inactive_accounts]
  2011. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2012. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2013. ;ENABLED = false
  2014. ;RUN_AT_START = false
  2015. ;NOTICE_ON_SUCCESS = false
  2016. ;SCHEDULE = @annually
  2017. ;OLDER_THAN = 168h
  2018. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2019. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2020. ;; Delete all repository archives
  2021. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2022. ;[cron.delete_repo_archives]
  2023. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2024. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2025. ;ENABLED = false
  2026. ;RUN_AT_START = false
  2027. ;NOTICE_ON_SUCCESS = false
  2028. ;SCHEDULE = @annually;
  2029. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2030. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2031. ;; Garbage collect all repositories
  2032. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2033. ;[cron.git_gc_repos]
  2034. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2035. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2036. ;ENABLED = false
  2037. ;RUN_AT_START = false
  2038. ;NOTICE_ON_SUCCESS = false
  2039. ;SCHEDULE = @every 72h
  2040. ;TIMEOUT = 60s
  2041. ;; Arguments for command 'git gc'
  2042. ;; The default value is same with [git] -> GC_ARGS
  2043. ;ARGS =
  2044. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2045. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2046. ;; Update the '.ssh/authorized_keys' file with Gitea SSH keys
  2047. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2048. ;[cron.resync_all_sshkeys]
  2049. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2050. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2051. ;ENABLED = false
  2052. ;RUN_AT_START = false
  2053. ;NOTICE_ON_SUCCESS = false
  2054. ;SCHEDULE = @every 72h
  2055. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2056. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2057. ;; Resynchronize pre-receive, update and post-receive hooks of all repositories.
  2058. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2059. ;[cron.resync_all_hooks]
  2060. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2061. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2062. ;ENABLED = false
  2063. ;RUN_AT_START = false
  2064. ;NOTICE_ON_SUCCESS = false
  2065. ;SCHEDULE = @every 72h
  2066. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2067. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2068. ;; Reinitialize all missing Git repositories for which records exist
  2069. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2070. ;[cron.reinit_missing_repos]
  2071. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2072. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2073. ;ENABLED = false
  2074. ;RUN_AT_START = false
  2075. ;NOTICE_ON_SUCCESS = false
  2076. ;SCHEDULE = @every 72h
  2077. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2078. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2079. ;; Delete all repositories missing their Git files
  2080. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2081. ;[cron.delete_missing_repos]
  2082. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2083. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2084. ;ENABLED = false
  2085. ;RUN_AT_START = false
  2086. ;NOTICE_ON_SUCCESS = false
  2087. ;SCHEDULE = @every 72h
  2088. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2089. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2090. ;; Delete generated repository avatars
  2091. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2092. ;[cron.delete_generated_repository_avatars]
  2093. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2094. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2095. ;ENABLED = false
  2096. ;RUN_AT_START = false
  2097. ;NOTICE_ON_SUCCESS = false
  2098. ;SCHEDULE = @every 72h
  2099. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2100. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2101. ;; Delete all old actions from database
  2102. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2103. ;[cron.delete_old_actions]
  2104. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2105. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2106. ;ENABLED = false
  2107. ;RUN_AT_START = false
  2108. ;NOTICE_ON_SUCCESS = false
  2109. ;SCHEDULE = @every 168h
  2110. ;OLDER_THAN = 8760h
  2111. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2112. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2113. ;; Check for new Gitea versions
  2114. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2115. ;[cron.update_checker]
  2116. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2117. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2118. ;ENABLED = true
  2119. ;RUN_AT_START = false
  2120. ;ENABLE_SUCCESS_NOTICE = false
  2121. ;SCHEDULE = @every 168h
  2122. ;HTTP_ENDPOINT = https://dl.gitea.com/gitea/version.json
  2123. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2124. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2125. ;; Delete all old system notices from database
  2126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2127. ;[cron.delete_old_system_notices]
  2128. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2129. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2130. ;ENABLED = false
  2131. ;RUN_AT_START = false
  2132. ;NO_SUCCESS_NOTICE = false
  2133. ;SCHEDULE = @every 168h
  2134. ;OLDER_THAN = 8760h
  2135. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2136. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2137. ;; Garbage collect LFS pointers in repositories
  2138. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2139. ;[cron.gc_lfs]
  2140. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2141. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2142. ;ENABLED = false
  2143. ;; Garbage collect LFS pointers in repositories (default false)
  2144. ;RUN_AT_START = false
  2145. ;; Interval as a duration between each gc run (default every 24h)
  2146. ;SCHEDULE = @every 24h
  2147. ;; Only attempt to garbage collect LFSMetaObjects older than this (default 7 days)
  2148. ;OLDER_THAN = 168h
  2149. ;; Only attempt to garbage collect LFSMetaObjects that have not been attempted to be garbage collected for this long (default 3 days)
  2150. ;LAST_UPDATED_MORE_THAN_AGO = 72h
  2151. ; Minimum number of stale LFSMetaObjects to check per repo. Set to `0` to always check all.
  2152. ;NUMBER_TO_CHECK_PER_REPO = 100
  2153. ;Check at least this proportion of LFSMetaObjects per repo. (This may cause all stale LFSMetaObjects to be checked.)
  2154. ;PROPORTION_TO_CHECK_PER_REPO = 0.6
  2155. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2156. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2157. ;[mirror]
  2158. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2159. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2160. ;; 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.
  2161. ;ENABLED = true
  2162. ;; Disable the creation of **new** pull mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
  2163. ;DISABLE_NEW_PULL = false
  2164. ;; Disable the creation of **new** push mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
  2165. ;DISABLE_NEW_PUSH = false
  2166. ;; Default interval as a duration between each check
  2167. ;DEFAULT_INTERVAL = 8h
  2168. ;; Min interval as a duration must be > 1m
  2169. ;MIN_INTERVAL = 10m
  2170. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2171. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2172. ;[api]
  2173. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2174. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2175. ;; Enables the API documentation endpoints (/api/swagger, /api/v1/swagger, …). True or false.
  2176. ;ENABLE_SWAGGER = true
  2177. ;; Max number of items in a page
  2178. ;MAX_RESPONSE_ITEMS = 50
  2179. ;; Default paging number of api
  2180. ;DEFAULT_PAGING_NUM = 30
  2181. ;; Default and maximum number of items per page for git trees api
  2182. ;DEFAULT_GIT_TREES_PER_PAGE = 1000
  2183. ;; Default max size of a blob returned by the blobs API (default is 10MiB)
  2184. ;DEFAULT_MAX_BLOB_SIZE = 10485760
  2185. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2186. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2187. ;[i18n]
  2188. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2189. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2190. ;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
  2191. ;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
  2192. ;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,മലയാളം
  2193. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2194. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2195. ;[highlight.mapping]
  2196. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2197. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2198. ;; Extension mapping to highlight class
  2199. ;; e.g. .toml=ini
  2200. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2201. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2202. ;[other]
  2203. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2204. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2205. ;; Show version information about Gitea and Go in the footer
  2206. ;SHOW_FOOTER_VERSION = true
  2207. ;; Show template execution time in the footer
  2208. ;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
  2209. ;; Generate sitemap. Defaults to `true`.
  2210. ;ENABLE_SITEMAP = true
  2211. ;; Enable/Disable RSS/Atom feed
  2212. ;ENABLE_FEED = true
  2213. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2214. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2215. ;[markup]
  2216. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2217. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2218. ;; Set the maximum number of characters in a mermaid source. (Set to -1 to disable limits)
  2219. ;MERMAID_MAX_SOURCE_CHARACTERS = 5000
  2220. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2221. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2222. ;[markup.sanitizer.1]
  2223. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2224. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2225. ;; The following keys can appear once to define a sanitation policy rule.
  2226. ;; This section can appear multiple times by adding a unique alphanumeric suffix to define multiple rules.
  2227. ;; e.g., [markup.sanitizer.1] -> [markup.sanitizer.2] -> [markup.sanitizer.TeX]
  2228. ;ELEMENT = span
  2229. ;ALLOW_ATTR = class
  2230. ;REGEXP = ^(info|warning|error)$
  2231. ;;
  2232. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2233. ;; Other markup formats e.g. asciidoc
  2234. ;;
  2235. ;; uncomment and enable the below section.
  2236. ;; (You can add other markup formats by copying the section and adjusting
  2237. ;; the section name suffix "asciidoc" to something else.)
  2238. ;[markup.asciidoc]
  2239. ;ENABLED = false
  2240. ;; List of file extensions that should be rendered by an external command
  2241. ;FILE_EXTENSIONS = .adoc,.asciidoc
  2242. ;; External command to render all matching extensions
  2243. ;RENDER_COMMAND = "asciidoc --out-file=- -"
  2244. ;; Don't pass the file on STDIN, pass the filename as argument instead.
  2245. ;IS_INPUT_FILE = false
  2246. ;; How the content will be rendered.
  2247. ;; * 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.*] .
  2248. ;; * 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.
  2249. ;; * 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.
  2250. ;RENDER_CONTENT_MODE=sanitized
  2251. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2252. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2253. ;[metrics]
  2254. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2255. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2256. ;; Enables metrics endpoint. True or false; default is false.
  2257. ;ENABLED = false
  2258. ;; If you want to add authorization, specify a token here
  2259. ;TOKEN =
  2260. ;; Enable issue by label metrics; default is false
  2261. ;ENABLED_ISSUE_BY_LABEL = false
  2262. ;; Enable issue by repository metrics; default is false
  2263. ;ENABLED_ISSUE_BY_REPOSITORY = false
  2264. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2265. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2266. ;[task]
  2267. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2268. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2269. ;;
  2270. ;; Task queue type, could be `channel` or `redis`.
  2271. ;QUEUE_TYPE = channel
  2272. ;;
  2273. ;; Task queue length, available only when `QUEUE_TYPE` is `channel`.
  2274. ;QUEUE_LENGTH = 1000
  2275. ;;
  2276. ;; Task queue connection string, available only when `QUEUE_TYPE` is `redis`.
  2277. ;; 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`.
  2278. ;QUEUE_CONN_STR = "redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s"
  2279. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2280. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2281. ;[migrations]
  2282. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2283. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2284. ;;
  2285. ;; Max attempts per http/https request on migrations.
  2286. ;MAX_ATTEMPTS = 3
  2287. ;;
  2288. ;; Backoff time per http/https request retry (seconds)
  2289. ;RETRY_BACKOFF = 3
  2290. ;;
  2291. ;; Allowed domains for migrating, default is blank. Blank means everything will be allowed.
  2292. ;; Multiple domains could be separated by commas.
  2293. ;; Wildcard is supported: "github.com, *.github.com"
  2294. ;ALLOWED_DOMAINS =
  2295. ;;
  2296. ;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas.
  2297. ;; When ALLOWED_DOMAINS is not blank, this option has a higher priority to deny domains.
  2298. ;; Wildcard is supported.
  2299. ;BLOCKED_DOMAINS =
  2300. ;;
  2301. ;; Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 (false by default)
  2302. ;; If a domain is allowed by ALLOWED_DOMAINS, this option will be ignored.
  2303. ;ALLOW_LOCALNETWORKS = false
  2304. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2305. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2306. ;[federation]
  2307. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2308. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2309. ;;
  2310. ;; Enable/Disable federation capabilities
  2311. ;ENABLED = false
  2312. ;;
  2313. ;; Enable/Disable user statistics for nodeinfo if federation is enabled
  2314. ;SHARE_USER_STATISTICS = true
  2315. ;;
  2316. ;; Maximum federation request and response size (MB)
  2317. ;MAX_SIZE = 4
  2318. ;;
  2319. ;; WARNING: Changing the settings below can break federation.
  2320. ;;
  2321. ;; HTTP signature algorithms
  2322. ;ALGORITHMS = rsa-sha256, rsa-sha512, ed25519
  2323. ;;
  2324. ;; HTTP signature digest algorithm
  2325. ;DIGEST_ALGORITHM = SHA-256
  2326. ;;
  2327. ;; GET headers for federation requests
  2328. ;GET_HEADERS = (request-target), Date
  2329. ;;
  2330. ;; POST headers for federation requests
  2331. ;POST_HEADERS = (request-target), Date, Digest
  2332. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2333. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2334. ;[packages]
  2335. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2336. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2337. ;;
  2338. ;; Enable/Disable package registry capabilities
  2339. ;ENABLED = true
  2340. ;;
  2341. ;STORAGE_TYPE = local
  2342. ;; override the minio base path if storage type is minio
  2343. ;MINIO_BASE_PATH = packages/
  2344. ;;
  2345. ;; Path for chunked uploads. Defaults to APP_DATA_PATH + `tmp/package-upload`
  2346. ;CHUNKED_UPLOAD_PATH = tmp/package-upload
  2347. ;;
  2348. ;; Maximum count of package versions a single owner can have (`-1` means no limits)
  2349. ;LIMIT_TOTAL_OWNER_COUNT = -1
  2350. ;; Maximum size of packages a single owner can use (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2351. ;LIMIT_TOTAL_OWNER_SIZE = -1
  2352. ;; Maximum size of an Alpine upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2353. ;LIMIT_SIZE_ALPINE = -1
  2354. ;; Maximum size of a Cargo upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2355. ;LIMIT_SIZE_CARGO = -1
  2356. ;; Maximum size of a Chef upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2357. ;LIMIT_SIZE_CHEF = -1
  2358. ;; Maximum size of a Composer upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2359. ;LIMIT_SIZE_COMPOSER = -1
  2360. ;; Maximum size of a Conan upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2361. ;LIMIT_SIZE_CONAN = -1
  2362. ;; Maximum size of a Conda upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2363. ;LIMIT_SIZE_CONDA = -1
  2364. ;; Maximum size of a Container upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2365. ;LIMIT_SIZE_CONTAINER = -1
  2366. ;; Maximum size of a CRAN upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2367. ;LIMIT_SIZE_CRAN = -1
  2368. ;; Maximum size of a Debian upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2369. ;LIMIT_SIZE_DEBIAN = -1
  2370. ;; Maximum size of a Generic upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2371. ;LIMIT_SIZE_GENERIC = -1
  2372. ;; Maximum size of a Go upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2373. ;LIMIT_SIZE_GO = -1
  2374. ;; Maximum size of a Helm upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2375. ;LIMIT_SIZE_HELM = -1
  2376. ;; Maximum size of a Maven upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2377. ;LIMIT_SIZE_MAVEN = -1
  2378. ;; Maximum size of a npm upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2379. ;LIMIT_SIZE_NPM = -1
  2380. ;; Maximum size of a NuGet upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2381. ;LIMIT_SIZE_NUGET = -1
  2382. ;; Maximum size of a Pub upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2383. ;LIMIT_SIZE_PUB = -1
  2384. ;; Maximum size of a PyPI upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2385. ;LIMIT_SIZE_PYPI = -1
  2386. ;; Maximum size of a RPM upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2387. ;LIMIT_SIZE_RPM = -1
  2388. ;; Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2389. ;LIMIT_SIZE_RUBYGEMS = -1
  2390. ;; Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2391. ;LIMIT_SIZE_SWIFT = -1
  2392. ;; Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
  2393. ;LIMIT_SIZE_VAGRANT = -1
  2394. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2395. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2396. ;; default storage for attachments, lfs and avatars
  2397. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2398. ;[storage]
  2399. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2400. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2401. ;; storage type
  2402. ;STORAGE_TYPE = local
  2403. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2404. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2405. ;; repo-archive storage will override storage
  2406. ;;
  2407. ;[repo-archive]
  2408. ;STORAGE_TYPE = local
  2409. ;;
  2410. ;; Where your lfs files reside, default is data/lfs.
  2411. ;PATH = data/repo-archive
  2412. ;;
  2413. ;; override the minio base path if storage type is minio
  2414. ;MINIO_BASE_PATH = repo-archive/
  2415. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2416. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2417. ;; settings for repository archives, will override storage setting
  2418. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2419. ;[storage.repo-archive]
  2420. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2421. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2422. ;; storage type
  2423. ;STORAGE_TYPE = local
  2424. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2425. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2426. ;; lfs storage will override storage
  2427. ;;
  2428. ;[lfs]
  2429. ;STORAGE_TYPE = local
  2430. ;;
  2431. ;; Where your lfs files reside, default is data/lfs.
  2432. ;PATH = data/lfs
  2433. ;;
  2434. ;; override the minio base path if storage type is minio
  2435. ;MINIO_BASE_PATH = lfs/
  2436. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2437. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2438. ;; settings for packages, will override storage setting
  2439. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2440. ;[storage.packages]
  2441. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2442. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2443. ;; storage type
  2444. ;STORAGE_TYPE = local
  2445. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2446. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2447. ;; customize storage
  2448. ;[storage.my_minio]
  2449. ;STORAGE_TYPE = minio
  2450. ;;
  2451. ;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
  2452. ;MINIO_ENDPOINT = localhost:9000
  2453. ;;
  2454. ;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
  2455. ;MINIO_ACCESS_KEY_ID =
  2456. ;;
  2457. ;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
  2458. ;MINIO_SECRET_ACCESS_KEY =
  2459. ;;
  2460. ;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
  2461. ;MINIO_BUCKET = gitea
  2462. ;;
  2463. ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
  2464. ;MINIO_LOCATION = us-east-1
  2465. ;;
  2466. ;; Minio enabled ssl only available when STORAGE_TYPE is `minio`
  2467. ;MINIO_USE_SSL = false
  2468. ;;
  2469. ;; Minio skip SSL verification available when STORAGE_TYPE is `minio`
  2470. ;MINIO_INSECURE_SKIP_VERIFY = false
  2471. ;[proxy]
  2472. ;; Enable the proxy, all requests to external via HTTP will be affected
  2473. ;PROXY_ENABLED = false
  2474. ;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy/no_proxy
  2475. ;PROXY_URL =
  2476. ;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
  2477. ;PROXY_HOSTS =
  2478. ; [actions]
  2479. ;; Enable/Disable actions capabilities
  2480. ;ENABLED = true
  2481. ;;
  2482. ;; Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
  2483. ;DEFAULT_ACTIONS_URL = github
  2484. ;; Default artifact retention time in days, default is 90 days
  2485. ;ARTIFACT_RETENTION_DAYS = 90
  2486. ;; Timeout to stop the task which have running status, but haven't been updated for a long time
  2487. ;ZOMBIE_TASK_TIMEOUT = 10m
  2488. ;; Timeout to stop the tasks which have running status and continuous updates, but don't end for a long time
  2489. ;ENDLESS_TASK_TIMEOUT = 3h
  2490. ;; Timeout to cancel the jobs which have waiting status, but haven't been picked by a runner for a long time
  2491. ;ABANDONED_JOB_TIMEOUT = 24h
  2492. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2493. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2494. ;; settings for action logs, will override storage setting
  2495. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2496. ;[storage.actions_log]
  2497. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2498. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2499. ;; storage type
  2500. ;STORAGE_TYPE = local