aboutsummaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Prefer variables over subprocesses (#26690)Thomas McWork2023-08-231-3/+3
| | | | … because it doesn't require a separate shell, spawning a process which cost unnecessary resources and takes time.
* add mfa doc (#26654)Lunny Xiao2023-08-221-0/+35
| | | | | | | | | | | | | | | copy and modified from #14572 > Whilst debating enforcing MFA within our team, I realised there isn't a lot of context to the side effects of enabling it. Most of us use Git over HTTP and would need to add a token. I plan to add another PR that adds a sentence to the UI about needing to generate a token when enabling MFA if HTTP is to be used. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
* Update minimum password length requirements (#25946)techknowlogick2023-08-211-1/+1
|
* docs: template variables (#26547)lonix12023-08-191-2/+12
| | | | | | Explanation for using gitea's variables in `.tmpl` files. Thanks to @wxiaoguang for advising me on [discord](https://discord.com/channels/322538954119184384/561007778139734027/1141217820441587722).
* Update zh-cn documentation (#26406)CaiCandong2023-08-1411-443/+1513
|
* Rename `Sync2` -> `Sync` (#26479)delvh2023-08-134-4/+4
| | | | | | | | | The xorm `Sync2` has already been deprecated in favor of `Sync`, so let's do the same inside the Gitea codebase. Command used to replace everything: ```sh for i in $(ag Sync2 --files-with-matches); do vim $i -c ':%sno/Sync2/Sync/g' -c ':wq'; done ```
* Add matrix to support (#26382)John Olheiser2023-08-121-0/+2
| | | | | | | | | | | | | This PR adds our matrix space to the support options and alphabetizes the list. I also considered adding our Mastodon, however that isn't as suitable as the other options because it's just whoever has access to the account vs a community chat/forum. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Update index doc (#26455)CaiCandong2023-08-122-464/+40
| | | | | | In the previous feature description, numerous functionalities of Gitea were listed, which appeared redundant and failed to highlight the unique characteristics of Gitea. Therefore, I have rewritten this section based on the description provided on the official Gitea website
* Update upgrade documentation to add a check for deprecated configurations ↵Lunny Xiao2023-08-112-8/+25
| | | | | | | | | | (#26451) fix https://github.com/go-gitea/gitea/issues/25995#issuecomment-1674096710 --------- Co-authored-by: silverwind <me@silverwind.io>
* Pre-register OAuth2 applications for git credential helpers (#26291)Denys Konovalov2023-08-092-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This PR is an extended implementation of #25189 and builds upon the proposal by @hickford in #25653, utilizing some ideas proposed internally by @wxiaoguang. Mainly, this PR consists of a mechanism to pre-register OAuth2 applications on startup, which can be enabled or disabled by modifying the `[oauth2].DEFAULT_APPLICATIONS` parameter in app.ini. The OAuth2 applications registered this way are being marked as "locked" and neither be deleted nor edited over UI to prevent confusing/unexpected behavior. Instead, they're being removed if no longer enabled in config. ![grafik](https://github.com/go-gitea/gitea/assets/47871822/81a78b1c-4b68-40a7-9e99-c272ebb8f62e) The implemented mechanism can also be used to pre-register other OAuth2 applications in the future, if wanted. Co-authored-by: hickford <mirth.hickford@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> --------- Co-authored-by: M Hickford <mirth.hickford@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [docs] Add missing backtick in quickstart.zh-cn.md (#26349)Track32023-08-061-1/+1
| | | | | | Added missing backtick in quickstart.zh-cn.md docs so inline code can render properly. Co-authored-by: Giteabot <teabot@gitea.io>
* Remove backslashed newlines on markdown (#26344)Lunny Xiao2023-08-051-2/+2
| | | Fix https://gitea.com/gitea/gitea-docusaurus/issues/56
* Fix typos and grammer problems for actions documentation (#26328)sillyguodong2023-08-042-16/+19
| | | | follow #26317 fix typos and adjust grammer problems.
* Update documentation for 1.21 actions (#26317)sillyguodong2023-08-042-4/+60
| | | | | As title. Close #26309 Related to #24724, #24806
* Update Gmail example (#26302)Bård Aase2023-08-031-2/+1
| | | | The `IS_TLS_ENABLED` option in the `mailer` section is deprecated. This is specified by setting `PROTOCOL=smtps`
* Clarify the logger's MODE config option (#26267)wxiaoguang2023-08-011-0/+3
| | | | | | | 1. Fix the wrong document (add the missing `MODE=`) 2. Add a more friendly log message to tell users to add `MODE=` in their config Co-authored-by: Giteabot <teabot@gitea.io>
* Update Arch linux URL from community to extra (#26273)minijaws2023-08-011-1/+1
| | | | Arch linux package link has changed from the community repo to the extra repo. The link has been updated.
* Mention `devtest` in frontend contributing guidelines (#26249)Denys Konovalov2023-07-311-0/+4
| | | | | Our `devtest` page contains some good UI examples which should be taken as example when working on Gitea UI. Mention it in our frontend contributing guidelines to for new contributors to know about it.
* Add 'Show on a map' button to Location in profile, fix layout (#26214)Panagiotis "Ivory" Vasilopoulos2023-07-311-0/+1
| | | | | | | | | | | Not too important, but I think that it'd be a pretty neat touch. Also fixes some layout bugs introduced by a previous PR. --------- Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: Caesar Schinas <caesar@caesarschinas.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Calculate MAX_WORKERS default value by CPU number (#26177)wxiaoguang2023-07-271-1/+1
| | | | | | To avoid consuming user's 100% CPU, limit the default value of MAX_WORKERS Fix #26063 (the CPU 100% problem mentioned in it)
* Re-add static images to docs (#26167)John Olheiser2023-07-264-0/+76
| | | | | | | https://github.com/go-gitea/gitea/pull/26051 I accidentally rebased locally without my re-addition for these files, so they were missed in the merge, but only for `main`. Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update email-setup.en-us.md (#26068)Felix Victor2023-07-266-15/+10
| | | | | | | | The setting `MAILER_TYPE` is deprecated. According to the config cheat sheet, it should be `PROTOCOL`. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update Chinese documents (#26139)Upstream80222023-07-263-39/+113
| | | Update part of the documents, translate English to Chinese.
* Docusaurus-ify (#26051)John Olheiser2023-07-26279-2143/+787
| | | | | | | | | | | | | | This PR cleans up the docs in a way to make them simpler to ingest by our [docs repo](https://gitea.com/gitea/gitea-docusaurus). 1. It includes all of the sed invocations our ingestion did, removing the need to do it at build time. 2. It replaces the shortcode variable replacement method with `@variable@` style, simply for easier sed invocations when required. 3. It removes unused files and moves the docs up a level as cleanup. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove "misc" scope check from public API endpoints (#26134)wxiaoguang2023-07-261-30/+30
| | | Fix #26035
* added ssh mirror workaround description (#26096)thigg2023-07-251-0/+13
| | | | | | related #1635 #18159 This will probably be obsolete at some point, but it should not break anything and it may help some users
* Improve "gitea doctor" sub-command and fix "help" commands (#26072)wxiaoguang2023-07-252-49/+26
| | | | | | | | | | | | | | | | | | | | | | | Replace #21790 And close #25965 by the way (it needs a separate fix for 1.20) Major changes: 1. Move "gitea convert" to "gitea doctor conver". The old "gitea doctor" still works as a hidden sub-command (to avoid breaking) 2. Do not write "doctor.log" by default, it's not useful in most cases and causes bugs like 25965 3. Improve documents 4. Fix the "help" commands. Before, the "./gitea doctor" can't show the sub-command help correctly (regression of the last cli/v2 refactoring) After this PR: ``` ./gitea help # show all sub-commands for the app ./gitea doctor # show the sub-commands for the "doctor" ./gitea doctor help # show the sub-commands for the "doctor", as above ```
* doc sync authentication.md to zh-cn (#26117)caicandong2023-07-251-1/+257
| | | as title
* doc guide the user to create the appropriate level runner (#26091)caicandong2023-07-245-9/+17
| | | close #26045
* Update secrets.en-us.md (#26057)JonRB2023-07-221-1/+1
| | | | Present documentation does not capture that secrets are only visible if ACTIONS are enabled for a repository. This PR adds a short note
* Serve pre-defined files in "public", add "security.txt", add CORS header for ↵wxiaoguang2023-07-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ".well-known" (#25974) Replace #25892 Close #21942 Close #25464 Major changes: 1. Serve "robots.txt" and ".well-known/security.txt" in the "public" custom path * All files in "public/.well-known" can be served, just like "public/assets" 3. Add a test for ".well-known/security.txt" 4. Simplify the "FileHandlerFunc" logic, now the paths are consistent so the code can be simpler 5. Add CORS header for ".well-known" endpoints 6. Add logs to tell users they should move some of their legacy custom public files ``` 2023/07/19 13:00:37 cmd/web.go:178:serveInstalled() [E] Found legacy public asset "img" in CustomPath. Please move it to /work/gitea/custom/public/assets/img 2023/07/19 13:00:37 cmd/web.go:182:serveInstalled() [E] Found legacy public asset "robots.txt" in CustomPath. Please move it to /work/gitea/custom/public/robots.txt ``` This PR is not breaking. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor to use urfave/cli/v2 (#25959)wxiaoguang2023-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace #10912 And there are many new tests to cover the CLI behavior There were some concerns about the "option order in hook scripts" (https://github.com/go-gitea/gitea/pull/10912#issuecomment-1137543314), it's not a problem now. Because the hook script uses `/gitea hook --config=/app.ini pre-receive` format. The "config" is a global option, it can appear anywhere. ---- ## ⚠️ BREAKING ⚠️ This PR does it best to avoid breaking anything. The major changes are: * `gitea` itself won't accept web's options: `--install-port` / `--pid` / `--port` / `--quiet` / `--verbose` .... They are `web` sub-command's options. * Use `./gitea web --pid ....` instead * `./gitea` can still run the `web` sub-command as shorthand, with default options * The sub-command's options must follow the sub-command * Before: `./gitea --sub-opt subcmd` might equal to `./gitea subcmd --sub-opt` (well, might not ...) * After: only `./gitea subcmd --sub-opt` could be used * The global options like `--config` are not affected
* Update README.md to fix the broken link of Hugo (#26008)Pavel2023-07-211-1/+1
| | | Fix gohugo installiation link
* RPM Registry: Show zypper commands for SUSE based distros as well (#25981)Dominik Heidler2023-07-204-5/+5
| | | | | | | | | After RPM is supported with https://github.com/go-gitea/gitea/pull/23380 let's show the user how to add the repo and install the RPM via all common package managers. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Correctly refer to dev tags as nightly in the docker docs (#26004)John Olheiser2023-07-202-2/+2
| | | | | As title, `dev` tags are no longer used since we switched to `nightly` Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update path related documents (#25417)wxiaoguang2023-07-196-33/+18
| | | | | | | | | | | | Update WorkPath/WORK_PATH related documents, remove out-dated information. Remove "StaticRootPath" on the admin config display page, because few end user really need it, it only causes misconfiguration. ![image](https://github.com/go-gitea/gitea/assets/2114189/8095afa4-da76-436b-9e89-2a92c229c01d) Co-authored-by: Giteabot <teabot@gitea.io>
* Move public asset files to the proper directory (#25907)wxiaoguang2023-07-186-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move `public/*` to `public/assets/*` Some old PRs (like #15219) introduced inconsistent directory system. For example: why the local directory "public" is accessed by `http://site/assets`? How to serve the ".well-known" files properly in the public directory? For convention rules, the "public" directory is widely used for the website's root directory. It shouldn't be an exception for Gitea. So, this PR makes the things consistent: * `http://site/assets/foo` means `{CustomPath}/public/assets/foo`. * `{CustomPath}/public/.well-known` and `{CustomPath}/public/robots.txt` can be used in the future. This PR is also a prerequisite for a clear solution for: * #21942 * #25892 * discourse.gitea.io: [.well-known path serving custom files behind proxy?](https://discourse.gitea.io/t/well-known-path-serving-custom-files-behind-proxy/5445/1) This PR is breaking for users who have custom "public" files (CSS/JS). After getting approvals, I will update the documents. ---- ## ⚠️ BREAKING ⚠️ If you have files in your "custom/public/" folder, please move them to "custom/public/assets/". --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Update blog links (#25843)HesterG2023-07-126-6/+6
| | | | | | | | As title. Permalinks for lastest version of blog has changed, update the blog links. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Make "install page" respect environment config (#25648)wxiaoguang2023-07-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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. ![image](https://github.com/go-gitea/gitea/assets/2114189/12778ee4-3fb5-4664-a73a-41ebbd77cd5b)
* docs: rootless docker ssh's default port is 2222 (#25771)leavesster2023-07-081-1/+1
|
* Following-up improvments for various PRs (#25620)wxiaoguang2023-07-011-1/+3
| | | | | | | | For: * #22743 * #25408 * #25412 * #25588
* Restrict `[actions].DEFAULT_ACTIONS_URL` to only `github` or `self` (#25581)Jason Song2023-06-301-28/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add documentation about supported workflow trigger events (#25582)Zettat1232023-06-292-0/+40
| | | | | 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.
* Document creating an API key from the CLI (#25504) (#25510)techknowlogick2023-06-261-0/+8
| | | | | | | | Frontport of #25504 Credit to @lonix1 Co-authored-by: lonix1 <40320097+lonix1@users.noreply.github.com> Co-authored-by: delvh <dev.lh@web.de>
* Fix default value for LocalURL (#25426)Lunny Xiao2023-06-241-2/+5
| | | Fix #23769
* Refactor indexer (#25174)Jason Song2023-06-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove "CHARSET" config option for MySQL, always use "utf8mb4" (#25413)wxiaoguang2023-06-212-3/+0
| | | | | | | | | | | | | In modern days, there is no reason to make users set "charset" anymore. Close #25378 ## :warning: BREAKING The key `[database].CHARSET` was removed completely as every newer (>10years) MySQL database supports `utf8mb4` already. There is a (deliberately) undocumented new fallback option if anyone still needs to use it, but we don't recommend using it as it simply causes problems.
* Use the new download domain replace the old (#25405)Lunny Xiao2023-06-2110-17/+17
| | | As title.
* Substitute variables in path names of template repos too (#25294)Kyle D2023-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | ### Summary Extend the template variable substitution to replace file paths. This can be helpful for setting up log files & directories that should match the repository name. ### PR Changes - Move files matching glob pattern when setting up repos from template - For security, added ~escaping~ sanitization for cross-platform support and to prevent directory traversal (thanks @silverwind for the reference) - Added unit testing for escaping function - Fixed the integration tests for repo template generation by passing the repo_template_id - Updated the integration testfiles to add some variable substitution & assert the outputs I had to fix the existing repo template integration test and extend it to add a check for variable substitutions. Example: ![image](https://github.com/go-gitea/gitea/assets/12700993/621feb09-0ef3-460e-afa8-da74cd84fa4e)
* Add Exoscale to installation on cloud provider docs (#25342)Philip Miglinci2023-06-181-0/+10
| | | | | | | | | | 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>