Commit Graph

151 Commits

Author SHA1 Message Date
TomZ 743d1e34ac
[BRANDING] cosmetic s/Gitea/Forgejo/ in logs, messages, etc.
As the docs of codeberg refer to the strings printed by the Forgejo
ssh servers, this is user-facing and is nice to update to the new
product name.

(cherry picked from commit 103991d73f0f78f31a5f1dae47824c2fe481bcc6)
(cherry picked from commit 2a0d3f85f199d28a4180becdebcb90af0d6f3504)
(cherry picked from commit eb2b4ce388810dc145dd90d3358d4d4373e31b80)
(cherry picked from commit 0998b51716ef5d3c25e139886aa8b7bfde703b20)

[BRANDING] forgejo log message

(cherry picked from commit d51a046ebe774236f8b902c45486dc8cbd041e0e)
(cherry picked from commit d66e1c7b6e2fbfefb976103805b18eb29b6406af)
(cherry picked from commit b5bffe4ce8a8353c9e5529350a7932d4a2d9e53e)
(cherry picked from commit 3fa776d8566c42ce31540024ce5bf5a6cb5cd4e4)
(cherry picked from commit 18d064f47214327dc5b6c55c2d02a3da53358dbc)
(cherry picked from commit c95094e355212d4baf607f3778152ceb455d4f82)
(cherry picked from commit 5784290bc46afffca9b93e0faa3bd88944e54919)
(cherry picked from commit aee336886b2606beaf8c27a2992c21aa2a574966)
(cherry picked from commit ec2f60b516b1ee11b5e7c52ecb02fdf8e5bbcaec)
(cherry picked from commit 7af742a28469d6725248d5519e69217b844ed792)
(cherry picked from commit f279e2a264ae028ab511ba61a71e00739dc5020a)
(cherry picked from commit fd38cfb14eebe34dc72b8358479e53d27fe01180)
(cherry picked from commit 64c82266183943f062016479c2d1868ccdee2cec)
(cherry picked from commit b546fb23042c6d231ce29241d1991c9cb1bf1bba)
(cherry picked from commit ad102021776a8dd407ef19cbfadc42b3ca7fabd5)
(cherry picked from commit c89cab9c2b019a592dffe4b6de29482feca1bb33)
(cherry picked from commit 9579322ec2eec40cb8f113458c1d5669f5d4b818)
(cherry picked from commit 16b44ad18de82b0429a8b0a05ed93445d1524241)
(cherry picked from commit 2571ff703b77cc8527f37f82c36e9260a80ac673)
(cherry picked from commit ad61d9ce9b93503b04deb9ecdb5f214566caf820)
(cherry picked from commit 9b2c45d4d3b1c6401a3d7d0a5544213e1486ab9e)
(cherry picked from commit ed01b79a598a0698324392dab66a2cd3d41c628c)
(cherry picked from commit d040b664279292f9f7304f96db0d172672c1e904)
(cherry picked from commit ffe0bbea48d036c26149d98856add938bb08a475)
(cherry picked from commit 4c1b2c409bb90a0c2876f3a7323cf162a7e58765)
(cherry picked from commit 3d8338ed106cb6260a4dae249ddef71489c47357)
(cherry picked from commit a92f044ea96bbe9c47689455a417e4f1bc3cd648)

[BRANDING] link to forgejo.org/docs instead of docs.gitea.io

(cherry picked from commit 3efafd0e083eb331ce06681351a40c4f46d7c96f)
(cherry picked from commit 148185e34b2be36fa46e8630928ee64a73768883)
(cherry picked from commit 834e264698f710049f20491b91b3c39b853de867)
(cherry picked from commit e72fa6eb1ef8f4355197ced3c619d8ff6d9c1c9f)

[BRANDING] link to forgejo.org/docs instead of docs.gitea.io

Fix the link that was 404.

