Commit Graph
158 Commits
Author SHA1 Message Date
Brecht Van Lommelanddelvh 8355b7dcbd Add basic documentation for labels, including scoped labels (#23304)
Part of #22974

---------

Co-authored-by: delvh <[email protected]>
2023-03-05 20:35:12 +08:00
Joakim Pettersenandtechknowlogick 771cba0e75 Improve reverse proxies documentation (#23068)
Add "Traefik with a sub-path" documentation

closes #23047

Co-authored-by: techknowlogick <[email protected]>
2023-02-23 15:34:09 +08:00
zeripath 8cb1630444 Add command to bulk set must-change-password (#22823)
As part of administration sometimes it is appropriate to forcibly tell
users to update their passwords.

This PR creates a new command `gitea admin user must-change-password`
which will set the `MustChangePassword` flag on the provided users.

Signed-off-by: Andrew Thornton <[email protected]>
2023-02-14 16:12:19 -06:00
KN4CK3RandLunny Xiao 8d2b2f30c0 Map OIDC groups to Orgs/Teams (#21441)
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 <[email protected]>
2023-02-08 14:44:42 +08:00
Adi 0b35f8a443 Add CLI option tenant ID for oauth2 source (#22769)
Fixes #22713
2023-02-05 22:12:13 -06:00
Ivan MaximovandLunny Xiao d33a12dca6 Fix typo in command-line.en-us.md (#22681)
Co-authored-by: Lunny Xiao <[email protected]>
2023-01-31 21:43:39 +00:00
Ivan Maximov 8eded26cd0 Fix typo in linked-references.en-us.md (#22682) 2023-01-31 21:43:27 +00:00
61f2cce080 Add support for incoming emails (#22056)
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 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2023-01-14 23:57:10 +08:00
James Liuanddelvh f7e2d69af3 Update Gmail mailer configuration (#22291)
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 <[email protected]>
2023-01-02 10:52:36 +08:00
Xinyu Zhou 4756534dba Refactor docs (#21627)
This patch:
- Rename some files( `.md` to `.en-us.md`), fix missed translation copy
- Update link which shoud be refer to `../hacking-on-gitea/` instead of
`../make/` (outdated)
- Update `_redirects`:
  -  redirect `/{zh-cn|fr-fr}/make/` to `../hacking-on-gitea/`
  - redirect `/zh-cn/third-party-tools/` to `/zh-cn/integrations/`
- Delete duplicated/outdated files.
- Update menu `weight` of developers.zh-cn.md

Signed-off-by: Xinyu Zhou <[email protected]>
2022-10-31 23:16:19 +00:00
melkor0 5121f9bce8 Update "email usage" page to current ver. (1.18) (#21649)
In version 1.18 the naming scheme for smtp has been changed, HOST has
been split in SMTP_ADDR and SMTP_PORT
(https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer).
2022-10-31 22:02:37 +00:00
rock2dustandLunny Xiao c6d1ae10e1 Update reverse-proxies.zh-cn.md (#21484)
add proxy header to nginx config example
```
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
```
Signed-off-by: rock2dust <[email protected]>

Signed-off-by: rock2dust <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2022-10-17 17:30:30 -04:00
Jason Song 453b7e0edb Fix typo of issue template name (#21117)
Should be

- .gitea/issue_template.md
- .gitea/issue_template.yaml
- .gitea/issue_template.~~md~~yml

Related to #20987, #21030.
2022-09-09 11:22:33 +08:00
yaandLunny Xiao 9a5477af22 Update docs issue-pull-request-templates.zh-cn.md (#21030)
Follow #20987, update docs issue-pull-request-templates.zh-cn.md

<!--

Please check the following:

1. Make sure you are targeting the `main` branch, pull requests on
release branches are only allowed for bug fixes.
2. Read contributing guidelines:
https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md
3. Describe what your pull request does and which issue you're targeting
(if any)

-->

Co-authored-by: Lunny Xiao <[email protected]>
2022-09-07 14:40:08 -04:00
d18035c87d Added docs for agit-setup (#21027)
This PR Adds Documentation for the new Agit feature. Agit allows creating PR directly while pushing code.

Close #21018

Co-authored-by: CypherpunkSamurai <[email protected]>
Co-authored-by: delvh <[email protected]>
Co-authored-by: a1012112796 <[email protected]>
2022-09-03 19:52:19 +02:00
Jason Songandwxiaoguang 3bf4e455d6 Support Issue forms and PR forms (#20987)
* feat: extend issue template for yaml

* feat: support yaml template

* feat: render form to markdown

* feat: support yaml template for pr

* chore: rename to Fields

* feat: template unmarshal

* feat: split template

* feat: render to markdown

* feat: use full name as template file name

* chore: remove useless file

* feat: use dropdown of fomantic ui

* feat: update input style

* docs: more comments

* fix: render text without render

* chore: fix lint error

* fix: support use description as about in markdown

* fix: add field class in form

* chore: generate swagger

* feat: validate template

* feat: support is_nummber and regex

* test: fix broken unit tests

* fix: ignore empty body of md template

* fix: make multiple easymde editors work in one page

* feat: better UI

* fix: js error in pr form

* chore: generate swagger

* feat: support regex validation

* chore: generate swagger

* fix: refresh each markdown editor

* chore: give up required validation

* fix: correct issue template candidates

* fix: correct checkboxes style

* chore: ignore .hugo_build.lock in docs

* docs: separate out a new doc for merge templates

* docs: introduce syntax of yaml template

* feat: show a alert for invalid templates

* test: add case for a valid template

* fix: correct attributes of required checkbox

* fix: add class not-under-easymde for dropzone

* fix: use more back-quotes

* chore: remove translation in zh-CN

* fix EasyMDE statusbar margin

* fix: remove repeated blocks

* fix: reuse regex for quotes

Co-authored-by: wxiaoguang <[email protected]>
2022-09-02 15:58:49 +08:00
JonRB 8d04a8bf00 Fix typo (#20993) 2022-08-29 17:20:20 +02:00
Enrico d479a334c4 Fix typo in backup documentation (pgdump->pg_dump) (#20913)
This PR fixes a small typo in the backup documentation: `pgdump` command is wrong, the correct name for the backup software in PostgreSQL is `pg_dump`
2022-08-22 19:39:59 +01:00
PEN²andwxiaoguang 1b6717f65f docs: zh-cn translations for fail2ban setup (#20588)
Co-authored-by: wxiaoguang <[email protected]>
2022-08-01 17:36:50 +02:00
tryfail 2aed6e3594 Fix typos in backup documentation (#20567)
Fixed multiple typos "/user/local/bin" to the proper path "/usr/local/bin"
2022-08-01 13:16:38 +08:00
silverwind fe1726a9e5 Add markdownlint (#20512)
Add `markdownlint` linter and fix issues. Config is based on the one
from electron's repo with a few rules relaxed.
2022-07-28 09:22:47 +08:00
Sandroand6543 a5af778401 Fix alias traversal (#20076)
see https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md

Co-authored-by: 6543 <[email protected]>
2022-06-22 16:15:49 +08:00
08e72ba147 Update permissions.en-us.md (#20075)
* Update permissions.en-us.md

A few grammar tweaks to make docs a bit more clear.

* Apply suggestions from code review

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/usage/permissions.en-us.md

Co-authored-by: 6543 <[email protected]>
Co-authored-by: delvh <[email protected]>
2022-06-21 20:53:53 -04:00
s-hamann 37a9dd89ad docs: Mention file extension for issue_template directory (#20057) 2022-06-21 16:08:31 +02:00
singuliereanddelvh dcdb2d126f docs: recommendations to ensure backup consistency and reliability (#19845)
* docs: recommendations to ensure backup consistency and reliability

* s/stooping/stopping/

* Update docs/content/doc/usage/backup-and-restore.en-us.md

Co-authored-by: delvh <[email protected]>

Co-authored-by: delvh <[email protected]>
2022-05-31 14:42:32 -04:00
Vladimir Yakovlev 828d26dc5b Fix duplicate paragraph in documentation (#19820) 2022-05-27 15:40:00 -04:00
wxiaoguang 095601b249 Update document to use FHS /usr/local/bin/gitea instead of /app/... for Docker (#19794)
* Update document to use FHS `/usr/local/bin/gitea` instead of `/app/...` in Docker

* Update docs/content/doc/installation/with-docker.zh-cn.md
2022-05-24 14:57:15 +08:00
Lunny Xiaoandzeripath f19859cbcf Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md (#18177)
* Allow custom default merge message with .gitea/MERGE_MESSAGE_<merge_style>_TEMPLATE.md

* Some improvements

* Follow some advices

* Fix bug

* Fix bug

* Fix lint

* Fix close comment

* Fix test

* Fix and docs

* Improve codes

* Update docs and remove unnecessary variables

* return error for GetDefaultMergeMessage

* Fix test

* improve code

* ignore unknow unit type

* return error for GetDefaultMergeMessage

* Update services/pull/merge.go

* Some improvements

* Follow some advices

* Fix bug

* Fix lint

* Improve codes

* Update docs and remove unnecessary variables

* return error for GetDefaultMergeMessage

* improve code

* Handle deleted HeadRepo in GetDefaultMergeMessage

Signed-off-by: Andrew Thornton <[email protected]>

* Fix test

* Fix test

Co-authored-by: zeripath <[email protected]>
2022-05-08 20:32:45 +08:00
3e0ffb8efd Allow package dump skipping (#19506)
* Added addReader to support verbose.

* Allow skipping packages.

* Updated docs.

* Update cmd/dump.go

Co-authored-by: wxiaoguang <[email protected]>

Co-authored-by: 6543 <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
2022-04-26 16:30:51 -04:00
Campbell He 2b89de2c44 doc: add brief intro on using traefik as reverse-proxy (#19432) 2022-04-20 16:08:23 +02:00
zeripath cf18c2ff8a Add Goroutine stack inspector to admin/monitor (#19207)
Continues on from #19202.

Following the addition of pprof labels we can now more easily understand the relationship between a goroutine and the requests that spawn them. 

This PR takes advantage of the labels and adds a few others, then provides a mechanism for the monitoring page to query the pprof goroutine profile.

The binary profile that results from this profile is immediately piped in to the google library for parsing this and then stack traces are formed for the goroutines.

If the goroutine is within a context or has been created from a goroutine within a process context it will acquire the process description labels for that process. 

The goroutines are mapped with there associate pids and any that do not have an associated pid are placed in a group at the bottom as unbound.

In this way we should be able to more easily examine goroutines that have been stuck.

A manager command `gitea manager processes` is also provided that can export the processes (with or without stacktraces) to the command line.

Signed-off-by: Andrew Thornton <[email protected]>
2022-03-31 19:01:43 +02:00
Robin 1ef119e92b [docs] Enhance container selection in docker dump (#14292)
* Enhance container selection in docker dump

The problem with the previous query was, that it sometimes selected multiple containers, which make the command file with a hard to understand message. Now, use '^...$' to make sure a regex full match.
2022-03-22 13:50:31 +08:00
zeripath 2778b8643a Add warning to set SENDMAIL_ARGS to -- (#19102)
Even with #17688 email addresses that contain an initial `-` may still be present in the db and it may in future still be possible to imagine a situation whereby initial `-` are repermitted.

This PR simply updates the documentation to warn users to set their SENDMAIL_ARGS with a terminal `--` to prevent this possibility email addresses being interpreted as options.

Signed-off-by: Andrew Thornton <[email protected]>
2022-03-18 15:19:02 +01:00
Fredrik Ekre 80368dbe1e Fixed log path in fail2ban documentation (#19103)
This updates the log path in the [gitea-docker] jail configuration
to match the path in the [gitea] jail, which was updated in #13726.
2022-03-16 12:39:13 -04:00
b33a1dc943 adds restore docs for docker based instances (#18844)
* adds docke restore section

* fix typo

* Update docs/content/doc/usage/backup-and-restore.en-us.md

Co-authored-by: Gusted <[email protected]>

* fix container id placeholder

* adds restore help for docker-rootless

* restore yml autoformater quotes

Co-authored-by: Marco Blessing <[email protected]>
Co-authored-by: Gusted <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2022-03-02 11:20:00 -05:00
JonRBandLunny Xiao cec800c2f9 Update nginx reverse proxy docs (#18922)
Add additional config lines for the set_header to forward additional information (eg the IP)

Co-authored-by: Lunny Xiao <[email protected]>
2022-02-26 19:32:09 +01:00
Cristian Le d023f953ca Support custom ACME provider (#18340)
* Added ACMECAURL option to support custom ACME provider. Closes #18306
* Refactor setting.go https settings, renamed options and variables, and documented app.example.ini
* Refactored runLetsEncrypt to runACME
* Improved documentation
2022-02-08 13:45:35 +08:00
Sambhav Saggi edf1c0d947 Fix oauth docs usage for 2fa (#18581) 2022-02-03 17:00:34 +00:00
Gusted 79f0933537 Switch to non-deprecation setting (#18358)
* Switch to non-deprecation setting
  (Avoid by-default: "Deprecated fallback `[server]` `LFS_CONTENT_PATH` present. Use `[lfs]` `PATH` instead. This fallback will be removed in v1.18.0")

* Update all references
2022-01-23 20:02:29 +01:00
Jan Tojnar bf8723b548 docs: mention client_max_body_size affects LFS (#18291) 2022-01-15 17:26:01 -05:00
Zoran Peričić bd2350e24d Add/update SMTP auth providers via cli (#18197)
Allow adding/updating SMTP authentication source via CLI using:
- gitea admin  auth add-smtp 
- gitea admin  auth update-smtp

Signed-off-by: Zoran Peričić <[email protected]>
2022-01-12 22:54:53 +00:00
M. Zhou 5f135b39ce [doc] https-setup: explain relative paths for {CERT,KEY}_FILE fields. (#18244)
Closes: https://github.com/go-gitea/gitea/issues/14401
2022-01-11 23:18:28 -05:00
Greg Myers 59ef05d999 Fix typos in docs/content (#18215) 2022-01-09 19:53:03 +08:00
7bc5bfe284 Team permission allow different unit has different permission (#17811)
* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* fix

* gofumpt

* Integration test for migration (#18124)

integrations: basic test for Gitea {dump,restore}-repo
This is a first step for integration testing of DumpRepository and
RestoreRepository. It:

runs a Gitea server,
dumps a repo via DumpRepository to the filesystem,
restores the repo via RestoreRepository from the filesystem,
dumps the restored repository to the filesystem,
compares the first and second dump and expects them to be identical

The verification is trivial and the goal is to add more tests for each
topic of the dump.

Signed-off-by: Loïc Dachary <[email protected]>

* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* Fix bug

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: Aravinth Manivannan <[email protected]>
2022-01-05 11:37:00 +08:00
qwerty287 a0d1923637 Fix various typos of software names (#18083)
* `git` -> `Git`
* `Github` and `github` -> `GitHub`
* `crowdin` -> `Crowdin`
* `git-lfs` -> `Git LFS`
* `githooks`, `git hooks`, `git-hooks` -> `Git Hooks`
* `discord` -> `Discord`
* `2fa` -> `2FA`
* `gitlab` and `Gitlab` -> `GitLab`
* `web hook` -> `webhook`
* `linux` -> `Linux`
* `sqlite` -> `SQLite`
* `MYSQL` and `mysql` -> `MySQL`
* rename refs to `master` branch -> `main`
* Fix English grammar
2021-12-24 11:56:57 +08:00
qwerty287 95e9b4d7a3 Add option to define refs in issue templates (#17842)
Adds a markdown header option `ref` that allows you to set the ref the issue should belong.
2021-12-17 21:29:09 +00:00
4fb6d37ae7 Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766)
* Add setting to OAuth handlers to override local 2FA settings

This PR adds a setting to OAuth and OpenID login sources to allow the source to
override local 2FA requirements.

Fix #13939

Signed-off-by: Andrew Thornton <[email protected]>

* Fix regression from #16544

Signed-off-by: Andrew Thornton <[email protected]>

* Add scopes settings

Signed-off-by: Andrew Thornton <[email protected]>

* fix trace logging in auth_openid

Signed-off-by: Andrew Thornton <[email protected]>

* add required claim options

Signed-off-by: Andrew Thornton <[email protected]>

* Move UpdateExternalUser to externalaccount

Signed-off-by: Andrew Thornton <[email protected]>

* Allow OAuth2/OIDC to set Admin/Restricted status

Signed-off-by: Andrew Thornton <[email protected]>

* Allow use of the same group claim name for the prohibit login value

Signed-off-by: Andrew Thornton <[email protected]>

* fixup! Move UpdateExternalUser to externalaccount

* as per wxiaoguang

Signed-off-by: Andrew Thornton <[email protected]>

* add label back in

Signed-off-by: Andrew Thornton <[email protected]>

* adjust localisation

Signed-off-by: Andrew Thornton <[email protected]>

* placate lint

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2021-12-14 16:37:11 +08:00
qwerty287 56e65c86ff Fix various typos in docs (#17844) 2021-11-28 18:43:18 -05:00
a504ca2c61 Docs: replace gitea with Gitea (#17838)
Co-authored-by: wxiaoguang <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2021-11-28 21:28:30 +08:00
fa83e9f0bd Update for reverse proxying static resources (#17670)
Gitea fetches static resources from /assets, so nginx configuration has to be updated accordingly.

Co-authored-by: zeripath <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
2021-11-16 21:53:15 -05:00