summaryrefslogtreecommitdiffstats
path: root/docs/content
Commit message (Collapse)AuthorAgeFilesLines
* Make "install page" respect environment config (#25648) (#25799)wxiaoguang2023-07-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #25648 Replace #25580 Fix #19453 The problem was: when users set "GITEA__XXX__YYY" , the "install page" doesn't respect it. So, to make the result consistent and avoid surprising end users, now the "install page" also writes the environment variables to the config file. And, to make things clear, there are enough messages on the UI to tell users what will happen. There are some necessary/related changes to `environment-to-ini.go`: * The "--clear" flag is removed and it was incorrectly written there. The "clear" operation should be done if INSTALL_LOCK=true * The "--prefix" flag is removed because it's never used, never documented and it only causes inconsistent behavior. The only conflict during backport is "ui divider" in templates/install.tmpl
* docs: rootless docker ssh's default port is 2222 (#25771) (#25772)Giteabot2023-07-091-1/+1
| | | | | | | | | | | Backport #25771 by @leavesster --- according `docker/rootless/usr/local/bin/docker-setup.sh` , in rootless docker setup, ssh port is 2222. and mysql database case should port same as PostgreSQL port Co-authored-by: leavesster <11785335+leavesster@users.noreply.github.com>
* Restrict `[actions].DEFAULT_ACTIONS_URL` to only `github` or `self` (#25581) ↵Giteabot2023-06-301-28/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25604) Backport #25581 by @wolfogre Resolve #24789 ## :warning: BREAKING :warning: Before this, `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`. But now, `DEFAULT_ACTIONS_URL` supports only `github`(`https://github.com`) or `self`(the root url of current Gitea instance), and the default value is `github`. If it has configured with a URL, an error log will be displayed and it will fallback to `github`. Actually, what we really want to do is always make it `https://github.com`, however, this may not be acceptable for some instances of internal use, so there's extra support for `self`, but no more, even `https://gitea.com`. Please note that `uses: https://xxx/yyy/zzz` always works and it does exactly what it is supposed to do. Although it's breaking, I belive it should be backported to `v1.20` due to some security issues. Follow-up on the runner side: - https://gitea.com/gitea/act_runner/pulls/262 - https://gitea.com/gitea/act/pulls/70 Co-authored-by: Jason Song <i@wolfogre.com>
* Add documentation about supported workflow trigger events (#25582) (#25589)Giteabot2023-06-292-0/+40
| | | | | | | | | Backport #25582 by @Zettat123 Right now Gitea doesn't support all [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows). This PR lists the supported events to help users write workflow files. Co-authored-by: Zettat123 <zettat123@gmail.com>
* Document creating an API key from the CLI (#25504)lonix12023-06-251-0/+8
| | | | | | | Related to https://github.com/go-gitea/gitea/issues/25503 --------- Co-authored-by: delvh <dev.lh@web.de>
* Use the new download domain replace the old (#25405) (#25409)Giteabot2023-06-2110-17/+17
| | | | | | | Backport #25405 by @lunny As title. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add Exoscale to installation on cloud provider docs (#25342) (#25346)Giteabot2023-06-181-0/+10
| | | | | | | | | | | | | Backport #25342 by @pmig We created a Gitea application for the [Exoscale Marketplace](https://www.exoscale.com/marketplace/listing/glasskube-gitea/) for easier installation on the European cloud provider. The installation is managed via the [Glasskube Kubernetes Operator](https://github.com/glasskube/operator). Signed-off-by: Philip Miglinci <pmig@glasskube.eu> Co-authored-by: Philip Miglinci <p.miglinci@gmail.com>
* Add link to support page for commercial support (#25293) (#25297)Giteabot2023-06-161-0/+1
| | | | | Backport #25293 by @techknowlogick Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Docs about how to generate config for act runner with docker and setup it ↵Giteabot2023-06-162-0/+54
| | | | | | | | | | | | | with docker-compose (#25256) (#25296) Backport #25256 by @thezzisu In this pull request, the following changes are addressed: - State user should create `config.yaml` before start container to avoid errors. - Provided instructions to deploy runners using docker compose. Co-authored-by: Zisu Zhang <thezzisu@gmail.com>
* Fix all possible setting error related storages and added some tests ↵Giteabot2023-06-142-8/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#23911) (#25244) Backport #23911 by @lunny Follow up #22405 Fix #20703 This PR rewrites storage configuration read sequences with some breaks and tests. It becomes more strict than before and also fixed some inherit problems. - Move storage's MinioConfig struct into setting, so after the configuration loading, the values will be stored into the struct but not still on some section. - All storages configurations should be stored on one section, configuration items cannot be overrided by multiple sections. The prioioty of configuration is `[attachment]` > `[storage.attachments]` | `[storage.customized]` > `[storage]` > `default` - For extra override configuration items, currently are `SERVE_DIRECT`, `MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another section. The prioioty of the override configuration is `[attachment]` > `[storage.attachments]` > `default`. - Add more tests for storages configurations. - Update the storage documentations. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve some documents: release version, logging, NFS lock (#25202) (#25204)Giteabot2023-06-122-42/+23
| | | | | | | | | | | | | | | | | Backport #25202 by @wxiaoguang Close #23654 Close #24684 @techknowlogick I still think we need to rename https://dl.gitea.com/gitea/1.20/ to https://dl.gitea.com/gitea/1.20-nightly/ `/gitea/1.20/` is quite confusing, it needs these words to explain why. If we call it `1.20-nightly`, the FAQ can be simplified a lot. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Change branch name from master to main in some documents' links (#25126) ↵HesterG2023-06-0812-16/+16
| | | | | | | (#25140) Backport #25126 to 1.20 As title. And needs to backport to 1.19
* Enable all webpack sourcemaps in dev build, disable all in prod build (#25089)silverwind2023-06-061-0/+2
| | | | | | | | | | | | | | | - Enable all source maps in dev build - Disable all source maps in prod build - Provide `ENABLE_SOURCEMAP` env var to override it. I think the strange error seen in https://github.com/go-gitea/gitea/issues/24784 is sourcemap related, so if we enable/disable them all, it might go away. But it's most definitely a Safari bug. With all sourcemaps disabled, binary size goes down by around 1-2 MB, with all enabled it goes up by around 12MB. If +12MB is acceptable, we could also always enable them by default as fully source maps do have some debugging benefits.
* change placeholders in actions docstechknowlogick2023-06-051-1/+1
|
* change placeholders in actions docstechknowlogick2023-06-051-1/+1
|
* Introduce how to configure cache when starting a Runner with Docker (#25077)sillyguodong2023-06-052-0/+67
| | | | | | | If a user starts a runner using a Docker image without making additional configurations, the [cache action](https://github.com/actions/cache) will not work properly. Therefore, add a section in the documentation that explains how to configure the cache correctly.
* improve permission documentation (#23942)Lunny Xiao2023-06-051-9/+24
|
* Redesign Scoped Access Tokens (#24767)Jack Hay2023-06-041-36/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Changes - Adds the following high level access scopes, each with `read` and `write` levels: - `activitypub` - `admin` (hidden if user is not a site admin) - `misc` - `notification` - `organization` - `package` - `issue` - `repository` - `user` - Adds new middleware function `tokenRequiresScopes()` in addition to `reqToken()` - `tokenRequiresScopes()` is used for each high-level api section - _if_ a scoped token is present, checks that the required scope is included based on the section and HTTP method - `reqToken()` is used for individual routes - checks that required authentication is present (but does not check scope levels as this will already have been handled by `tokenRequiresScopes()` - Adds migration to convert old scoped access tokens to the new set of scopes - Updates the user interface for scope selection ### User interface example <img width="903" alt="Screen Shot 2023-05-31 at 1 56 55 PM" src="https://github.com/go-gitea/gitea/assets/23248839/654766ec-2143-4f59-9037-3b51600e32f3"> <img width="917" alt="Screen Shot 2023-05-31 at 1 56 43 PM" src="https://github.com/go-gitea/gitea/assets/23248839/1ad64081-012c-4a73-b393-66b30352654c"> ## tokenRequiresScopes Design Decision - `tokenRequiresScopes()` was added to more reliably cover api routes. For an incoming request, this function uses the given scope category (say `AccessTokenScopeCategoryOrganization`) and the HTTP method (say `DELETE`) and verifies that any scoped tokens in use include `delete:organization`. - `reqToken()` is used to enforce auth for individual routes that require it. If a scoped token is not present for a request, `tokenRequiresScopes()` will not return an error ## TODO - [x] Alphabetize scope categories - [x] Change 'public repos only' to a radio button (private vs public). Also expand this to organizations - [X] Disable token creation if no scopes selected. Alternatively, show warning - [x] `reqToken()` is missing from many `POST/DELETE` routes in the api. `tokenRequiresScopes()` only checks that a given token has the correct scope, `reqToken()` must be used to check that a token (or some other auth) is present. - _This should be addressed in this PR_ - [x] The migration should be reviewed very carefully in order to minimize access changes to existing user tokens. - _This should be addressed in this PR_ - [x] Link to api to swagger documentation, clarify what read/write/delete levels correspond to - [x] Review cases where more than one scope is needed as this directly deviates from the api definition. - _This should be addressed in this PR_ - For example: ```go m.Group("/users/{username}/orgs", func() { m.Get("", reqToken(), org.ListUserOrgs) m.Get("/{org}/permissions", reqToken(), org.GetUserOrgsPermissions) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryUser, auth_model.AccessTokenScopeCategoryOrganization), context_service.UserAssignmentAPI()) ``` ## Future improvements - [ ] Add required scopes to swagger documentation - [ ] Redesign `reqToken()` to be opt-out rather than opt-in - [ ] Subdivide scopes like `repository` - [ ] Once a token is created, if it has no scopes, we should display text instead of an empty bullet point - [ ] If the 'public repos only' option is selected, should read categories be selected by default Closes #24501 Closes #24799 Co-authored-by: Jonathan Tran <jon@allspice.io> Co-authored-by: Kyle D <kdumontnu@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Allow for PKCE flow without client secret + add docs (#25033)Denys Konovalov2023-06-031-7/+71
| | | | | | | | | | | | | | | | | | | | | | | The PKCE flow according to [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636) allows for secure authorization without the requirement to provide a client secret for the OAuth app. It is implemented in Gitea since #5378 (v1.8.0), however without being able to omit client secret. Since #21316 Gitea supports setting client type at OAuth app registration. As public clients are already forced to use PKCE since #21316, in this PR the client secret check is being skipped if a public client is detected. As Gitea seems to implement PKCE authorization correctly according to the spec, this would allow for PKCE flow without providing a client secret. Also add some docs for it, please check language as I'm not a native English speaker. Closes #17107 Closes #25047
* Fix link to customizing-gitea (#25056)kodermho2023-06-032-2/+2
| | | | The link to customizing-gitea in the label documentation is broken. This PR should adjust the relative path to fix the link
* Add chinese documentations for `cran package registry` (#25012)sillyguodong2023-05-311-0/+93
| | | As title.
* Remove the service worker (#25010)silverwind2023-05-311-1/+0
| | | | | | | | | | | | | It's been disabled by default since 1.17 (https://github.com/go-gitea/gitea/pull/18914), and it never really delivered any benefit except being another cache layer that has its own unsolved invalidation issues. HTTP cache works, we don't need two cache layers at the browser for assets. ## :warning: BREAKING You can remove the config `[ui].USE_SERVICE_WORKER` from your `app.ini` now.
* Fix markdown link to awesome gitea (#25009)John Olheiser2023-05-301-1/+1
| | | | Fixes the markdown link and uses title case like the other translations.
* Followup to pinned Issues (#24945)JakobDev2023-05-301-1/+1
| | | | | | | | | This addressees some things from #24406 that came up after the PR was merged. Mostly from @delvh. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Remove unnecessary content on docs (#24976)Lunny Xiao2023-05-305-18/+6
|
* Unify doc links to use paths relative to doc folder (#24979)HesterG2023-05-2910-23/+21
| | | | | | | | | Changes: 1. Use uniform links types relative to doc folder (start with `doc/`) 2. According to [docusaurus links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is used, the `href` is resolved as URL location, but not file location. So need to use `[text]({{< relref "path" >}})` instead.
* Update from-binary.en-us.md (#24975)epk2023-05-291-1/+1
| | | Fixed link to the creating a systemd service in Ubuntu document.
* Remove meta tags `theme-color` and `default-theme` (#24960)silverwind2023-05-281-1/+0
| | | | | | | | | | | | | | | | As discussed in https://github.com/go-gitea/gitea/pull/24953#issuecomment-1565630156. ## :warning: BREAKING :warning: 1. The `ui.THEME_COLOR_META_TAG` setting has been removed. If you still need to set the `theme-color` meta tag, add it via `$GITEA_CUSTOM/templates/custom/header.tmpl` instead. 2. The non-standard `default-theme` meta-tag added in https://github.com/go-gitea/gitea/pull/13809 has been removed. Third party code that needs to obtain the currently loaded theme should use the `theme-<name>` class on the `<html>` node instead, which reflect the currently active theme.
* simple docs fixes: 'pull request' page (en-us & zh-tw) link path to ↵Jon Keim2023-05-282-2/+2
| | | | | 'issue-pull-request-templates' (#24961) Co-authored-by: silverwind <me@silverwind.io>
* Remove reference to caddy v1 in docs (#24962)techknowlogick2023-05-281-16/+0
| | | caddy v1 is loong eol. v2 should be used.
* Use `[git.config]` for reflog cleaning up (#24958)wxiaoguang2023-05-281-5/+2
| | | | | | | | | | | | | | | | | | | Follow https://github.com/go-gitea/gitea/pull/24860#discussion_r1200589651 Use `[git.config]` for reflog cleaning up, the new options are more flexible. * https://git-scm.com/docs/git-config#Documentation/git-config.txt-corelogAllRefUpdates * https://git-scm.com/docs/git-config#Documentation/git-config.txt-gcreflogExpire ## :warning: BREAKING The section `[git.reflog]` is now obsolete and its keys have been moved to the following replacements: - `[git.reflog].ENABLED` → `[git.config].core.logAllRefUpdates` - `[git.reflog].EXPIRATION` → `[git.config].gc.reflogExpire`
* docs: remove an extraneous whitespace (#24949)谈笑风生间2023-05-261-1/+1
|
* Fix documentation ref (#24934)Lunny Xiao2023-05-266-47/+47
| | | Fix documentation ref
* Add Chinese docs for help, contribution and development (#24925)HesterG2023-05-258-2/+890
|
* Merge two translation contributing documents (#23939)Lunny Xiao2023-05-257-29/+17
| | | | | | | This PR also adjusts the weights. --------- Co-authored-by: delvh <dev.lh@web.de>
* Add the ability to pin Issues (#24406)JakobDev2023-05-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to pin important Issues and Pull Requests. You can also move pinned Issues around to change their Position. Resolves #2175. ## Screenshots ![grafik](https://user-images.githubusercontent.com/15185051/235123207-0aa39869-bb48-45c3-abe2-ba1e836046ec.png) ![grafik](https://user-images.githubusercontent.com/15185051/235123297-152a16ea-a857-451d-9a42-61f2cd54dd75.png) ![grafik](https://user-images.githubusercontent.com/15185051/235640782-cbfe25ec-6254-479a-a3de-133e585d7a2d.png) The Design was mostly copied from the Projects Board. ## Implementation This uses a new `pin_order` Column in the `issue` table. If the value is set to 0, the Issue is not pinned. If it's set to a bigger value, the value is the Position. 1 means it's the first pinned Issue, 2 means it's the second one etc. This is dived into Issues and Pull requests for each Repo. ## TODO - [x] You can currently pin as many Issues as you want. Maybe we should add a Limit, which is configurable. GitHub uses 3, but I prefer 6, as this is better for bigger Projects, but I'm open for suggestions. - [x] Pin and Unpin events need to be added to the Issue history. - [x] Tests - [x] Migration **The feature itself is currently fully working, so tester who may find weird edge cases are very welcome!** --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Allow skipping forks and mirrors from being indexed (#23187)techknowlogick2023-05-251-0/+1
| | | | | | This PR adds two new options to disable repo/code search indexing of both forks and mirrors. Related: #22842
* Add Chinese documentations for Actions (#24902)HesterG2023-05-2512-6/+877
|
* `zh-cn` translation for usage docs (#24897)Zettat1232023-05-2514-6/+988
|
* Add chinese documentations for installation (#24904)sillyguodong2023-05-256-8/+704
|
* Improve RunMode / dev mode (#24886)wxiaoguang2023-05-251-1/+1
| | | | | | | | | | 1. non-dev mode is treated as prod mode, to protect users from accidentally running in dev mode if there is a typo in this value. 2. in dev mode, do not need to really exit if there are template errors, because the template errors could be fixed by developer soon and the templates get reloaded, help: * https://github.com/go-gitea/gitea/issues/24845#issuecomment-1557615382 3. Fine tune the mail template loading message.
* Add chinese documentations for `Packages` (#24914)sillyguodong2023-05-2526-9/+2395
|
* Update Asciidoc markup example with safe defaults (#24920)Mike Rochefort2023-05-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The cheat sheet uses the `asciidoc` markup language to demonstrate how to set up third party markup renderers. The current example has the following issues: - It promotes a legacy tool that does not handle modern AsciiDoc specifications - It does not account for embedded preview renders - It has no safety restrictions By switching to `asciidoctor`, uses are suggested to utilize de facto/standard tooling for AsciiDoc. The `--embedded` parameter will strip out HTML tags that contain the document (such as `<html></html>`) which aren't necessary for the render, and actually end up as text in the document if left in. The `--safe-mode` parameter (of which there are several profiles) imposes [certain policies](https://docs.asciidoctor.org/asciidoctor/latest/safe-modes/) on the files it ingests and what the resulting output looks like. GitHub itself uses the `secure` profile (the highest), which can be a good starting point for those who are uncertain of what to do. By default, if no mode is specified when `asciidoctor` runs it defaults to `unsafe`, i.e. no safety guidelines at all.
* Fix <empty> in administration/config-cheat-sheet.en-us.md (#24905)HesterG2023-05-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | Before <img width="206" alt="Screen Shot 2023-05-24 at 15 54 02" src="https://github.com/go-gitea/gitea/assets/17645053/3493180e-e7a8-466d-b418-641c39d7788c"> <img width="272" alt="Screen Shot 2023-05-24 at 15 50 05" src="https://github.com/go-gitea/gitea/assets/17645053/b1c80313-5b2c-41d8-aad3-4099c912c173"> <img width="264" alt="Screen Shot 2023-05-24 at 15 50 16" src="https://github.com/go-gitea/gitea/assets/17645053/9a4b4223-ce67-40b3-a44e-03219694a37d"> After <img width="295" alt="Screen Shot 2023-05-24 at 15 52 53" src="https://github.com/go-gitea/gitea/assets/17645053/fbc8ef6e-2b9b-44f5-ba4f-6002cf2f19fe"> <img width="334" alt="Screen Shot 2023-05-24 at 15 53 03" src="https://github.com/go-gitea/gitea/assets/17645053/6ebe45bf-b986-4afc-9b5c-d0c0134650c2"> <img width="282" alt="Screen Shot 2023-05-24 at 15 53 13" src="https://github.com/go-gitea/gitea/assets/17645053/90ccc1ae-69f5-4730-8191-5e86ed0f6d49">
* Rename docs packages title from xxx Packages Repository -> xxx Package ↵Lunny Xiao2023-05-2419-38/+38
| | | | | Registry (#24895) As title.
* Make environment-to-ini support loading key value from file (#24832)wxiaoguang2023-05-242-6/+24
| | | | | | | | | | | | | | | Replace #19857 Close #19856 Close #10311 Close #10123 Major changes: 1. Move a lot of code from `environment-to-ini.go` to `config_env.go` to make them testable. 2. Add `__FILE` support 3. Update documents 4. Add tests
* `zh-cn` translation for administration docs (#24881)Zettat1232023-05-2411-0/+1820
| | | | | | | | | | | | | - [x] adding-legal-pages - [x] cmd-embedded - [x] command-line - [x] email-setup - [x] external-renderers - [x] git-lfs-support - [x] logging-config - [x] mail-templates - [x] repo-indexer - [x] search-engines-indexation - [x] signing
* Support changing git config through `app.ini`, use ↵wxiaoguang2023-05-232-6/+29
| | | | | | | | | | | | | | | | | | | | | `diff.algorithm=histogram` by default (#24860) Close #13454 , Close #23255, Close #14697 (and maybe more related issues) Many users have the requirement to customize the git config. This PR introduces an easy way: put the options in Gitea's app.ini `[git.config]`, then the config options will be applied to git config. And it can support more flexible default config values, eg: now `diff.algorithm=histogram` by default. According to: https://stackoverflow.com/a/32367597/4754037 , `histogram diff` is efficient and doesn't like to cause server-side problems. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unnecessary usage prefix from doc titles (#24869)Lunny Xiao2023-05-237-14/+14
| | | As title.
* Fix document and improve comment (#24844)wxiaoguang2023-05-221-1/+1
| | | | | | | | | | * Fix broken doc link: https://github.com/go-gitea/gitea/actions/runs/5041309438/jobs/9040887385 * Improve comments about how font weight works: https://github.com/go-gitea/gitea/pull/24827#pullrequestreview-1435584800 --------- Co-authored-by: silverwind <me@silverwind.io>