(cherry picked from commit ae515d7258602a0fe4bb4471f2017e4ccc7dd0e7)
(cherry picked from commit facc2367f0e5fc1e1162cc2478a658f050c07718)
(cherry picked from commit 25784b9f21a37d9161b050503b0d45d87cd8863d)
(cherry picked from commit 2efc6138d92e958ee6a6091e579fa269aea45ce4)
(cherry picked from commit b9d0871631ef70abe88de64ccbabcfc94a49274b)
(cherry picked from commit f0446e51b9c2268f274a1c4b8c25abfcf417975c)
(cherry picked from commit 1638aa67fb384bdcd97386861054447a8d53e832)
(cherry picked from commit 290db6a018d4f82173446799b8726a320c209bb4)
(cherry picked from commit 89b87cf5426b7407ba0e23912fbbd3c521a8bae4)
(cherry picked from commit 656ed949625652a3a0e8d0b1381e76f75688e461)
(cherry picked from commit 036f879f96d606af691326474cefe77441c8c4ed)
(cherry picked from commit 69eea35f813d03f578ca143e45292289b0ad92a8)
(cherry picked from commit b72e3f4a92a04ac065b5b72ca25f7eb0c96ba69d)
(cherry picked from commit af606b8574d67c8c7a3699cf41d6a96fc3852547)
(cherry picked from commit 7e47f8135c08be3f48ccad6b8d8a940bc5713e53)
(cherry picked from commit 0e5218cc5374a0e16a273298f862dd3d6cebe020)
(cherry picked from commit 7c2a20a528a6911412986ff8eb479f3a19d7f226)
(cherry picked from commit 4e94006363227435b53769b92882b51a6109ba52)
(cherry picked from commit e47cdfc43fb693dfd0507bb1fe943da41fd2ebb4)
(cherry picked from commit 1dcb3e1da4ab4d8dbb659e87c4f542245b066409)
(cherry picked from commit 67367c4e0f4b755879350e9311e44deff95c137c)
(cherry picked from commit 252087d1ffcae00dfa7e8edc7face8775412d4cc)
(cherry picked from commit f5977a43e5cb2c869af0cd8c993cd0d3eeccb622)

Conflicts:
	templates/base/head_navbar.tmpl
	https://codeberg.org/forgejo/forgejo/pulls/1351
(cherry picked from commit 594938eb1505f6d81d8c0cce84a34c20a18b5c7a)
(cherry picked from commit 0257d038a7416fd208571d8be0a14a9ea6ac4d95)
(cherry picked from commit 72821dd14052505814df556e09a500981256f709)

[BRANDING] s/gitea/forgejo/ in HTML placeholders

Replaced Gitea branding with Forgejo for input placeholders

Closes: #686
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/752

(cherry picked from commit 6160d37ca972566017aee46b2ef42f398f969dca)
(cherry picked from commit df61138c7eaa25068fe0012644fd15b407a4816e)
(cherry picked from commit 1f30566c3f63925ca56eaa21b4fa580b4bb1ffaf)
(cherry picked from commit 539bb825f555585f0a52ea4c8747c5b589254633)
(cherry picked from commit bee0f66c869d2632a1ad3cda731caaba74c3634c)
(cherry picked from commit 60ad005c95a6d53f615a720445eef77e4bc499ef)
(cherry picked from commit 282e26222ef4aea1720b4b121ac29264876069c7)
(cherry picked from commit f9ca551f3dbc0f75250445b4e731396dc34fc041)
(cherry picked from commit b2e04b04c381549557873b1956065dc5a5132a97)
(cherry picked from commit c8f395a03c688bcc1413c6ed6b6f820aab7851d5)
(cherry picked from commit 0d58ce49aeefd43b3316c0238dcd04e019b6be25)
(cherry picked from commit c602ddf91efd95347de433cfad8ac20995d12283)
(cherry picked from commit 029e37271ead5405daa11945bd64104f12c8ba77)
(cherry picked from commit fdaa96b3ccca76cba877f8f5dafcf4cf9d160af8)
(cherry picked from commit 515d99e27d5db12c5495e31e104ccb6b7ad0ce7a)
(cherry picked from commit da73274ba1cb55d1c425b95890a55aecee2bb246)
(cherry picked from commit ce90b696a01619d86ac7dac7b0cd78be8f06e4b1)
(cherry picked from commit b6bf98763be1855b5613dc8db627fd889bff8308)
(cherry picked from commit 5b380d22d78568c2c4f26a3e8aa90a42006969e9)

[BRANDING] How to start a runner: URL to Actions admin documentation

(cherry picked from commit da91799e6f06ac3c91c1cfc763f4ec0b5cc3cf21)
(cherry picked from commit 28231663b634f6d877173ba4956f6c0a5d128b2b)
(cherry picked from commit 533a90345bb0236c8fc088f2ab1b92535f8a4269)
(cherry picked from commit 6a0e4e55dd02beff179b8503259d1cc774e8e81b)
(cherry picked from commit f47cd611c68f9da2df9b0e5e0a8332f6fcc17932)
(cherry picked from commit 001264b7840aaad6aa25e0b06a927300751ef20e)
(cherry picked from commit e4099e9bb9f557e99bb0117eaf6ad88467684527)
(cherry picked from commit 3a1885649ff1dcaf5acdb1bb237c477a92aeb01f)
(cherry picked from commit c42802c710c0fce2eea06a93a7f4373557515616)
(cherry picked from commit a611ce8d6d293573534d4ce1efde81d32129723a)
(cherry picked from commit a3d7d10a80ba6104ee6f260290518936b210c16b)
(cherry picked from commit 52adde671f8dcb309235506a3c39a38db87e9537)
(cherry picked from commit c9a3820fef10ef0b20e52f5f70d7794dde0974b3)
(cherry picked from commit dce40997c956244742325b5b10d13e8ec918082c)
(cherry picked from commit 312a6b92f384fdb09fc26e5da5a4acf0680ff698)

