Commit Graph
486 Commits
Author SHA1 Message Date
techknowlogick 77f3dbed6d latest version is 1.12.5 (#13005) 2020-10-01 15:21:25 -04:00
zeripath c6da033656 Copy missing things from app.example.ini to Cheat Sheet (#12988)
Signed-off-by: Andrew Thornton <[email protected]>
2020-10-01 07:57:57 +01:00
raoulb a43cf283de Fix hugo shortcode typo in faq (#12987)
* Fix hugo shortcode typo in faq

* Switch to using language tags
2020-09-30 16:59:30 -04:00
PE1NUT f2c29f2d25 Clarification on the use of certificate chains (#12986)
* Clarification on the use of certificate chains

* As per @bagasme

Co-authored-by: Bagas Sanjaya <[email protected]>

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Bagas Sanjaya <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-09-30 12:16:13 -04:00
Lunny Xiao 0d0e01eaa9 Fix typo on Chinese documents (#12982) 2020-09-30 20:27:41 +08:00
Lunny Xiao 3878e985b6 Add default storage configurations (#12813)
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-09-29 12:05:13 +03:00
6543 feb1a8cabc Docs: Add missing SESSION_LIFE_TIME to Config Cheat Sheet (#12968)
Co-authored-by: techknowlogick <[email protected]>
2020-09-28 16:39:54 -04:00
zeripath 7f8e3192cd Allow common redis and leveldb connections (#12385)
* Allow common redis and leveldb connections

Prevents multiple reopening of redis and leveldb connections to the same
place by sharing connections.

Further allows for more configurable redis connection type using the
redisURI and a leveldbURI scheme.

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

* add unit-test

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

* as per @lunny

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

* add test

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

* Update modules/cache/cache_redis.go

* Update modules/queue/queue_disk.go

* Update modules/cache/cache_redis.go

* Update modules/cache/cache_redis.go

* Update modules/queue/unique_queue_disk.go

* Update modules/queue/queue_disk.go

* Update modules/queue/unique_queue_disk.go

* Update modules/session/redis.go

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2020-09-28 00:09:46 +03:00
Tait Hoyem c85c9d40c2 Add config option to make create-on-push repositories public by default (#12936)
* Add config option to make create-on-push repositories public by default

* Fix linting

* Add option to 'config cheat sheet' page

* Chinese translation

Signed-off-by: a1012112796 <[email protected]>

* Fix typo in docs

* fix typo

* Add option to example config

Co-authored-by: Tait Hoyem <[email protected]>
Co-authored-by: a1012112796 <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-09-27 15:20:52 -04:00
Bagas Sanjaya b725c4ee53 Add a step for binding IP address for listening on remote database (#12898)
* Add listen address configuration step
  * Fix numbering order

Signed-off-by: Bagas Sanjaya <[email protected]>

Co-authored-by: Lauris BH <[email protected]>
2020-09-26 13:56:13 -04:00
Melroy van den Berg 95ff55991e Proposals for cheat-sheet docs (#12946)
* Propose additional settings in cheat sheet

Add most used settings of app.ini to cheat sheet docs.

* Fix small typo
2020-09-26 02:05:49 -04:00
zeripath 4979f15c3f Add configurable Trust Models (#11712)
* Add configurable Trust Models

Gitea's default signature verification model differs from GitHub. GitHub
uses signatures to verify that the committer is who they say they are -
meaning that when GitHub makes a signed commit it must be the committer.
The GitHub model prevents re-publishing of commits after revocation of a
key and prevents re-signing of other people's commits to create a
completely trusted repository signed by one key or a set of trusted
keys.

The default behaviour of Gitea in contrast is to always display the
avatar and information related to a signature. This allows signatures to
be decoupled from the committer. That being said, allowing arbitary
users to present other peoples commits as theirs is not necessarily
desired therefore we have a trust model whereby signatures from
collaborators are marked trusted, signatures matching the commit line
are marked untrusted and signatures that match a user in the db but not
the committer line are marked unmatched.

The problem with this model is that this conflicts with Github therefore
we need to provide an option to allow users to choose the Github model
should they wish to.

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

* Adjust locale strings

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

* as per @6543

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

* Update models/gpg_key.go

* Add migration for repository

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

Co-authored-by: 6543 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2020-09-20 00:44:55 +08:00
Johan Van de Wauw 08a905f614 Fix external renderers example (#12841)
* libffi-dev is required for building jupyter
* matplotlib can not be installed using wheels on the used version of alpine
  linux, which means it must be compiled and  a large number of other packages
  have to be installed as well.
  This is very inefficient: see eg.
  https://pythonspeed.com/articles/alpine-docker-python/

  Apart from that, matplotlib is actually not required for rendering
  notebook files in gitea and it will pull in other dependencies which take some
  time to build (ie numpy).
2020-09-14 18:11:11 -04:00
John Olheiser 26c4a049da Issue templates directory (#11450)
* Issue templates

Signed-off-by: jolheiser <[email protected]>

* Add some comments, appease the linter

Signed-off-by: jolheiser <[email protected]>

* Add docs and re-use dir candidates

Signed-off-by: jolheiser <[email protected]>

* Add default labels to issue templates

Signed-off-by: jolheiser <[email protected]>

* Generate swagger

Signed-off-by: jolheiser <[email protected]>

* Suggested changes

Signed-off-by: jolheiser <[email protected]>

* Update issue.go

* Suggestions

Signed-off-by: jolheiser <[email protected]>

* Extract metadata from legacy if possible

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-09-11 10:48:39 -04:00
zeripath 7be0939332 Add MySQL FAQ section (#12780)
* Add MySQL FAQ section

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

* Update docs/content/doc/help/faq.en-us.md

* Update docs/content/doc/help/faq.en-us.md

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

Co-authored-by: mrsdizzie <[email protected]>
2020-09-09 13:31:31 -04:00
John Olheiser c6e4bc53aa Check passwords against HaveIBeenPwned (#12716)
* Implement pwn

Signed-off-by: jolheiser <[email protected]>

* Update module

Signed-off-by: jolheiser <[email protected]>

* Apply suggestions mrsdizzie

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

* Add link to HIBP

Signed-off-by: jolheiser <[email protected]>

* Add more details to admin command

Signed-off-by: jolheiser <[email protected]>

* Add context to pwn

Signed-off-by: jolheiser <[email protected]>

* Consistency and making some noise ;)

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: mrsdizzie <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-09-08 17:06:39 -05:00
Lunny Xiao 7a5465fc56 LFS support to be stored on minio (#12518)
* LFS support to be stored on minio

* Fix test

* Fix lint

* Fix lint

* Fix check

* Fix test

* Update documents and add migration for LFS

* Fix some bugs
2020-09-08 23:45:10 +08:00
zeripath 1b9d5074a7 Add command to recreate tables (#12407)
Provides new command: `gitea doctor recreate-table` which will recreate
db tables and copy the old data in to the new table.

This function can be used to remove the old warning of struct defaults being
out of date.

Fix #8868
Fix #3265
Fix #8894

Signed-off-by: Andrew Thornton <[email protected]>
2020-09-06 22:52:01 +01:00
silverwind e1535c74cc Add 'make watch' (#12636)
* Add 'make watch'

This combines frontend and backend watch into a single command that runs
them in parallel on on SIGINT terminates both.

Termination is not super-clean but I guess it does not have to.

* move to tools/, trap more signals, remove gnu-specific flag

* simplify

Co-authored-by: techknowlogick <[email protected]>
2020-09-04 20:55:06 -04:00
techknowlogick 144de79c1b Add details re: Kanban (#12721) 2020-09-04 18:46:21 -04:00
techknowlogick 482b0e6d47 Bump min required golang to 1.13 (#12717)
* Bump min required golang to 1.13

* Update config.yaml

* Update Makefile

* per silverwind feedback

* per silverwind

Co-authored-by: zeripath <[email protected]>
2020-09-04 14:12:01 -04:00
Lauris BH e710a34981 Add spent time to referenced issue in commit message (#12220) 2020-09-04 11:37:37 -04:00
6543 f083bd70df Changelog for 1.12.4 release (#12687) (#12709)
* Changelog for 1.12.4 release (#12687)


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

* update gitea version in docs

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-09-03 23:44:34 -04:00
zeripath 5c0697ad1e Use argon as default password hash algorithm (#12688)
* Restrict TLS connections to 1.2 minimum

* Set Argon2 as the default KDF

* Fix user.yml

* Remove TLS minversion changes

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

* Add migration as per @techknowlogick

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

* set the password algo in the fixtures

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

* Remove the v148 migration - it needs recreate table to change the defaults

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

Co-authored-by: Nadim Kobeissi <[email protected]>
2020-09-03 14:58:31 -04:00
Lunny Xiao f1a7cd6757 Remove GOPATH set up on hacking (#12698) 2020-09-03 11:11:23 +01:00
Martin a0c4c1ce0d Fixes cli error for Asciidoctor (#12677)
The original fix for #8676 introduced illegal arguments for Asciidoctor, causing no rendering at all. This PR fixes the command line arguments so that Asciidoctor properly renders the text. See https://asciidoctor.org/docs/user-manual/#piping-content-through-the-cli as reference.
2020-09-02 11:01:28 -04:00
Lunny Xiao 9bc69ff26e Support elastic search for code search (#10273)
* Support elastic search for code search

* Finished elastic search implementation and add some tests

* Enable test on drone and added docs

* Add new fields to elastic search

* Fix bug

* remove unused changes

* Use indexer alias to keep the gitea indexer version

* Improve codes

* Some code improvements

* The real indexer name changed to xxx.v1

Co-authored-by: zeripath <[email protected]>
2020-08-30 19:08:01 +03:00
zeripath 9abc16a280 fix documentation for REFRESH_TOKEN_EXPIRATION_TIME (#12642)
REFRESH_TOKEN_EXPIRATION_TIME refers to the refresh token not the access token

Fix #12641

Signed-off-by: Andrew Thornton <[email protected]>
2020-08-29 23:02:38 +03:00
John Olheiser 43a397ce9a Initial support for push options (#12169)
* Initial support for push options

Signed-off-by: jolheiser <[email protected]>

* Fix misspelling 🤦

Signed-off-by: jolheiser <[email protected]>

* Fix formatting after conflict resolution

* defer close git repo

* According the GitLab documentation, git >= 2.10

Signed-off-by: jolheiser <[email protected]>

* Words are hard. Thanks @mrsdizzie 😅

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

* Only update if there are push options

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: mrsdizzie <[email protected]>
2020-08-23 17:02:35 +01:00
mrsdizzie fb70b5d207 Disable password complexity check default (#12557)
* Disable password complexity check default

These features enourange bad passwords/are annoying for people using better password methods, and at minimum we shouldn't force that as a default for obvious reasons. Disable any default check to avoid regular complaints.

* fix copy paste format
2020-08-21 18:42:23 -04:00
Florian Klink 95d478c29c change PIDFile default from /var/run/gitea.pid to /run/gitea.pid (#12500)
* docs: update heading

This section covers more paths than the 3 listed in the heading.

* setting: change PIDFile default from /var/run/gitea.pid to /run/gitea.pid

On most modern distributions, /var/run is deprecated and only kept for
backwards compat according to
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html, and is a
symlink to `/run/` on modern distributions.

Old Distros that still don't have `/run` can update the gitea default as
described in from-source.en-us.md to point to the old location.

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2020-08-18 14:21:24 +03:00
Lunny Xiao 62e6c9bc6c Add a storage layer for attachments (#11387)
* Add a storage layer for attachments

* Fix some bug

* fix test

* Fix copyright head and lint

* Fix bug

* Add setting for minio and flags for migrate-storage

* Add documents

* fix lint

* Add test for minio store type on attachments

* fix test

* fix test

* Apply suggestions from code review

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

* Add warning when storage migrated successfully

* Fix drone

* fix test

* rebase

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* refactor the codes

* add trace

* Fix test

* remove log on xorm

* Fi download bug

* Add a storage layer for attachments

* Add setting for minio and flags for migrate-storage

* fix lint

* Add test for minio store type on attachments

* Apply suggestions from code review

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

* Fix drone

* fix test

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* refactor the codes

* add trace

* Fix test

* Add URL function to serve attachments directly from S3/Minio

* Add ability to enable/disable redirection in attachment configuration

* Fix typo

* Add a storage layer for attachments

* Add setting for minio and flags for migrate-storage

* fix lint

* Add test for minio store type on attachments

* Apply suggestions from code review

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

* Fix drone

* fix test

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* don't change unrelated files

* Fix lint

* Fix build

* update go.mod and go.sum

* Use github.com/minio/minio-go/v6

* Remove unused function

* Upgrade minio to v7 and some other improvements

* fix lint

* Fix go mod

Co-authored-by: guillep2k <[email protected]>
Co-authored-by: Tyler <[email protected]>
2020-08-18 12:23:45 +08:00
Lanre Adelowo 4027c5dd7c Kanban board (#8346)
Co-authored-by: 6543 <[email protected]>
Co-authored-by: jaqra <[email protected]>
Co-authored-by: Kerry <[email protected]>
Co-authored-by: Jaqra <[email protected]>
Co-authored-by: Kyle Evans <[email protected]>
Co-authored-by: Tsakiridis Ilias <[email protected]>
Co-authored-by: Ilias Tsakiridis <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-08-16 23:07:38 -04:00
zeripath ac3cfad23d Make the default PID file compile-time settable (#12485)
#12391 offered to change the default PID file from /var/run/gitea.pid however in discussion it was decided that this could break users of older systems. An alternative was offered that we could make the PID file compile/link time settable.

This PR does this, and changes the name of the setting from CustomPID to simply PIDFile. It also updates the from-source docs to show how to change the compiler settings to do this.

Closes #12391

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Florian Klink <[email protected]>
2020-08-15 21:15:27 +01:00
techknowlogick bd7d6a3d73 go1.15 (#12475)
* go1.15

* update makefile xgo version

* fix vet issue

* update docs to version of go in use

* add TODO for asyncpreemptoff

Co-authored-by: Lauris BH <[email protected]>
2020-08-13 10:11:24 -04:00
techknowlogick 22c952ac7a Make dashboard newsfeed list length a configurable item (#12469)
Co-authored-by: John Olheiser <[email protected]>
2020-08-11 10:48:13 -04:00
6543 78d17b4b43 Make default StaticRootPath compile time settable (#12371)
Make it possible to compile the default location of StaticRootPath independent from AppWorkPath

Co-authored-by: Andrew Thornton <[email protected]>
2020-08-08 15:02:22 +01:00
silverwind e67c042511 Add 'watch-backend' (#12330)
* Add 'watch-backend'

This leverages `air` to watch the backend files and trigger `make
backend` automatically when they change. It seems to work rather well
together with `watch-frontend`.

Fixes: https://github.com/go-gitea/gitea/issues/12318

* rework docs to a new section for continuous build

Co-authored-by: techknowlogick <[email protected]>
2020-07-27 14:05:42 -04:00
silverwind 4315e313d1 Add mermaid JS renderer (#12334)
* Add mermaid JS renderer

For feature parity with GitLab. Tested in files, issues, wiki, editor.
arc-green only does an inversion because the renderer seems to like to
render white backgrounds on boxes.

Ref: https://github.com/go-gitea/gitea/issues/3340
Fixes: https://github.com/go-gitea/gitea/issues/12307

* add feature entry, switch to neutral theme, remove border

* add bindFunctions support

* remove unnecessary border-radius

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-07-27 02:24:09 -04:00
silverwind 7cf23399a0 Rework 'make generate-images' (#12316)
* Rework 'make generate-images'

- Remove external dependencies and replace it with a node script that
  does does the same.
- Move detail removal from gitea-sm.png to favicon.png
- Remove favicon.ico and its generation, it is unused and we already serve
  favicon.png in its place.

Fixes: https://github.com/go-gitea/gitea/issues/12314

* use proper centering value for preserveAspectRatio

* fix lint

* use fabric

* better linting fix

* fix typo

* mention detail-remove class in docs
2020-07-26 17:47:51 +08:00
Alexander Scheel 8e20daaede Clarify documentation of SKIP_VERIFY (#12203)
* Clarify documentation of SKIP_VERIFY

The documentation clearly documents the empty value as the default,
however at least one user reported this as being unclear. Mark values
explicitly so it is clear what values it can take. This clarifies that
an empty value in fact leaves certificate verification enabled, whereas
it has to be explicitly set to true to disable certificate verification.

Resolves: #12117

Signed-off-by: Alexander Scheel <[email protected]>

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

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

* Update custom/conf/app.example.ini

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

* Update custom/conf/app.example.ini

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

Co-authored-by: mrsdizzie <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-07-21 19:50:25 -04:00
Bagas Sanjaya 07c4ed4cda [Docs] Logging Configuration - Use logrotate Instead (#9930)
* Logging Configuration - Add logrotate

* Delete instead duplicate

* Apply suggestions from @jolheiser

Co-Authored-By: John Olheiser <[email protected]>

* Quote false

* Replace program with utility

* Whoops, use --debug switch instead

* Optional immediate reload by --force switch

* Update docs/content/doc/advanced/logging-documentation.en-us.md

Co-authored-by: John Olheiser <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-07-16 12:02:29 -04:00
Ben Harris a4da46d182 Use correct make target for building static assets (#12247)
The webpack make target does not build semantic-ui
2020-07-14 15:45:23 -04:00
Antoine GIRARD b92a5d8d64 release docs as an archive (#12243)
* release docs along sources

* use a custom offline version

Co-authored-by: Gitea <[email protected]>
2020-07-13 22:09:39 -04:00
silverwind 8188176b58 Direct SVG rendering (#12157)
Introduce 'make svg' which calls a node script that compiles svg files
to `public/img/svg`. These files are vendored to not create a dependency
on Node for the backend build.

On the frontend side, configure webpack using `raw-loader` so SVGs can
be imported as string.

Also moved our existing SVGs to web_src/svg for consistency.

Fixes: https://github.com/go-gitea/gitea/issues/11618
2020-07-12 12:10:56 +03:00
6543 3973a4609e Frontport Changelog of v1.12.2 (#12216)
* Changelog for v1.12.2 (#12214)

* Changelog for v1.12.2

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

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

* update docs

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: mrsdizzie <[email protected]>
2020-07-11 16:28:23 -04:00
zeripath c5b08f6d5a Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777)
* Make LogDescriptions race safe

* Add manager commands for pausing, resuming, adding and removing loggers

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

* Placate lint

* Ensure that file logger is run!

* Add support for smtp and conn

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

* Add release-and-reopen

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

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2020-07-05 20:07:07 -04:00
zeripath ae56411e9f Move EventSource to SharedWorker (#12095)
Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1
open browser connections from preventing gitea from opening multiple tabs.

Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating

Fix #11978

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

Co-authored-by: silverwind <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-07-03 10:55:36 +01:00
Lauris BH 121103fecf Changelog for v1.11.8 and v1.12.1 (#12006) (#12007)
* Changelog for v1.12.1 (#12006)

* Update gitea version to latest release
2020-06-22 09:58:54 -04:00
techknowlogick ec40e593cf 1.12.0 is latest stable version (#11964) 2020-06-18 15:37:25 -04:00