summaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Map OIDC groups to Orgs/Teams (#21441)KN4CK3R2023-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #19555 Test-Instructions: https://github.com/go-gitea/gitea/pull/21441#issuecomment-1419438000 This PR implements the mapping of user groups provided by OIDC providers to orgs teams in Gitea. The main part is a refactoring of the existing LDAP code to make it usable from different providers. Refactorings: - Moved the router auth code from module to service because of import cycles - Changed some model methods to take a `Context` parameter - Moved the mapping code from LDAP to a common location I've tested it with Keycloak but other providers should work too. The JSON mapping format is the same as for LDAP. ![grafik](https://user-images.githubusercontent.com/1666336/195634392-3fc540fc-b229-4649-99ac-91ae8e19df2d.png) --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Grammar fix (#22790)Peyton Duncan2023-02-061-1/+1
| | | Noticed a minor grammatical error.
* Add repo adoption to FAQ (#22778)John Olheiser2023-02-061-0/+11
| | | | This should be a simple set of steps to achieve repo adoption.
* Update gogs upgrade information (#22777)John Olheiser2023-02-061-2/+4
| | | | | | | | It seems that migrating from Gogs `0.12.x` and above may require more work as time goes on and the projects continue to diverge. This PR updates the docs to make it more clear. Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add CLI option tenant ID for oauth2 source (#22769)Adi2023-02-051-0/+2
| | | Fixes #22713
* Add Chef package registry (#22554)KN4CK3R2023-02-063-0/+98
| | | | | | | | | | | | | This PR implements a [Chef registry](https://chef.io/) to manage cookbooks. This package type was a bit complicated because Chef uses RSA signed requests as authentication with the registry. ![grafik](https://user-images.githubusercontent.com/1666336/213747995-46819fd8-c3d6-45a2-afd4-a4c3c8505a4a.png) ![grafik](https://user-images.githubusercontent.com/1666336/213748145-d01c9e81-d4dd-41e3-a3cc-8241862c3166.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add Cargo package registry (#21888)KN4CK3R2023-02-053-0/+111
| | | | | | | | | | | | | | | | | | This PR implements a [Cargo registry](https://doc.rust-lang.org/cargo/) to manage Rust packages. This package type was a little bit more complicated because Cargo needs an additional Git repository to store its package index. Screenshots: ![grafik](https://user-images.githubusercontent.com/1666336/203102004-08d812ac-c066-4969-9bda-2fed818554eb.png) ![grafik](https://user-images.githubusercontent.com/1666336/203102141-d9970f14-dca6-4174-b17a-50ba1bd79087.png) ![grafik](https://user-images.githubusercontent.com/1666336/203102244-dc05743b-78b6-4d97-998e-ef76341a978f.png) --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add new captcha: cloudflare turnstile (#22369)ByLCY2023-02-052-1/+14
| | | | | | | | | Added a new captcha(cloudflare turnstile) and its corresponding document. Cloudflare turnstile official instructions are here: https://developers.cloudflare.com/turnstile Signed-off-by: ByLCY <bylcy@bylcy.dev> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Jason Song <i@wolfogre.com>
* Remove ONLY_SHOW_RELEVANT_REPOS setting (#21962)delvh2023-02-041-2/+0
| | | | | | | | | | | | Every user can already disable the filter manually, so the explicit setting is absolutely useless and only complicates the logic. Previously, there was also unexpected behavior when multiple query parameters were present. --------- Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Repositories: by default disable all units except code and pulls on forks ↵techknowlogick2023-02-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | (#22541) Most of the time forks are used for contributing code only, so not having issues, projects, release and packages is a better default for such cases. They can still be enabled in the settings. A new option `DEFAULT_FORK_REPO_UNITS` is added to configure the default units on forks. Also add missing `repo.packages` unit to documentation. code by: @brechtvl ## :warning: BREAKING :warning: When forking a repository, the fork will now have issues, projects, releases, packages and wiki disabled. These can be enabled in the repository settings afterwards. To change back to the previous default behavior, configure `DEFAULT_FORK_REPO_UNITS` to be the same value as `DEFAULT_REPO_UNITS`. Co-authored-by: Brecht Van Lommel <brecht@blender.org>
* update to build with go1.20 (#22732)techknowlogick2023-02-031-2/+2
| | | | | | | as title --------- Co-authored-by: Lauris BH <lauris@nix.lv>
* Add missed reverse proxy authentication documentation (#22250)Lunny Xiao2023-02-032-1/+37
| | | | Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Jason Song <i@wolfogre.com>
* Add Conda package registry (#22262)KN4CK3R2023-02-013-0/+87
| | | This PR adds a [Conda](https://conda.io/) package registry.
* Add user secrets (#22191)KN4CK3R2023-02-011-8/+8
| | | | | | | | | | | | Fixes #22183 Replaces #22187 This PR adds secrets for users. I refactored the files for organizations and repos to use the same logic and templates. I splitted the secrets from deploy keys again and reverted the fix from #22187. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix typo in command-line.en-us.md (#22681)Ivan Maximov2023-01-311-1/+1
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix typo in linked-references.en-us.md (#22682)Ivan Maximov2023-01-311-1/+1
|
* Fix typo in guidelines-backend.en-us.md (#22690)Ivan Maximov2023-01-311-1/+1
|
* Fix typo in storage.en-us.md (#22694)Ivan Maximov2023-01-311-1/+1
|
* Implement actions (#21937)Jason Song2023-01-314-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Use `--index-url` in PyPi description (#22620)KN4CK3R2023-01-271-0/+2
| | | | | Fixes #22616 Co-authored-by: zeripath <art27@cantab.net>
* gitlab supports ssh key signing (#22564)techknowlogick2023-01-221-1/+1
|
* Support scoped access tokens (#20908)Chongyi Zheng2023-01-171-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds the support for scopes of access tokens, mimicking the design of GitHub OAuth scopes. The changes of the core logic are in `models/auth` that `AccessToken` struct will have a `Scope` field. The normalized (no duplication of scope), comma-separated scope string will be stored in `access_token` table in the database. In `services/auth`, the scope will be stored in context, which will be used by `reqToken` middleware in API calls. Only OAuth2 tokens will have granular token scopes, while others like BasicAuth will default to scope `all`. A large amount of work happens in `routers/api/v1/api.go` and the corresponding `tests/integration` tests, that is adding necessary scopes to each of the API calls as they fit. - [x] Add `Scope` field to `AccessToken` - [x] Add access control to all API endpoints - [x] Update frontend & backend for when creating tokens - [x] Add a database migration for `scope` column (enable 'all' access to past tokens) I'm aiming to complete it before Gitea 1.19 release. Fixes #4300
* docs: add swagger.json file location to FAQ (#22489)John Olheiser2023-01-171-0/+2
| | | | | | This just adds a mention on how to get the `swagger.json` for an instance. Signed-off-by: jolheiser <john.olheiser@gmail.com>
* docs: bump Gitea version (#22490)John Olheiser2023-01-171-1/+1
| | | | | Forgot to do this with the frontport Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update overview.en-us.md (#22463)Bradley D. Thornton2023-01-161-2/+2
| | | Fix grammar
* Add cron method to gc LFS MetaObjects (#22385)zeripath2023-01-161-0/+10
| | | | | | | | | | | | This PR adds a task to the cron service to allow garbage collection of LFS meta objects. As repositories may have a large number of LFSMetaObjects, an updated column is added to this table and it is used to perform a generational GC to attempt to reduce the amount of work. (There may need to be a bit more work here but this is probably enough for the moment.) Fix #7045 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add support for incoming emails (#22056)KN4CK3R2023-01-145-3/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #13585 fixes #9067 fixes #2386 ref #6226 ref #6219 fixes #745 This PR adds support to process incoming emails to perform actions. Currently I added handling of replies and unsubscribing from issues/pulls. In contrast to #13585 the IMAP IDLE command is used instead of polling which results (in my opinion 😉) in cleaner code. Procedure: - When sending an issue/pull reply email, a token is generated which is present in the Reply-To and References header. - IMAP IDLE waits until a new email arrives - The token tells which action should be performed A possible signature and/or reply gets stripped from the content. I added a new service to the drone pipeline to test the receiving of incoming mails. If we keep this in, we may test our outgoing emails too in future. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix stylesheet HTML snippet for external renderers documentation (#22435)Sascha Bannier2023-01-131-1/+1
| | | | | | | | | The documentation is missing the rel attribute. Neither Firefox nor Chrome did use the linked file as CSS if rel="stylesheet" is not set. The problem is described in issue #22434. Co-authored-by: silverwind <me@silverwind.io>
* Fix typo (#22396)delvh2023-01-101-1/+1
| | | DEFAUlT -> DEFAULT
* Update index.de-de.md (#22363)ahab2023-01-091-5/+5
| | | | | | | Some minor changes related to the language. Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add deprecated warning for DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR (#22318)Kyle D2023-01-031-2/+2
|
* Update Gmail mailer configuration (#22291)James Liu2023-01-021-3/+6
| | | | | | | | | | | | | This PR updates the `[mailer]` configuration snippet for Gmail: - The `HELO_HOSTNAME` isn't required. - The `USER` must not include the @gmail domain. - `HOST` needs to be supplied, and the SMTP port number needs to be appended to the URL. I also added a note about the requirement to use App passwords instead of your Google account password directly. Co-authored-by: delvh <dev.lh@web.de>
* Changelog v1.18.0 (#22215) (#22269)65432022-12-311-2/+2
| | | | | frontport #22215 & bump numbers in docs
* Add Gentoo to the from package providers (#22284)JonRB2022-12-301-0/+8
| | | Signed-off-by: Jonathan Roadley-Battin <jon.roadleybattin@gmail.com>
* Add option to prohibit fork if user reached maximum limit of repositories ↵Xinyu Zhou2022-12-271-0/+1
| | | | | | | | | | | | | | | | | | (#21848) If user has reached the maximum limit of repositories: - Before - disallow create - allow fork without limit - This patch: - disallow create - disallow fork - Add option `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT` (Default **true**) : enable this allow user fork repositories without maximum number limit fixed https://github.com/go-gitea/gitea/issues/21847 Signed-off-by: Xinyu Zhou <i@sourcehut.net>
* Add the 'ui.user' section to the cheat sheet (#22249)Christian Ullrich2022-12-271-0/+4
| | | | | | The `ui.user` ini section with its single setting is not yet mentioned in the config cheat sheet. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix typo of Asia/Shanghai (#22242)Jason Song2022-12-261-1/+1
| | | As the title.
* update docs latest to 1.17.4techknowlogick2022-12-221-1/+1
|
* Upgrade hugo to 0.82 (#22209)silverwind2022-12-221-1/+1
| | | | | | | | | See https://github.com/go-gitea/gitea/pull/22206#issuecomment-1362523796. Apparently hugo 0.81.0 is a broken release in regards to checksums. https://github.com/gohugoio/hugo/releases/tag/v0.82.0 Co-authored-by: Lauris BH <lauris@nix.lv>
* Run hugo via `go run` and lock its version (#22206)silverwind2022-12-212-5/+6
| | | | | | | | | | - Don't rely on obscure docker images like `plugins/hugo` - Lock down `hugo` to same version the image had used - Remove unnecessary verbosity in `trans-copy` - Rename `trans-copy` to `trans-copy.sh` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john+github@jolheiser.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix misc whitespace issues in install docs (#22189)Dan Church2022-12-203-48/+48
| | | | | | | | | | | | I ran into issues when copy-pasting the docker-compose.yml contents from https://docs.gitea.io/en-us/install-with-docker/ - specifically the part about adding PostgreSQL to the YAML file; I tried manually adding the diffs by removing the `+` at the beginning of lines, and the resulting YAML was unparsable. This forces the indentation to be consistent across all places where YAML is used. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Secrets storage with SecretKey encrypted (#22142)Jason Song2022-12-201-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fork of #14483, but [gave up MasterKey](https://github.com/go-gitea/gitea/pull/14483#issuecomment-1350728557), and fixed some problems. Close #12065. Needed by #13539. Featrues: - Secrets for repo and org, not user yet. - Use SecretKey to encrypte/encrypt secrets. - Trim spaces of secret value. - Add a new locale ini block, to make it easy to support secrets for user. Snapshots: Repo level secrets: ![image](https://user-images.githubusercontent.com/9418365/207823319-b8a4903f-38ca-4af7-9d05-336a5af906f3.png) Rrg level secrets ![image](https://user-images.githubusercontent.com/9418365/207823371-8bd02e93-1928-40d1-8c76-f48b255ace36.png) Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Add setting to disable the git apply step in test patch (#22130)zeripath2022-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix markdown typo of an extra backtick in docs (#22123)Yakov57762022-12-131-1/+1
| | | Fixes a visual bug in docs which is caused by a typo of an extra backtick.
* Fix wrong default value for update checker on app.example.ini (#22084)Lunny Xiao2022-12-111-1/+1
|
* Support disabling database auto migration (#22053)Jason Song2022-12-071-0/+1
| | | | | Gitea will migrate the database model version automatically, but it should be able to be disabled and keep Gitea shutdown if the version is not matched.
* docs: add `Edit this page` (#21981)Xinyu Zhou2022-12-031-0/+2
| | | | | | | | | | | | | Update theme to support `Edit this page`: https://gitea.com/gitea/theme/pulls/116 Screenshot: ![Edit this page](https://user-images.githubusercontent.com/76462613/205257167-d6039d0c-c913-4ebc-98c1-834aece4b5e9.png) Signed-off-by: Xinyu Zhou <i@sourcehut.net> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add pnpm to packages/overview (#22008)xtexChooser2022-12-021-1/+1
| | | | | | [`pnpm`](https://pnpm.io/) is a "fast, disk space efficient" node package manager. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix typos (#21979)luzpaz2022-11-291-14/+14
| | | Found via codespell
* Correct the fallbacks for mailer configuration (#21945)zeripath2022-11-271-1/+1
| | | | | | | | | | | | | | | Unfortunately the fallback configuration code for [mailer] that were added in #18982 are incorrect. When you read a value from an ini section that key is added. This leads to a failure of the fallback mechanism. Further there is also a spelling mistake in the startTLS configuration. This PR restructures the mailer code to first map the deprecated settings on to the new ones - and then use ini.MapTo to map those on to the struct with additional validation as necessary. Ref #21744 Signed-off-by: Andrew Thornton <art27@cantab.net>