[BRANDING] package templates & links

- Change Gitea to Forgejo where necessary.
- Point all documentation to Forgejo's documentation.
- Resolves #992

(cherry picked from commit d0b78a6edea0abba54ef537781234d8f778e0ad8)
(cherry picked from commit e2382f30ba07586fd3ea4c8a535ab550ecc33408)
(cherry picked from commit c41cf05a334944a66129425c4a9abb973fbb4687)
(cherry picked from commit 797e598ae73441c66f25849bf643e0c11a737c41)
(cherry picked from commit 970031a1c2974cf0c6ce057ad82afdd6380f6882)
(cherry picked from commit 0c1180e2e142852248787185e2c01582413de8c3)

Conflicts:
	templates/package/content/alpine.tmpl
	templates/package/content/cargo.tmpl
	templates/package/content/chef.tmpl
	templates/package/content/composer.tmpl
	templates/package/content/conan.tmpl
	templates/package/content/conda.tmpl
	templates/package/content/container.tmpl
	templates/package/content/cran.tmpl
	templates/package/content/debian.tmpl
	templates/package/content/generic.tmpl
	templates/package/content/go.tmpl
	templates/package/content/helm.tmpl
	templates/package/content/maven.tmpl
	templates/package/content/npm.tmpl
	templates/package/content/nuget.tmpl
	templates/package/content/pub.tmpl
	templates/package/content/pypi.tmpl
	templates/package/content/rpm.tmpl
	templates/package/content/rubygems.tmpl
	templates/package/content/swift.tmpl
	templates/package/content/vagrant.tmpl

	https://codeberg.org/forgejo/forgejo/pulls/1351
(cherry picked from commit 42ac9ff2abe55826047c36e041f1bcd70caf7581)
(cherry picked from commit e390000bcee673c2d15c8777c2d2da316967ce62)
(cherry picked from commit 56a437b29b71976b9b0816d0de2ce8169a84f288)

Conflicts:
	templates/package/content/cargo.tmpl
	https://codeberg.org/forgejo/forgejo/pulls/1466

[BRANDING] s/Gitea/Forgejo/ in user visible help & comments

- Modify the README of the docker directory to point to the relevant
docker files and documentation for Forgejo.

(cherry picked from commit aca6371215c1bf95b6c0b19b9fadb797544adc48)
(cherry picked from commit 0ba96b1bc4c4df84ce3dca9875ad4a9ac8f1f759)
(cherry picked from commit 5c8e6b53f164dd16b527c603a3089735ff16df89)

Conflicts:
	docker/README.md
	https://codeberg.org/forgejo/forgejo/pulls/1351
(cherry picked from commit b3121c8004f675b31482cdbd564f9a830be48acd)
(cherry picked from commit 607f8704163bd24bfc7ff1d6a812b5e887746797)
(cherry picked from commit 191d96afe4198d3b6498aa21eaeb7686a59865bc)

[BRANDING] healthcheck/check.go

(cherry picked from commit d703a236cebadc0186b7b2431b3b42a54b3d1f09)
(cherry picked from commit d84ce3ff2098e9ba3c7241605ea25951dcb57ca6)
(cherry picked from commit 2dbb8446069c79017dcc4a9921dffcb73594d02c)
(cherry picked from commit 14d3ae7e3ae67dff3443db17e4373e5947ed6c6c)

[BRANDING] s/Gitea/Forgejo/g in CLI output

(cherry picked from commit 7543c126bbb78d5d29c253a88b56ccd2dd394928)
(cherry picked from commit b66f422fc3b9018aa948a869045cb3684e80f5f2)
(cherry picked from commit a81e4e46f3b0e619cea959de5ffde2e811d6008e)

[BRANDING] Gitea->Forgejo in mailer code

(cherry picked from commit b91afea4ff5e092452b5848900fc426b1c7289d5)
(cherry picked from commit 5d7428167c8ee5f25fb719f32a561472ef1aee68)
(cherry picked from commit ed8101ba6cc87526554a69f58a49507a79eadb35)

[BRANDING] use 'Forgejo' for Discord, Packagist, and Slack webhooks

Refs: https://codeberg.org/forgejo/forgejo/issues/1387

(cherry picked from commit 7dc3a05f5b9013a0696f071ebea4d2403c1c36a8)
(cherry picked from commit 133f2fc6cc2e977a5f7660ca4c214c92ac036421)

[BRANDING] cmd/manager.go

(cherry picked from commit d1dba2c79db63a6fc23e6bbab2b8dcbdaf43b679)

[BRANDING] pyproject.toml

(cherry picked from commit 7e8c868db2d5331778a87b5a1b493a81bf6863a4)
(cherry picked from commit 2395995c8b61c0674278db4321aa7d79e4c0eb91)
(cherry picked from commit dd6fbbf332f7833175634ef6d48eb5ad384aabb9)

Conflicts:
	templates/package/content/cargo.tmpl
	https://codeberg.org/forgejo/forgejo/pulls/1548
(cherry picked from commit 6f9a5d5cabc9bf7b57dc199a332261b8fe53e52d)
(cherry picked from commit d0635c4a07bb080e509f5578a995c7378b995691)
(cherry picked from commit 5f9a8c5744d254099c7ce98f14e1b58ec0a40708)
(cherry picked from commit 10b96c45673ef1d8d9f5364721b6e876a10e6f3b)
(cherry picked from commit 717d52e92863aa44536ed7ad524608aa5f398469)
(cherry picked from commit 5debdb103eb44d40fa9dd7056b48accc3cc185aa)
(cherry picked from commit ded1c1700e3795abf1d95d4d732703b9148f68fd)
(cherry picked from commit 52aa23cf7a3a7960c60ed7b504ea58c147a6c399)
(cherry picked from commit 882c942b061ef6f8e65668c70349522b57893090)
(cherry picked from commit 73fc2d2ea86877f9821a0230aa28114b624251fc)

Conflicts:
	cmd/actions.go
	cmd/doctor.go
	cmd/keys.go
	https://codeberg.org/forgejo/forgejo/pulls/1976
(cherry picked from commit 6180ef24dc0edad0b7471c463715179f29d741b9)
(cherry picked from commit 8970fa2bf872ee544ed9e0c1241fde8755e6acf1)

Conflicts:
	templates/package/content/debian.tmpl
	https://codeberg.org/forgejo/forgejo/pulls/2074

Fix a typo in docker/README.md

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit 2e5df79dfb45719ff55c4c1f33bb1e753c32533f)
(cherry picked from commit 2bf6ce5b8167da5f5245337de93bf01f8522bd49)
(cherry picked from commit 8ec779277d6fbdbcc0a5f369fa73d47d3f80996f)
(cherry picked from commit 6048fc66e8ed9820ecb84e025efe9affbf124d85)
(cherry picked from commit 162538c722202d13f443b45249f05f3d9abd76f5)
(cherry picked from commit 646bb9965088a028a4469796fa6d62e4499e2b0d)
2024-02-05 16:02:14 +01:00
Loïc Dachary 1a673c0ff6
[BRANDING] container images: set APP_NAME
(cherry picked from commit 12d7bc447edb272327200389c73bb04bb5fccc14)
(cherry picked from commit 1335b17fc35b8b873b94435fddcc23c5cdf0117e)
(cherry picked from commit 0d7da06c47ac3a7278602871b95234f823e11f1d)
(cherry picked from commit 095c1ab679bce39dbaa89e8a86eaeab8a9b823ad)
(cherry picked from commit 2220f00d09e2692d10e0d07f1e8ae2232a636a7d)
(cherry picked from commit f0be8bbdbfb758fd13f2f9325358ad292f6c030c)
(cherry picked from commit 15188180a15adb58bbde418018612561b68b6927)
(cherry picked from commit 96c471d7d36a24824835b254bf785689f898d715)
(cherry picked from commit 709052f1e79bbb0ee417f8001c9c0dbd03e78791)
(cherry picked from commit 98cd2f5deee05ae9be67250c85fc17e31eaaf28a)
(cherry picked from commit a1014654b13e338eaf35cd96d6115fe88459480f)
(cherry picked from commit a16f4dc51dce3f9d22cf899186fc61931a82f35e)
(cherry picked from commit abbed33d1699daa99620acdec5322846f562cb8d)
(cherry picked from commit 4871447def0794027227280059bdfa29cacc0a23)
(cherry picked from commit ea1218b237017fa3ca3e5204afd56a18e8336650)
(cherry picked from commit 6dd67d60de567e70a36524db940b8e88420251c0)
(cherry picked from commit 71761f04afff6d1552c5604fcf7f9b5a27cf01ba)
(cherry picked from commit 7cb28a3a06b1b665a6ac9d2687c79ef5ceed0dba)
(cherry picked from commit d116336cb5a2df68260fbec42b606fa35c27ba30)
(cherry picked from commit 4138a698b2744f504cc6e3590ab8b14753cb719d)
(cherry picked from commit 38c572bc1928fc138503a88b66aa8e6d1c06aa6e)
(cherry picked from commit 94c759b47f93dde23473d45eff2309dce5055d8a)
(cherry picked from commit e1f52bf1d5087df6c7905afc08a7cbada6854f7f)
(cherry picked from commit 8bc7000cfa7d0caa87f99c07543f36925fbe984b)
(cherry picked from commit fa60007c3464a8d7fc278df1f6d51fb40c6ed130)
(cherry picked from commit 0328db39c9a9359046aea0a422002a3072509345)
(cherry picked from commit d028010b64e9d12dc3698fadd8b6f017ea2762ef)
(cherry picked from commit 0283c920f01e8ec599613f8e28fa39157f698e4c)
(cherry picked from commit f5bdf3e11f93c508d03ce38d66550aadeb41abdd)
(cherry picked from commit e3beb523007fe87951a4e901596aaef965de0771)
(cherry picked from commit a63d5afc91a5c7f29969c5ed722c6718c1452e6d)
(cherry picked from commit 7d43e1a828139d20b5baafe1df706e11ed4d83a8)
(cherry picked from commit a551fbd0fa00231a886c101d5fe438b184c01b93)
(cherry picked from commit cdff0ddbb67237638d60ed5a6180670813ce24d0)
(cherry picked from commit f2462ab1d0d0bf70c9d6cec4408bb6f9a05a6019)
(cherry picked from commit 7231dcc0a7a16b8f1dc6a5a67e589cdf9ee310ed)
(cherry picked from commit 1cbe55f8329f5ec70aaef39d6c66551f555e0b96)
(cherry picked from commit 483d9534989bb6abdc65d87eed1f4806ea78f6eb)
(cherry picked from commit e0b863d2e9b983c77a63199a14c50e1724688c1e)
(cherry picked from commit 34dc719b4d55e87832f7dd38152d8503a9438ec0)
(cherry picked from commit 200f1ddec3129f8722265531817bf4489ef02f6e)
(cherry picked from commit 892435f00f6b22fa41bc572d58e1f3168677d3d2)
(cherry picked from commit 188d1d387a933812a88e58241ac8fe3ceb1a1d36)
(cherry picked from commit 8589533bfebf21233ca91a4b90d41532e34efad2)
(cherry picked from commit 8e7e83ffe59044e67f954f20bce3a5be901e7777)
(cherry picked from commit 4f86171d68d6a363d7c813cd8eb439ed656d3c6d)
(cherry picked from commit ece61fd4f649e48e14811ffc2e20deae487244b8)
(cherry picked from commit ff34eb0023be8e07e37cf63787bfc7187f9da3a6)
(cherry picked from commit 845b0ecc8cbea1a7985b7623c92237f1bbf5710c)
2024-02-05 16:02:13 +01:00
Patryk Krawaczyński 319414dd82
Dockerfile small refactor (#27757)
- Size and layer optimization,
- Maintaining consistency in definitions (comments, apk etc.),
2023-10-29 09:44:06 +08:00
mainboarder c533991519
Expanded minimum RSA Keylength to 3072 (#26604)
German Federal Office for Information Security requests in its technical
guideline BSI TR-02102-1 RSA Keylength not shorter than 3000bits
starting 2024, in the year 2023 3000bits as a recommendation. Gitea
should request longer RSA Keys by default in favor of security and drop
old clients which do not support longer keys.


https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR02102/BSI-TR-02102.pdf?__blob=publicationFile&v=9
- Page 19, Table 1.2

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-08-28 00:53:16 +00:00
Lunny Xiao 476b9d1589
Use docs.gitea.com instead of docs.gitea.io (#26739) 2023-08-27 11:59:12 +00:00
wxiaoguang 79c3329502
Do not use deprecated log config options by default (#26592)
Simplify the log config

* Remove unnecessary `ROUTER` config, it defaults to the `MODE`.
* `XORM` config was deprecated
2023-08-20 01:05:29 +00:00
wxiaoguang 5489962aac
Fix WORK_DIR for docker (root) image (#25738)
Fix #25726 

#17846 chose an incorrect WORK_DIR path for docker root image.

Gitea's work-path was already used as the base path for various paths
(like AppDataPath), so, the work-path should be mounted to a volume in a
docker image.

Now, for docker root image, it's unavoidable to mix the
WorkPath/CustomPath/AppDataPath in the same directory ("/data/gitea"),
because some of them have already been mixed.

Some directories in the screenshot are for "CustomPath" , while others
are for "AppDataPath", due to the technical debts in old code:

```
CUSTOM_PATH="/data/gitea"
APP_DATA_PATH = /data/gitea
```

<details>


![image](https://github.com/go-gitea/gitea/assets/2114189/9f0648ac-f731-4a08-9f26-1af01a1824b1)

</details>


This PR is breaking but this is the only way at the moment to avoid
users losing their data accidently

Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-10 08:26:07 +00:00
Jason Song 5b7b7c4f3c
Correct permissions for `.ssh` and `authorized_keys` (#25721)
Set the correct permissions on the .ssh directory and authorized_keys
file, or sshd will refuse to use them and lead to clone/push/pull
failures.

It could happen when users have copied their data to a new volume and
changed the file permission by accident, and it would be very hard to
troubleshoot unless users know how to check the logs of sshd which is
started by s6.

Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-06 17:00:38 +02:00
delvh 65ba2f32ca
Do not publish docker release images on `-dev` tags (#25471)
Try to prevent what happened with tag `v1.21.0-dev` as outlined in
#25193.
Unfortunately, we cannot really test if it works as intended as we would
need to release a new `dev` tag for that.
Fixes #25193 (or at least attempts to).

---------

Co-authored-by: jolheiser <john.olheiser@gmail.com>
2023-06-23 19:52:24 +00:00
techknowlogick 017a156553
Unify nightly naming across binaries and docker images (#24116)
Proposal found here: https://github.com/go-gitea/gitea/issues/23654

TODO: make non-breaking (can we publish docker image using dev and
nightly prefix? at same time). if anyone has advice please comment :)

If this PR is merged, then I can add redirects to the downloads site.
2023-04-24 23:43:19 +08:00
John Olheiser a084e182b0
Wrap unless-check in docker manifests (#23079)
Should fix the following:
> failed to render template: Evaluation error: Helper 'unless' called
with wrong number of arguments, needed 2 but got 3

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-02-22 16:33:31 -06:00
zeripath 54d7435d28
Adjust manifest to prevent tagging latest on rcs (#22811) 2023-02-19 09:24:08 -05:00
Melroy van den Berg fd29071e57
Rootless Docker - Mistake with the repo-avatars parent folder name (#22637)
There was a mistake when choosing the structure for the repo avatars parent folder and it added a spurious /gitea.

The `data` directory should contain folders like:

  - `attachments/`
  - `avatars/`
  - `log/`
  - `repo-avatars/`
2023-01-31 22:42:48 +00:00
Xinyu Zhou f17edfaf5a
Remove deprecated DSA host key from Docker Container (#21522)
Since OpenSSH 7.0 and greater similarly disable the ssh-dss (DSA) public
key algorithm, and recommend against its use.
http://www.openssh.com/legacy.html

## ⚠️ BREAKING ⚠️

This patch will remove DSA host key form OpenSSH daemon configuration
file.

Signed-off-by: baronbunny <its@baronbunny.cn>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-11-03 19:49:12 +08:00
wxiaoguang 7258a124af
Fix the mode of custom dir to 0700 in docker-rootless (#20861) 2022-08-19 11:05:07 -04:00
Thomas Andrade 4a295d4a6c
feat: Add support for extra sshd_config parameters via 'Include' file (#19842)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-05-31 14:42:19 -04:00
wxiaoguang 4266bd924b
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
Gusted ba5f2acb9c
Configure OpenSSH log level via Environment in Docker (#19274)
Introduce a new environment variable: SSH_LOG_LEVEL
2022-03-31 11:15:36 +08:00
zeripath 7489d96db6
Fix issue with docker-rootless shimming script (#18690) 2022-02-10 01:15:06 -05:00
zeripath 9f9ca0aae4
Fix pushing to 1-x-dev docker tag (#18578)
* Fix pushing to 1-x-dev docker tag

It appears that #18551 and #18573 have a mistake in that raymond does not have
an {{else}} on {{#equal}}. This PR notes that Sprig has a hasPrefix function
and so we use this with another if.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix pushing to 1-x-dev docker tag (part 2)

Although we now have the manifest working, we need to create the images.

Here we adjust the .drone.yml to force building of the images

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix pushing to 1-x-dev docker tag

OK now we have the images building we should make sure that the main ones stays
dev and the release/v* ones become *-dev-*

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review
2022-02-03 22:44:51 +01:00
zeripath 104c547d61
Fix manifest.tmpl (#18573)
A spurious {{/if}} appeared on the manifest.tmpl - this PR simply
removes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-03 09:51:01 +00:00
zeripath bc77b28d9d
Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that branch (#18551)
* Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that branch

One of the problems with our current docker tagging is that although we
have strict version tags, latest and dev we do not have a way for docker
users to track the current release branch. This PR simply suggests that
we use the 1.x-dev tag for these and we build and push these. This will
give users who want or need unreleased bug fixes the option of tracking
the pre-release version instead of simply jumping to dev.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-02-03 09:47:27 +01:00
Michael Kriese de05d71b40
In docker rootless use $GITEA_APP_INI if provided (#18524) 2022-02-01 20:18:57 +00:00
Gusted 5e5740af69
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
Grzegorz Alibożek 4563148a61
Upgrade Alpine from 3.13 to 3.15 (#18050)
* Upgrade alpine to 3.15

* Add executability test to entrypoint for too old dockers

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update docker/rootless/usr/local/bin/docker-entrypoint.sh

Co-authored-by: zeripath <art27@cantab.net>
2022-01-19 16:55:17 -05:00
zeripath 7d0629adf8
Use shadowing script for docker (#17846)
Too many docker users are caught out by the default location for the
app.ini file being environment dependent so that when they docker exec
into the container the gitea commands do not work properly and require
additional -c arguments to correctly pick up the configuration.

This PR simply shadows the gitea binary using variants of the FHS
compatible script to make the command gitea have the default locations
by default.

Fix #14468
Reference #17497
Reference #12082
Reference #8941
... amongst others ...
Replace #17501

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-12-01 18:08:27 +00:00
techknowlogick e180456983
Change docker tag logic (#16421)
* Change docker logic

* Apply suggestions from code review

Co-authored-by: Kyle D. <kdumontnu@gmail.com>

* docs

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Kyle D. <kdumontnu@gmail.com>
2021-07-14 18:08:43 +01:00
luzpaz e0296b6a6d
Fix various documentation, user-facing, and source comment typos (#16367)
* Fix various doc, user-facing, and source comment typos

Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby`
2021-07-08 13:38:13 +02:00
zeripath 8947422781
Fix bug due to missing MaxStartups and MaxSessions (#16046)
Unforunately #16009 makes these settings mandatory. This PR uses the same technique
as used for the certificates to make these settings non-mandatory.

Fix #16044

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
2021-06-01 15:55:17 -04:00
Dario Louzado 5de01e21a1
Make sshd_config more flexible regarding connections (#16009)
* Make sshd_config more flexible regarding
MaxStartups and MaxSessions.

See https://man.openbsd.org/sshd_config
for more information.

* make property prefix equals
other existing Gitea SSH properties.

Co-authored-by: dlouzado <dlouzado@senado.leg.br>
2021-05-31 21:33:50 -04:00
zeripath 0ada74edbc
Only offer hostcertificates if they exist (#15849)
A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix #14110 amongst others.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-05-13 15:11:28 +03:00
Lauris BH 044cd4d016
Add reverse proxy configuration support for remote IP address (#14959)
* Add reverse proxy configuration support for remote IP address validation

* Trust all IP addresses in containerized environments by default

* Use single option to specify networks and proxy IP addresses. By default trust all loopback IPs

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-03-16 00:27:28 +02:00
Kyle D 61f347e349
Add environment-to-ini to docker image (#14762)
* Add environment-to-app.ini routine

* Call environment-to-ini in docker setup scripts

* Automatically convert section vars to lower case to match documentation

* Remove git patch instructions

* Add env variable documentation to Install Docker
2021-02-23 20:21:44 +01:00
Lunny Xiao 0cd87d64ff
Update docs and comments to remove macaron (#14491) 2021-01-29 16:35:30 +01:00
silverwind bc455ed257
Set RUN_MODE prod by default (#13765)
I think it's a bad default to have "dev" as the default run mode which
enables debugging and now also disables HTTP caching. It's better to
just default to a value suitable for general deployments.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-30 14:52:04 -05:00
6543 e7b47c5215
Format files (#13698)
* align "make help"

* format

* untouch build/generate-svg.js

* untouch .eslintrc

* combine editorconfig's

* rm editorconfig

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-28 01:12:22 -05:00
Antoine GIRARD bcb94ed589
fix docker rootless manifest (#13386) 2020-11-02 14:50:13 -05:00
Antoine GIRARD 563165abe4
Remove specific indexer path (#13388)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-01 18:34:38 -05:00
Antoine GIRARD fe458ce877
docker: rootless image (#10154)
* docker: rootless image

* improve docs + remove check for write perm on custom

* add more info on ssh passtrough

* Add comment for internal ssh server in container config
2020-10-31 20:58:22 -04:00
Anders Eurenius Runvald 01f991ac88
Update sshd_config (#13143)
Afaik, adding these lines does nothing unless the file(s) are present. Having them in let's admins supply certs instead of relying on TOFU.

Co-authored-by: zeripath <art27@cantab.net>
2020-10-14 13:01:11 -04:00
Wim 9066d09c57
Add ssh certificate support (#12281)
* Add ssh certificate support

* Add ssh certificate support to builtin ssh

* Write trusted-user-ca-keys.pem based on configuration

* Update app.example.ini

* Update templates/user/settings/keys_principal.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Remove unused locale string

* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>

* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>

* Update models/ssh_key.go

Co-authored-by: silverwind <me@silverwind.io>

* Add missing creation of SSH.Rootpath

* Update cheatsheet, example and locale strings

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

* Optimizations based on feedback

* Validate CA keys for external sshd

* Add filename option and change default filename

Add a SSH_TRUSTED_USER_CA_KEYS_FILENAME option which default is
RUN_USER/.ssh/gitea-trusted-user-ca-keys.pem

Do not write a file when SSH_TRUSTED_USER_CA_KEYS is empty.

Add some more documentation.

* Remove unneeded principalkey functions

* Add blank line

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

* Add SSH_AUTHORIZED_PRINCIPALS_ALLOW option

This adds a SSH_AUTHORIZED_PRINCIPALS_ALLOW which is default
email,username this means that users only can add the principals
that match their email or username.

To allow anything the admin need to set the option anything.

This allows for a safe default in gitea which protects against malicious
users using other user's prinicipals. (before that user could set it).

This commit also has some small other fixes from the last code review.

* Rewrite principal keys file on user deletion

* Use correct rewrite method

* Set correct AuthorizedPrincipalsBackup default setting

* Rewrite principalsfile when adding principals

* Add update authorized_principals option to admin dashboard

* Handle non-primary emails

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add the command actually to the dashboard template

* Update models/ssh_key.go

Co-authored-by: silverwind <me@silverwind.io>

* By default do not show principal options unless there are CA keys set or they are explicitly set

Signed-off-by: Andrew Thornton <art27@cantab.net>

* allow settings when enabled

* Fix typos in TrustedUserCAKeys path

* Allow every CASignatureAlgorithms algorithm

As this depends on the content of TrustedUserCAKeys we should allow all
signature algorithms as admins can choose the specific algorithm on their
signing CA

* Update models/ssh_key.go

Co-authored-by: Lauris BH <lauris@nix.lv>

* Fix linting issue

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-10 20:38:09 -04:00
zeripath d65cd5677a
Change default log configuration (#13088)
* Change default log configuration

This PR changes the install page and the docker default
logging configuration to match the suggested configuration
that I repeatedly end up suggesting on issues.

It further improves the logging configuration docs to
recommend specific instructions for how to configure logs
for posting to issues.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update docs/content/doc/advanced/logging-documentation.en-us.md
2020-10-10 18:19:50 +03:00
zeripath ea69ec6f0f
Disable DSA ssh keys by default (#13056)
* Disable DSA ssh keys by default

OpenSSH has disabled DSA keys since version 7.0

As the docker runs openssh > v7.0 we should just disable
DSA keys by default.

Refers to #11417

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Just disable DSA keys by default

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Appears we need to set the minimum key sizes too

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Appears we need to set the minimum key sizes too

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove DSA type

* Fix Tests

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-10-09 09:52:57 +03:00
Kevin Schweikert f220286c00
Fix typo in README.md (#12369)
Changed Dockefile to Dockerfile
2020-07-29 09:29:51 -05:00
techknowlogick 366ca88eea
merge docker makefile into main one (#12289)
* merge docker makefile into main one

* add readme for docker folder

* don't include a file that doesn't exist anymore

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-21 16:41:03 -04:00
Cirno the Strongest 594db7fb43
Fix missing CGO_EXTRA_FLAGS build arg for docker (#11782)
Co-authored-by: zeripath <art27@cantab.net>
2020-06-06 17:42:32 -04:00
Adrian POIGET 99082eebd7
Fix; declare DOMAIN variable for docker setup (#10780)
In the /install form, the value for SSH Server Domain is taken form the DOMAIN variable
and overwrites SSH_DOMAIN environment variable set the first time if nothing done

Co-authored-by: Adrian POIGET <adrian.poiget@viveris.fr>
2020-05-04 10:50:29 +01:00
Lunny Xiao 48be1889cd Fix latest docker image haven't include static files. (#9252)
* add warnging on docs

* fix docs
2019-12-05 12:18:28 -05:00
Antoine GIRARD 6e578dd0c9 docker: ask s6 to stop all service when gitea stop (#9171)
* fix: ask s6 to stop all service when gitea stop

https://github.com/just-containers/s6-overlay#writing-an-optional-finish-script

* change service folder
2019-11-27 13:08:57 -05:00
zeripath 0a96e59884 Fix #8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT (#8477) 2019-10-12 23:45:00 +08:00