Compare commits
138 Commits
Author | SHA1 | Date | |
---|---|---|---|
f4923854f6 | |||
d590607106 | |||
4746291b08 | |||
022552d5b6 | |||
376fa0d8c4 | |||
be541d9877 | |||
ae99233db0 | |||
cbf366643b | |||
df694f6a7d | |||
84282c608c | |||
d1db2b7251 | |||
6493085aee | |||
fbf29f29b5 | |||
6e29242ebb | |||
56e722f825 | |||
80e564087d | |||
571822b6ec | |||
2a0fbe23b8 | |||
95901a99c0 | |||
cb33623bb6 | |||
9f0c709637 | |||
5e9fd0ab5e | |||
f220f4231a | |||
bce27d0a31 | |||
12f418a7e8 | |||
9865aa2394 | |||
def178ce32 | |||
2399b4d483 | |||
ad2cb9863c | |||
7f833d8f71 | |||
e67c819cf4 | |||
83457805bb | |||
3c79315cf2 | |||
3e1bd61000 | |||
18da3f8483 | |||
2165729d16 | |||
683b95f0da | |||
ff565a787f | |||
f7cca2a290 | |||
373e78895e | |||
8ec232817c | |||
a5c7ac9980 | |||
bf983735fd | |||
7a2786ca6c | |||
b2588338f0 | |||
8a46a6417e | |||
5b104a5533 | |||
f2add36a29 | |||
564068aa99 | |||
6a559ad634 | |||
4dd39eb54a | |||
acc8100d47 | |||
1a3803effd | |||
1183002b32 | |||
1fc6bc1be2 | |||
2360c7ec6c | |||
8ca32dc873 | |||
47f9b3f484 | |||
16263af971 | |||
f096635622 | |||
932e282e15 | |||
d9aeb1f09d | |||
411310d698 | |||
6d002f8e1e | |||
4462628a26 | |||
a3f403f438 | |||
8ee1ed877b | |||
2c2e00899d | |||
6cbb6f303a | |||
6af698fb81 | |||
94a05a492d | |||
6de862abdf | |||
b47482d58e | |||
74ab798033 | |||
97a0bf151a | |||
5e2bae7716 | |||
96d3fcf179 | |||
265f485295 | |||
f144521aea | |||
6f4d5c0b8c | |||
1ec622db24 | |||
40d51188c0 | |||
87db4a47c8 | |||
cd2dd5a67d | |||
46beb7f33f | |||
3107093394 | |||
272ae03341 | |||
b56a9f6ded | |||
c5c44d0951 | |||
8f2805f757 | |||
5eaf91e919 | |||
b7e3adc66c | |||
5b5f8aab19 | |||
fef34790bb | |||
8b590de186 | |||
5105d2093c | |||
08445d5d86 | |||
b71d4c3ec0 | |||
bf537adf8a | |||
8c8c24f8eb | |||
fee9c05ed3 | |||
e15fe85335 | |||
4f5122a7fe | |||
84e65afffd | |||
d2908b2794 | |||
24e03a125d | |||
76e892317b | |||
5001f63c07 | |||
6d22ca15ab | |||
ea9f5a57e4 | |||
96141e4e55 | |||
ca5f0c93c6 | |||
196100a07a | |||
bc3d8bff73 | |||
7f81110461 | |||
5ed0eefc9a | |||
4b89c0f996 | |||
7cae4dfc00 | |||
28b8e0b43e | |||
23838c2c2e | |||
f9763f1366 | |||
a2314ca9c5 | |||
994ba35f11 | |||
447422fe27 | |||
9bfee5014b | |||
7128929a0d | |||
efcbaf8fa8 | |||
c997e90738 | |||
ffab076b72 | |||
117d9a117f | |||
f8c5f202b7 | |||
7213506680 | |||
1f82be6604 | |||
56bedf2bcc | |||
f7567f798d | |||
93ede4bc83 | |||
9f63d27ec4 | |||
073d8c50dd |
.github/workflows
CHANGELOG.mdcmd
contrib/systemd
custom/conf
docs/content
administration
adding-legal-pages.en-us.mdadding-legal-pages.zh-cn.mdconfig-cheat-sheet.en-us.mdconfig-cheat-sheet.zh-cn.mdcustomizing-gitea.zh-cn.mdemail-setup.en-us.mdemail-setup.zh-cn.mdexternal-renderers.zh-cn.mdhttps-support.zh-cn.md
contributing
development
help
installation
usage
models
modules
actions
charset
context
doctor
git
blame.goblame_test.gocommand.gocommit.go
foreachref
repo_branch_gogit.gorepo_commit.gorepo_tag.gorepo_tag_test.gohighlight
indexer
markup
private
public
repository
setting
structs
templates
timeutil
util
web
webhook
options/locale
package-lock.jsonpackage.jsonrouters
api
actions
packages
v1
common
web
admin
auth
feed
githttp.goorg
repo
actions
blame.gobranch.gocommit.gocompare.goeditor.goissue.goissue_content_history.goissue_pin.gomilestone.goprojects.gopull.gorelease.gorender.gosetting
view.gowiki.goshared/user
user
web.goservices
actions
auth
convert
cron
forms
gitdiff
indexer
mailer
migrations
packages
pull
release
repository
user
webhook
deliver.godingtalk_test.godiscord_test.gofeishu_test.gogeneral_test.gomatrix.gomatrix_test.gomsteams.gomsteams_test.gopackagist_test.goslack_test.gotelegram_test.go
wiki
templates
base
code
explore
org
package
projects
repo
actions
activity.tmplbranch
commit_page.tmplcommits_list.tmplcommits_list_small.tmpldiff
editor
graph
header.tmplissue
migrate
projects
release
search.tmplsettings
view_file.tmplview_list.tmplshared
swagger
user
dashboard
notification
settings
tests
fuzz
integration
actions_trigger_test.goapi_branch_test.goapi_comment_attachment_test.goapi_comment_test.goapi_issue_reaction_test.goapi_keys_test.goapi_nodeinfo_test.goapi_packages_rpm_test.goapi_repo_get_contents_list_test.goapi_repo_get_contents_test.goapi_token_test.goapi_user_search_test.goapi_user_watch_test.gocors_test.goissue_test.gomigrate_test.gomirror_pull_test.goproject_test.gopull_merge_test.gorepo_test.go
web_src
css
js
components
features
modules
utils
webcomponents
9
.github/workflows/release-tag-rc.yml
vendored
9
.github/workflows/release-tag-rc.yml
vendored
@ -44,7 +44,7 @@ jobs:
|
||||
- name: Get cleaned branch name
|
||||
id: clean_name
|
||||
run: |
|
||||
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
|
||||
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\/v//' -e 's/release\/v//')
|
||||
echo "Cleaned name is ${REF_NAME}"
|
||||
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||
- name: configure aws
|
||||
@ -56,6 +56,10 @@ jobs:
|
||||
- name: upload binaries to s3
|
||||
run: |
|
||||
aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
|
||||
- name: Install GH CLI
|
||||
uses: dev-hanz-ops/install-gh-cli-action@v0.1.0
|
||||
with:
|
||||
gh-cli-version: 2.39.1
|
||||
- name: create github release
|
||||
run: |
|
||||
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/*
|
||||
@ -74,6 +78,8 @@ jobs:
|
||||
id: meta
|
||||
with:
|
||||
images: gitea/gitea
|
||||
flavor: |
|
||||
latest=false
|
||||
# 1.2.3-rc0
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
@ -105,6 +111,7 @@ jobs:
|
||||
images: gitea/gitea
|
||||
# each tag below will have the suffix of -rootless
|
||||
flavor: |
|
||||
latest=false
|
||||
suffix=-rootless
|
||||
# 1.2.3-rc0
|
||||
tags: |
|
||||
|
12
.github/workflows/release-tag-version.yml
vendored
12
.github/workflows/release-tag-version.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
||||
- name: Get cleaned branch name
|
||||
id: clean_name
|
||||
run: |
|
||||
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
|
||||
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\/v//' -e 's/release\/v//')
|
||||
echo "Cleaned name is ${REF_NAME}"
|
||||
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||
- name: configure aws
|
||||
@ -58,9 +58,13 @@ jobs:
|
||||
- name: upload binaries to s3
|
||||
run: |
|
||||
aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
|
||||
- name: Install GH CLI
|
||||
uses: dev-hanz-ops/install-gh-cli-action@v0.1.0
|
||||
with:
|
||||
gh-cli-version: 2.39.1
|
||||
- name: create github release
|
||||
run: |
|
||||
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/*
|
||||
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-from-tag dist/release/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
docker-rootful:
|
||||
@ -82,7 +86,6 @@ jobs:
|
||||
# 1.2
|
||||
# 1.2.3
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=semver,pattern={{major}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{version}}
|
||||
@ -114,14 +117,13 @@ jobs:
|
||||
images: gitea/gitea
|
||||
# each tag below will have the suffix of -rootless
|
||||
flavor: |
|
||||
suffix=-rootless
|
||||
suffix=-rootless,onlatest=true
|
||||
# this will generate tags in the following format (with -rootless suffix added):
|
||||
# latest
|
||||
# 1
|
||||
# 1.2
|
||||
# 1.2.3
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=semver,pattern={{major}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{version}}
|
||||
|
148
CHANGELOG.md
148
CHANGELOG.md
@ -4,6 +4,154 @@ This changelog goes through all the changes that have been made in each release
|
||||
without substantial changes to our git log; to see the highlights of what has
|
||||
been added to each release, please refer to the [blog](https://blog.gitea.com).
|
||||
|
||||
## [1.21.4](https://github.com/go-gitea/gitea/releases/tag/1.21.4) - 2024-01-16
|
||||
|
||||
* SECURITY
|
||||
* Update github.com/cloudflare/circl (#28789) (#28790)
|
||||
* Require token for GET subscription endpoint (#28765) (#28768)
|
||||
* BUGFIXES
|
||||
* Use refname:strip-2 instead of refname:short when syncing tags (#28797) (#28811)
|
||||
* Fix links in issue card (#28806) (#28807)
|
||||
* Fix nil pointer panic when exec some gitea cli command (#28791) (#28795)
|
||||
* Require token for GET subscription endpoint (#28765) (#28778)
|
||||
* Fix button size in "attached header right" (#28770) (#28774)
|
||||
* Fix `convert.ToTeams` on empty input (#28426) (#28767)
|
||||
* Hide code related setting options in repository when code unit is disabled (#28631) (#28749)
|
||||
* Fix incorrect URL for "Reference in New Issue" (#28716) (#28723)
|
||||
* Fix panic when parsing empty pgsql host (#28708) (#28709)
|
||||
* Upgrade xorm to new version which supported update join for all supported databases (#28590) (#28668)
|
||||
* Fix alpine package files are not rebuilt (#28638) (#28665)
|
||||
* Avoid cycle-redirecting user/login page (#28636) (#28658)
|
||||
* Fix empty ref for cron workflow runs (#28640) (#28647)
|
||||
* Remove unnecessary syncbranchToDB with tests (#28624) (#28629)
|
||||
* Use known issue IID to generate new PR index number when migrating from GitLab (#28616) (#28618)
|
||||
* Fix flex container width (#28603) (#28605)
|
||||
* Fix the scroll behavior for emoji/mention list (#28597) (#28601)
|
||||
* Fix wrong due date rendering in issue list page (#28588) (#28591)
|
||||
* Fix `status_check_contexts` matching bug (#28582) (#28589)
|
||||
* Fix 500 error of searching commits (#28576) (#28579)
|
||||
* Use information from previous blame parts (#28572) (#28577)
|
||||
* Update mermaid for 1.21 (#28571)
|
||||
* Fix 405 method not allowed CORS / OIDC (#28583) (#28586) (#28587) (#28611)
|
||||
* Fix `GetCommitStatuses` (#28787) (#28804)
|
||||
* Forbid removing the last admin user (#28337) (#28793)
|
||||
* Fix schedule tasks bugs (#28691) (#28780)
|
||||
* Fix issue dependencies (#27736) (#28776)
|
||||
* Fix system webhooks API bug (#28531) (#28666)
|
||||
* Fix when private user following user, private user will not be counted in his own view (#28037) (#28792)
|
||||
* Render code block in activity tab (#28816) (#28818)
|
||||
* ENHANCEMENTS
|
||||
* Rework markup link rendering (#26745) (#28803)
|
||||
* Modernize merge button (#28140) (#28786)
|
||||
* Speed up loading the dashboard on mysql/mariadb (#28546) (#28784)
|
||||
* Assign pull request to project during creation (#28227) (#28775)
|
||||
* Show description as tooltip instead of title for labels (#28754) (#28766)
|
||||
* Make template `DateTime` show proper tooltip (#28677) (#28683)
|
||||
* Switch destination directory for apt signing keys (#28639) (#28642)
|
||||
* Include heap pprof in diagnosis report to help debugging memory leaks (#28596) (#28599)
|
||||
* DOCS
|
||||
* Suggest to use Type=simple for systemd service (#28717) (#28722)
|
||||
* Extend description for ARTIFACT_RETENTION_DAYS (#28626) (#28630)
|
||||
* MISC
|
||||
* Add -F to commit search to treat keywords as strings (#28744) (#28748)
|
||||
* Add download attribute to release attachments (#28739) (#28740)
|
||||
* Concatenate error in `checkIfPRContentChanged` (#28731) (#28737)
|
||||
* Improve 1.21 document for Database Preparation (#28643) (#28644)
|
||||
|
||||
## [1.21.3](https://github.com/go-gitea/gitea/releases/tag/1.21.3) - 2023-12-21
|
||||
|
||||
* SECURITY
|
||||
* Update golang.org/x/crypto (#28519)
|
||||
* API
|
||||
* chore(api): support ignore password if login source type is LDAP for creating user API (#28491) (#28525)
|
||||
* Add endpoint for not implemented Docker auth (#28457) (#28462)
|
||||
* ENHANCEMENTS
|
||||
* Add option to disable ambiguous unicode characters detection (#28454) (#28499)
|
||||
* Refactor SSH clone URL generation code (#28421) (#28480)
|
||||
* Polyfill SubmitEvent for PaleMoon (#28441) (#28478)
|
||||
* BUGFIXES
|
||||
* Fix the issue ref rendering for wiki (#28556) (#28559)
|
||||
* Fix duplicate ID when deleting repo (#28520) (#28528)
|
||||
* Only check online runner when detecting matching runners in workflows (#28286) (#28512)
|
||||
* Initalize stroage for orphaned repository doctor (#28487) (#28490)
|
||||
* Fix possible nil pointer access (#28428) (#28440)
|
||||
* Don't show unnecessary citation JS error on UI (#28433) (#28437)
|
||||
* DOCS
|
||||
* Update actions document about comparsion as Github Actions (#28560) (#28564)
|
||||
* Fix documents for "custom/public/assets/" (#28465) (#28467)
|
||||
* MISC
|
||||
* Fix inperformant query on retrifing review from database. (#28552) (#28562)
|
||||
* Improve the prompt for "ssh-keygen sign" (#28509) (#28510)
|
||||
* Update docs for DISABLE_QUERY_AUTH_TOKEN (#28485) (#28488)
|
||||
* Fix Chinese translation of config cheat sheet[API] (#28472) (#28473)
|
||||
* Retry SSH key verification with additional CRLF if it failed (#28392) (#28464)
|
||||
|
||||
## [1.21.2](https://github.com/go-gitea/gitea/releases/tag/1.21.2) - 2023-12-12
|
||||
|
||||
* SECURITY
|
||||
* Rebuild with recently released golang version
|
||||
* Fix missing check (#28406) (#28411)
|
||||
* Do some missing checks (#28423) (#28432)
|
||||
* BUGFIXES
|
||||
* Fix margin in server signed signature verification view (#28379) (#28381)
|
||||
* Fix object does not exist error when checking citation file (#28314) (#28369)
|
||||
* Use `filepath` instead of `path` to create SQLite3 database file (#28374) (#28378)
|
||||
* Fix the runs will not be displayed bug when the main branch have no workflows but other branches have (#28359) (#28365)
|
||||
* Handle repository.size column being NULL in migration v263 (#28336) (#28363)
|
||||
* Convert git commit summary to valid UTF8. (#28356) (#28358)
|
||||
* Fix migration panic due to an empty review comment diff (#28334) (#28362)
|
||||
* Add `HEAD` support for rpm repo files (#28309) (#28360)
|
||||
* Fix RPM/Debian signature key creation (#28352) (#28353)
|
||||
* Keep profile tab when clicking on Language (#28320) (#28331)
|
||||
* Fix missing issue search index update when changing status (#28325) (#28330)
|
||||
* Fix wrong link in `protect_branch_name_pattern_desc` (#28313) (#28315)
|
||||
* Read `previous` info from git blame (#28306) (#28310)
|
||||
* Ignore "non-existing" errors when getDirectorySize calculates the size (#28276) (#28285)
|
||||
* Use appSubUrl for OAuth2 callback URL tip (#28266) (#28275)
|
||||
* Meilisearch: require all query terms to be matched (#28293) (#28296)
|
||||
* Fix required error for token name (#28267) (#28284)
|
||||
* Fix issue will be detected as pull request when checking `First-time contributor` (#28237) (#28271)
|
||||
* Use full width for project boards (#28225) (#28245)
|
||||
* Increase "version" when update the setting value to a same value as before (#28243) (#28244)
|
||||
* Also sync DB branches on push if necessary (#28361) (#28403)
|
||||
* Make gogit Repository.GetBranchNames consistent (#28348) (#28386)
|
||||
* Recover from panic in cron task (#28409) (#28425)
|
||||
* Deprecate query string auth tokens (#28390) (#28430)
|
||||
* ENHANCEMENTS
|
||||
* Improve doctor cli behavior (#28422) (#28424)
|
||||
* Fix margin in server signed signature verification view (#28379) (#28381)
|
||||
* Refactor template empty checks (#28351) (#28354)
|
||||
* Read `previous` info from git blame (#28306) (#28310)
|
||||
* Use full width for project boards (#28225) (#28245)
|
||||
* Enable system users search via the API (#28013) (#28018)
|
||||
|
||||
## [1.21.1](https://github.com/go-gitea/gitea/releases/tag/1.21.1) - 2023-11-26
|
||||
|
||||
* SECURITY
|
||||
* Fix comment permissions (#28213) (#28216)
|
||||
* BUGFIXES
|
||||
* Fix delete-orphaned-repos (#28200) (#28202)
|
||||
* Make CORS work for oauth2 handlers (#28184) (#28185)
|
||||
* Fix missing buttons (#28179) (#28181)
|
||||
* Fix no ActionTaskOutput table waring (#28149) (#28152)
|
||||
* Fix empty action run title (#28113) (#28148)
|
||||
* Use "is-loading" to avoid duplicate form submit for code comment (#28143) (#28147)
|
||||
* Fix Matrix and MSTeams nil dereference (#28089) (#28105)
|
||||
* Fix incorrect pgsql conn builder behavior (#28085) (#28098)
|
||||
* Fix system config cache expiration timing (#28072) (#28090)
|
||||
* Restricted users only see repos in orgs which their team was assigned to (#28025) (#28051)
|
||||
* API
|
||||
* Fix permissions for Token DELETE endpoint to match GET and POST (#27610) (#28099)
|
||||
* ENHANCEMENTS
|
||||
* Do not display search box when there's no packages yet (#28146) (#28159)
|
||||
* Add missing `packages.cleanup.success` (#28129) (#28132)
|
||||
* DOCS
|
||||
* Docs: Replace deprecated IS_TLS_ENABLED mailer setting in email setup (#28205) (#28208)
|
||||
* Fix the description about the default setting for action in quick start document (#28160) (#28168)
|
||||
* Add guide page to actions when there's no workflows (#28145) (#28153)
|
||||
* MISC
|
||||
* Use full width for PR comparison (#28182) (#28186)
|
||||
|
||||
## [1.21.0](https://github.com/go-gitea/gitea/releases/tag/v1.21.0) - 2023-11-14
|
||||
|
||||
* BREAKING
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/migrations"
|
||||
migrate_base "code.gitea.io/gitea/models/migrations/base"
|
||||
"code.gitea.io/gitea/modules/container"
|
||||
"code.gitea.io/gitea/modules/doctor"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
@ -22,6 +23,19 @@ import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// CmdDoctor represents the available doctor sub-command.
|
||||
var CmdDoctor = &cli.Command{
|
||||
Name: "doctor",
|
||||
Usage: "Diagnose and optionally fix problems",
|
||||
Description: "A command to diagnose problems with the current Gitea instance according to the given configuration. Some problems can optionally be fixed by modifying the database or data storage.",
|
||||
|
||||
Subcommands: []*cli.Command{
|
||||
cmdDoctorCheck,
|
||||
cmdRecreateTable,
|
||||
cmdDoctorConvert,
|
||||
},
|
||||
}
|
||||
|
||||
var cmdDoctorCheck = &cli.Command{
|
||||
Name: "check",
|
||||
Usage: "Diagnose and optionally fix problems",
|
||||
@ -60,19 +74,6 @@ var cmdDoctorCheck = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
// CmdDoctor represents the available doctor sub-command.
|
||||
var CmdDoctor = &cli.Command{
|
||||
Name: "doctor",
|
||||
Usage: "Diagnose and optionally fix problems",
|
||||
Description: "A command to diagnose problems with the current Gitea instance according to the given configuration. Some problems can optionally be fixed by modifying the database or data storage.",
|
||||
|
||||
Subcommands: []*cli.Command{
|
||||
cmdDoctorCheck,
|
||||
cmdRecreateTable,
|
||||
cmdDoctorConvert,
|
||||
},
|
||||
}
|
||||
|
||||
var cmdRecreateTable = &cli.Command{
|
||||
Name: "recreate-table",
|
||||
Usage: "Recreate tables from XORM definitions and copy the data.",
|
||||
@ -177,6 +178,7 @@ func runDoctorCheck(ctx *cli.Context) error {
|
||||
if ctx.IsSet("list") {
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
|
||||
_, _ = w.Write([]byte("Default\tName\tTitle\n"))
|
||||
doctor.SortChecks(doctor.Checks)
|
||||
for _, check := range doctor.Checks {
|
||||
if check.IsDefault {
|
||||
_, _ = w.Write([]byte{'*'})
|
||||
@ -192,26 +194,20 @@ func runDoctorCheck(ctx *cli.Context) error {
|
||||
|
||||
var checks []*doctor.Check
|
||||
if ctx.Bool("all") {
|
||||
checks = doctor.Checks
|
||||
checks = make([]*doctor.Check, len(doctor.Checks))
|
||||
copy(checks, doctor.Checks)
|
||||
} else if ctx.IsSet("run") {
|
||||
addDefault := ctx.Bool("default")
|
||||
names := ctx.StringSlice("run")
|
||||
for i, name := range names {
|
||||
names[i] = strings.ToLower(strings.TrimSpace(name))
|
||||
}
|
||||
|
||||
runNamesSet := container.SetOf(ctx.StringSlice("run")...)
|
||||
for _, check := range doctor.Checks {
|
||||
if addDefault && check.IsDefault {
|
||||
if (addDefault && check.IsDefault) || runNamesSet.Contains(check.Name) {
|
||||
checks = append(checks, check)
|
||||
continue
|
||||
}
|
||||
for _, name := range names {
|
||||
if name == check.Name {
|
||||
checks = append(checks, check)
|
||||
break
|
||||
}
|
||||
runNamesSet.Remove(check.Name)
|
||||
}
|
||||
}
|
||||
if len(runNamesSet) > 0 {
|
||||
return fmt.Errorf("unknown checks: %q", strings.Join(runNamesSet.Values(), ","))
|
||||
}
|
||||
} else {
|
||||
for _, check := range doctor.Checks {
|
||||
if check.IsDefault {
|
||||
@ -219,6 +215,5 @@ func runDoctorCheck(ctx *cli.Context) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return doctor.RunChecks(stdCtx, colorize, ctx.Bool("fix"), checks)
|
||||
}
|
||||
|
33
cmd/doctor_test.go
Normal file
33
cmd/doctor_test.go
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2023 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/doctor"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func TestDoctorRun(t *testing.T) {
|
||||
doctor.Register(&doctor.Check{
|
||||
Title: "Test Check",
|
||||
Name: "test-check",
|
||||
Run: func(ctx context.Context, logger log.Logger, autofix bool) error { return nil },
|
||||
|
||||
SkipDatabaseInitialization: true,
|
||||
})
|
||||
app := cli.NewApp()
|
||||
app.Commands = []*cli.Command{cmdDoctorCheck}
|
||||
err := app.Run([]string{"./gitea", "check", "--run", "test-check"})
|
||||
assert.NoError(t, err)
|
||||
err = app.Run([]string{"./gitea", "check", "--run", "no-such"})
|
||||
assert.ErrorContains(t, err, `unknown checks: "no-such"`)
|
||||
err = app.Run([]string{"./gitea", "check", "--run", "test-check,no-such"})
|
||||
assert.ErrorContains(t, err, `unknown checks: "no-such"`)
|
||||
}
|
@ -52,7 +52,7 @@ After=network.target
|
||||
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
|
||||
# LimitNOFILE=524288:524288
|
||||
RestartSec=2s
|
||||
Type=notify
|
||||
Type=simple
|
||||
User=git
|
||||
Group=git
|
||||
WorkingDirectory=/var/lib/gitea/
|
||||
@ -62,7 +62,6 @@ WorkingDirectory=/var/lib/gitea/
|
||||
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
|
||||
Restart=always
|
||||
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
|
||||
WatchdogSec=30s
|
||||
# If you install Git to directory prefix other than default PATH (which happens
|
||||
# for example if you install other versions of Git side-to-side with
|
||||
# distribution version), uncomment below line and add that prefix to PATH
|
||||
|
@ -491,6 +491,11 @@ INTERNAL_TOKEN=
|
||||
;; Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations.
|
||||
;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
|
||||
;SUCCESSFUL_TOKENS_CACHE_SIZE = 20
|
||||
;;
|
||||
;; Reject API tokens sent in URL query string (Accept Header-based API tokens only). This avoids security vulnerabilities
|
||||
;; stemming from cached/logged plain-text API tokens.
|
||||
;; In future releases, this will become the default behavior
|
||||
;DISABLE_QUERY_AUTH_TOKEN = false
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -1151,15 +1156,9 @@ LEVEL = Info
|
||||
;; enable cors headers (disabled by default)
|
||||
;ENABLED = false
|
||||
;;
|
||||
;; scheme of allowed requests
|
||||
;SCHEME = http
|
||||
;;
|
||||
;; list of requesting domains that are allowed
|
||||
;; list of requesting origins that are allowed, eg: "https://*.example.com"
|
||||
;ALLOW_DOMAIN = *
|
||||
;;
|
||||
;; allow subdomains of headers listed above to request
|
||||
;ALLOW_SUBDOMAIN = false
|
||||
;;
|
||||
;; list of methods allowed to request
|
||||
;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
|
||||
;;
|
||||
@ -1205,6 +1204,9 @@ LEVEL = Info
|
||||
;; Max size of files to be displayed (default is 8MiB)
|
||||
;MAX_DISPLAY_FILE_SIZE = 8388608
|
||||
;;
|
||||
;; Detect ambiguous unicode characters in file contents and show warnings on the UI
|
||||
;AMBIGUOUS_UNICODE_DETECTION = true
|
||||
;;
|
||||
;; Whether the email of the user should be shown in the Explore Users page
|
||||
;SHOW_USER_EMAIL = true
|
||||
;;
|
||||
@ -2569,7 +2571,7 @@ LEVEL = Info
|
||||
;;
|
||||
;; Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
|
||||
;DEFAULT_ACTIONS_URL = github
|
||||
;; Default artifact retention time in days, default is 90 days
|
||||
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
|
||||
;ARTIFACT_RETENTION_DAYS = 90
|
||||
;; Timeout to stop the task which have running status, but haven't been updated for a long time
|
||||
;ZOMBIE_TASK_TIMEOUT = 10m
|
||||
|
@ -19,10 +19,10 @@ Some jurisdictions (such as EU), requires certain legal pages (e.g. Privacy Poli
|
||||
|
||||
## Getting Pages
|
||||
|
||||
Gitea source code ships with sample pages, available in `contrib/legal` directory. Copy them to `custom/public/`. For example, to add Privacy Policy:
|
||||
Gitea source code ships with sample pages, available in `contrib/legal` directory. Copy them to `custom/public/assets/`. For example, to add Privacy Policy:
|
||||
|
||||
```
|
||||
wget -O /path/to/custom/public/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
|
||||
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
|
||||
```
|
||||
|
||||
Now you need to edit the page to meet your requirements. In particular you must change the email addresses, web addresses and references to "Your Gitea Instance" to match your situation.
|
||||
|
@ -19,10 +19,10 @@ menu:
|
||||
|
||||
## 获取页面
|
||||
|
||||
Gitea 源代码附带了示例页面,位于 `contrib/legal` 目录中。将它们复制到 `custom/public/` 目录下。例如,如果要添加隐私政策:
|
||||
Gitea 源代码附带了示例页面,位于 `contrib/legal` 目录中。将它们复制到 `custom/public/assets/` 目录下。例如,如果要添加隐私政策:
|
||||
|
||||
```
|
||||
wget -O /path/to/custom/public/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
|
||||
wget -O /path/to/custom/public/assets/privacy.html https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/legal/privacy.html.sample
|
||||
```
|
||||
|
||||
现在,你需要编辑该页面以满足你的需求。特别是,你必须更改电子邮件地址、网址以及与 "Your Gitea Instance" 相关的引用,以匹配你的情况。
|
||||
|
@ -196,9 +196,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||
## CORS (`cors`)
|
||||
|
||||
- `ENABLED`: **false**: enable cors headers (disabled by default)
|
||||
- `SCHEME`: **http**: scheme of allowed requests
|
||||
- `ALLOW_DOMAIN`: **\***: list of requesting domains that are allowed
|
||||
- `ALLOW_SUBDOMAIN`: **false**: allow subdomains of headers listed above to request
|
||||
- `ALLOW_DOMAIN`: **\***: list of requesting origins that are allowed, eg: "https://*.example.com"
|
||||
- `METHODS`: **GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS**: list of methods allowed to request
|
||||
- `MAX_AGE`: **10m**: max time to cache response
|
||||
- `ALLOW_CREDENTIALS`: **false**: allow request with credentials
|
||||
@ -220,6 +218,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||
- `THEMES`: **auto,gitea,arc-green**: All available themes. Allow users select personalized themes.
|
||||
regardless of the value of `DEFAULT_THEME`.
|
||||
- `MAX_DISPLAY_FILE_SIZE`: **8388608**: Max size of files to be displayed (default is 8MiB)
|
||||
- `AMBIGUOUS_UNICODE_DETECTION`: **true**: Detect ambiguous unicode characters in file contents and show warnings on the UI
|
||||
- `REACTIONS`: All available reactions users can choose on issues/prs and comments
|
||||
Values can be emoji alias (:smile:) or a unicode emoji.
|
||||
For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png
|
||||
@ -341,7 +340,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set.
|
||||
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
||||
- `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**: Enable SSH Authorized Principals Backup when rewriting all keys, default is true if `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
||||
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}**: Set the template for the command to passed on authorized keys. Possible keys are: AppPath, AppWorkPath, CustomConf, CustomPath, Key - where Key is a `models/asymkey.PublicKey` and the others are strings which are shellquoted.
|
||||
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **`{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}`**: Set the template for the command to passed on authorized keys. Possible keys are: AppPath, AppWorkPath, CustomConf, CustomPath, Key - where Key is a `models/asymkey.PublicKey` and the others are strings which are shellquoted.
|
||||
- `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**: For the built-in SSH server, choose the ciphers to support for SSH connections, for system SSH this setting has no effect.
|
||||
- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**: For the built-in SSH server, choose the key exchange algorithms to support for SSH connections, for system SSH this setting has no effect.
|
||||
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect
|
||||
@ -571,6 +570,7 @@ And the following unique queues:
|
||||
- off - do not check password complexity
|
||||
- `PASSWORD_CHECK_PWN`: **false**: Check [HaveIBeenPwned](https://haveibeenpwned.com/Passwords) to see if a password has been exposed.
|
||||
- `SUCCESSFUL_TOKENS_CACHE_SIZE`: **20**: Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations. This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
|
||||
- `DISABLE_QUERY_AUTH_TOKEN`: **false**: Reject API tokens sent in URL query string (Accept Header-based API tokens only). This setting will default to `true` in Gitea 1.23 and be deprecated in Gitea 1.24.
|
||||
|
||||
## Camo (`camo`)
|
||||
|
||||
@ -1391,7 +1391,7 @@ PROXY_HOSTS = *.github.com
|
||||
- `DEFAULT_ACTIONS_URL`: **github**: Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
|
||||
- `STORAGE_TYPE`: **local**: Storage type for actions logs, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]`
|
||||
- `MINIO_BASE_PATH`: **actions_log/**: Minio base path on the bucket only available when STORAGE_TYPE is `minio`
|
||||
- `ARTIFACT_RETENTION_DAYS`: **90**: Number of days to keep artifacts. Set to 0 to disable artifact retention. Default is 90 days if not set.
|
||||
- `ARTIFACT_RETENTION_DAYS`: **90**: Default number of days to keep artifacts. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
|
||||
- `ZOMBIE_TASK_TIMEOUT`: **10m**: Timeout to stop the task which have running status, but haven't been updated for a long time
|
||||
- `ENDLESS_TASK_TIMEOUT`: **3h**: Timeout to stop the tasks which have running status and continuous updates, but don't end for a long time
|
||||
- `ABANDONED_JOB_TIMEOUT`: **24h**: Timeout to cancel the jobs which have waiting status, but haven't been picked by a runner for a long time
|
||||
@ -1404,7 +1404,7 @@ Please note that using `self` is not recommended for most cases, as it could mak
|
||||
Additionally, it requires you to mirror all the actions you need to your Gitea instance, which may not be worth it.
|
||||
Therefore, please use `self` only if you understand what you are doing.
|
||||
|
||||
In earlier versions (<= 1.19), `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`.
|
||||
In earlier versions (`<= 1.19`), `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`.
|
||||
However, later updates removed those options, and now the only options are `github` and `self`, with the default value being `github`.
|
||||
However, if you want to use actions from other git server, you can use a complete URL in `uses` field, it's supported by Gitea (but not GitHub).
|
||||
Like `uses: https://gitea.com/actions/checkout@v3` or `uses: http://your-git-server/actions/checkout@v3`.
|
||||
|
@ -195,9 +195,7 @@ menu:
|
||||
## 跨域 (`cors`)
|
||||
|
||||
- `ENABLED`: **false**: 启用 CORS 头部(默认禁用)
|
||||
- `SCHEME`: **http**: 允许请求的协议
|
||||
- `ALLOW_DOMAIN`: **\***: 允许请求的域名列表
|
||||
- `ALLOW_SUBDOMAIN`: **false**: 允许上述列出的头部的子域名发出请求。
|
||||
- `METHODS`: **GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS**: 允许发起的请求方式列表
|
||||
- `MAX_AGE`: **10m**: 缓存响应的最大时间
|
||||
- `ALLOW_CREDENTIALS`: **false**: 允许带有凭据的请求
|
||||
@ -335,7 +333,7 @@ menu:
|
||||
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** 或 **username, email**:\[off, username, email, anything\]:指定允许用户用作 principal 的值。当设置为 `anything` 时,对 principal 字符串不执行任何检查。当设置为 `off` 时,不允许设置授权的 principal。
|
||||
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**:当 Gitea 不使用内置 SSH 服务器且 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off` 时,默认情况下 Gitea 会创建一个 authorized_principals 文件。
|
||||
- `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**:在重写所有密钥时启用 SSH 授权 principal 备份,默认值为 true(如果 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off`)。
|
||||
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}**:设置用于传递授权密钥的命令模板。可能的密钥是:AppPath、AppWorkPath、CustomConf、CustomPath、Key,其中 Key 是 `models/asymkey.PublicKey`,其他是 shellquoted 字符串。
|
||||
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **`{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}`**:设置用于传递授权密钥的命令模板。可能的密钥是:AppPath、AppWorkPath、CustomConf、CustomPath、Key,其中 Key 是 `models/asymkey.PublicKey`,其他是 shellquoted 字符串。
|
||||
- `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**:对于内置的 SSH 服务器,选择支持的 SSH 连接的加密方法,对于系统 SSH,此设置无效。
|
||||
- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**:对于内置 SSH 服务器,选择支持的 SSH 连接的密钥交换算法,对于系统 SSH,此设置无效。
|
||||
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**:对于内置 SSH 服务器,选择支持的 SSH 连接的 MAC 算法,对于系统 SSH,此设置无效。
|
||||
@ -1040,10 +1038,11 @@ Gitea 创建以下非唯一队列:
|
||||
|
||||
## API (`api`)
|
||||
|
||||
- `ENABLE_SWAGGER`: **true**: 是否启用swagger路由 (`/api/swagger`, `/api/v1/swagger`, …)。
|
||||
- `MAX_RESPONSE_ITEMS`: **50**: 单个页面的最大 Feed.
|
||||
- `ENABLE_OPENID_SIGNIN`: **false**: 允许使用OpenID登录,当设置为`true`时可以通过 `/user/login` 页面进行OpenID登录。
|
||||
- `DISABLE_REGISTRATION`: **false**: 关闭用户注册。
|
||||
- `ENABLE_SWAGGER`: **true**: 启用API文档接口 (`/api/swagger`, `/api/v1/swagger`, …). True or false。
|
||||
- `MAX_RESPONSE_ITEMS`: **50**: API分页的最大单页项目数。
|
||||
- `DEFAULT_PAGING_NUM`: **30**: API分页的默认分页数。
|
||||
- `DEFAULT_GIT_TREES_PER_PAGE`: **1000**: Git trees API的默认单页项目数。
|
||||
- `DEFAULT_MAX_BLOB_SIZE`: **10485760** (10MiB): blobs API的默认最大文件大小。
|
||||
|
||||
## OAuth2 (`oauth2`)
|
||||
|
||||
@ -1344,7 +1343,7 @@ PROXY_HOSTS = *.github.com
|
||||
此外,它要求您将所有所需的操作镜像到您的 Gitea 实例,这可能不值得。
|
||||
因此,请仅在您了解自己在做什么的情况下使用 `self`。
|
||||
|
||||
在早期版本(<= 1.19)中,`DEFAULT_ACTIONS_URL` 可以设置为任何自定义 URL,例如 `https://gitea.com` 或 `http://your-git-server,https://gitea.com`,默认值为 `https://gitea.com`。
|
||||
在早期版本(`<= 1.19`)中,`DEFAULT_ACTIONS_URL` 可以设置为任何自定义 URL,例如 `https://gitea.com` 或 `http://your-git-server,https://gitea.com`,默认值为 `https://gitea.com`。
|
||||
然而,后来的更新删除了这些选项,现在唯一的选项是 `github` 和 `self`,默认值为 `github`。
|
||||
但是,如果您想要使用其他 Git 服务器中的操作,您可以在 `uses` 字段中使用完整的 URL,Gitea 支持此功能(GitHub 不支持)。
|
||||
例如 `uses: https://gitea.com/actions/checkout@v3` 或 `uses: http://your-git-server/actions/checkout@v3`。
|
||||
|
@ -42,11 +42,11 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板
|
||||
|
||||
将自定义的公共文件(比如页面和图片)作为 webroot 放在 `custom/public/` 中来让 Gitea 提供这些自定义内容(符号链接将被追踪)。
|
||||
|
||||
举例说明:`image.png` 存放在 `custom/public/`中,那么它可以通过链接 http://gitea.domain.tld/assets/image.png 访问。
|
||||
举例说明:`image.png` 存放在 `custom/public/assets/`中,那么它可以通过链接 http://gitea.domain.tld/assets/image.png 访问。
|
||||
|
||||
## 修改默认头像
|
||||
|
||||
替换以下目录中的 png 图片: `custom/public/img/avatar\_default.png`
|
||||
替换以下目录中的 png 图片: `custom/public/assets/img/avatar\_default.png`
|
||||
|
||||
## 自定义 Gitea 页面
|
||||
|
||||
|
@ -61,7 +61,7 @@ Please note: authentication is only supported when the SMTP server communication
|
||||
|
||||
- STARTTLS (also known as Opportunistic TLS) via port 587. Initial connection is done over cleartext, but then be upgraded over TLS if the server supports it.
|
||||
- SMTPS connection (SMTP over TLS) via the default port 465. Connection to the server use TLS from the beginning.
|
||||
- Forced SMTPS connection with `IS_TLS_ENABLED=true`. (These are both known as Implicit TLS.)
|
||||
- Forced SMTPS connection with `PROTOCOL=smtps`. (These are both known as Implicit TLS.)
|
||||
This is due to protections imposed by the Go internal libraries against STRIPTLS attacks.
|
||||
|
||||
Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/rfc8314#section-3) since 2018.
|
||||
|
@ -55,13 +55,13 @@ PASSWD = `password`
|
||||
|
||||
要发送测试邮件以验证设置,请转到 Gitea > 站点管理 > 配置 > SMTP 邮件配置。
|
||||
|
||||
有关所有选项的完整列表,请查看[配置速查表](doc/administration/config-cheat-sheet.zh-cn.md)。
|
||||
有关所有选项的完整列表,请查看[配置速查表](administration/config-cheat-sheet.md)。
|
||||
|
||||
请注意:只有在使用 TLS 或 `HOST=localhost` 加密 SMTP 服务器通信时才支持身份验证。TLS 加密可以通过以下方式进行:
|
||||
|
||||
- 通过端口 587 的 STARTTLS(也称为 Opportunistic TLS)。初始连接是明文的,但如果服务器支持,则可以升级为 TLS。
|
||||
- 通过默认端口 465 的 SMTPS 连接。连接到服务器从一开始就使用 TLS。
|
||||
- 使用 `IS_TLS_ENABLED=true` 进行强制的 SMTPS 连接。(这两种方式都被称为 Implicit TLS)
|
||||
- 使用 `PROTOCOL=smtps` 进行强制的 SMTPS 连接。(这两种方式都被称为 Implicit TLS)
|
||||
这是由于 Go 内部库对 STRIPTLS 攻击的保护机制。
|
||||
|
||||
请注意,自2018年起,[RFC8314](https://tools.ietf.org/html/rfc8314#section-3) 推荐使用 Implicit TLS。
|
||||
|
@ -194,7 +194,7 @@ ALLOW_DATA_URI_IMAGES = true
|
||||
}
|
||||
```
|
||||
|
||||
将您的样式表添加到自定义目录中,例如 `custom/public/css/my-style-XXXXX.css`,并使用自定义的头文件 `custom/templates/custom/header.tmpl` 进行导入:
|
||||
将您的样式表添加到自定义目录中,例如 `custom/public/assets/css/my-style-XXXXX.css`,并使用自定义的头文件 `custom/templates/custom/header.tmpl` 进行导入:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/assets/css/my-style-XXXXX.css" />
|
||||
|
@ -33,7 +33,7 @@ CERT_FILE = cert.pem
|
||||
KEY_FILE = key.pem
|
||||
```
|
||||
|
||||
请注意,如果您的证书由第三方证书颁发机构签名(即不是自签名的),则 cert.pem 应包含证书链。服务器证书必须是 cert.pem 中的第一个条目,后跟中介(如果有)。不必包含根证书,因为连接客户端必须已经拥有根证书才能建立信任关系。要了解有关配置值的更多信息,请查看 [配置备忘单](../config-cheat-sheet#server-server)。
|
||||
请注意,如果您的证书由第三方证书颁发机构签名(即不是自签名的),则 cert.pem 应包含证书链。服务器证书必须是 cert.pem 中的第一个条目,后跟中介(如果有)。不必包含根证书,因为连接客户端必须已经拥有根证书才能建立信任关系。要了解有关配置值的更多信息,请查看 [配置备忘单](administration/config-cheat-sheet#server-server)。
|
||||
|
||||
对于“CERT_FILE”或“KEY_FILE”字段,当文件路径是相对路径时,文件路径相对于“GITEA_CUSTOM”环境变量。它也可以是绝对路径。
|
||||
|
||||
|
@ -48,11 +48,12 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h
|
||||
10. Avoid mixing different events in one event listener, prefer to use individual event listeners for every event.
|
||||
11. Custom event names are recommended to use `ce-` prefix.
|
||||
12. Gitea's tailwind-style CSS classes use `gt-` prefix (`gt-relative`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`).
|
||||
13. Avoid inline scripts & styles as much as possible, it's recommended to put JS code into JS files and use CSS classes. If inline scripts & styles are unavoidable, explain the reason why it can't be avoided.
|
||||
|
||||
### Accessibility / ARIA
|
||||
|
||||
In history, Gitea heavily uses Fomantic UI which is not an accessibility-friendly framework.
|
||||
Gitea uses some patches to make Fomantic UI more accessible (see the `aria.js` and `aria.md`),
|
||||
Gitea uses some patches to make Fomantic UI more accessible (see `aria.md` and related JS files),
|
||||
but there are still many problems which need a lot of work and time to fix.
|
||||
|
||||
### Framework Usage
|
||||
|
@ -19,10 +19,7 @@ menu:
|
||||
|
||||
## Enabling/configuring API access
|
||||
|
||||
By default, `ENABLE_SWAGGER` is true, and
|
||||
`MAX_RESPONSE_ITEMS` is set to 50. See [Config Cheat
|
||||
Sheet](administration/config-cheat-sheet.md) for more
|
||||
information.
|
||||
By default, `ENABLE_SWAGGER` is true, and `MAX_RESPONSE_ITEMS` is set to 50. See [Config Cheat Sheet](administration/config-cheat-sheet.md) for more information.
|
||||
|
||||
## Authentication
|
||||
|
||||
|
@ -19,8 +19,7 @@ menu:
|
||||
|
||||
## 开启/配置 API 访问
|
||||
|
||||
通常情况下, `ENABLE_SWAGGER` 默认开启并且参数 `MAX_RESPONSE_ITEMS` 默认为 50。您可以从 [Config Cheat
|
||||
Sheet](administration/config-cheat-sheet.md) 中获取更多配置相关信息。
|
||||
通常情况下, `ENABLE_SWAGGER` 默认开启并且参数 `MAX_RESPONSE_ITEMS` 默认为 50。您可以从 [Config Cheat Sheet](administration/config-cheat-sheet.md) 中获取更多配置相关信息。
|
||||
|
||||
## 通过 API 认证
|
||||
|
||||
|
@ -138,9 +138,9 @@ All Gitea instances have the built-in API and there is no way to disable it comp
|
||||
You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`.
|
||||
For more information, refer to Gitea's [API docs](development/api-usage.md).
|
||||
|
||||
You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
|
||||
You can see the latest API (for example) on https://try.gitea.io/api/swagger
|
||||
|
||||
You can also see an example of the `swagger.json` file at <https://try.gitea.io/swagger.v1.json>.
|
||||
You can also see an example of the `swagger.json` file at https://try.gitea.io/swagger.v1.json
|
||||
|
||||
## Adjusting your server for public/private use
|
||||
|
||||
|
@ -142,9 +142,9 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供
|
||||
但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。
|
||||
有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。
|
||||
|
||||
您可以在上查看最新的API(例如)<https://try.gitea.io/api/swagger>。
|
||||
您可以在上查看最新的API(例如)https://try.gitea.io/api/swagger
|
||||
|
||||
您还可以在上查看`swagger.json`文件的示例 <https://try.gitea.io/swagger.v1.json>。
|
||||
您还可以在上查看`swagger.json`文件的示例 https://try.gitea.io/swagger.v1.json
|
||||
|
||||
## 调整服务器用于公共/私有使用
|
||||
|
||||
@ -190,7 +190,7 @@ Gitea 目前支持三个官方主题,分别是 `gitea`(亮色)、`arc-gree
|
||||
|
||||
假设我们的主题是 `arc-blue`(这是一个真实的主题,可以在[此问题](https://github.com/go-gitea/gitea/issues/6011)中找到)
|
||||
|
||||
将`.css`文件命名为`theme-arc-blue.css`并将其添加到`custom/public/css`文件夹中
|
||||
将`.css`文件命名为`theme-arc-blue.css`并将其添加到`custom/public/assets/css`文件夹中
|
||||
|
||||
通过将`arc-blue`添加到`app.ini`中的`THEMES`列表中,允许用户使用该主题
|
||||
|
||||
|
@ -17,7 +17,9 @@ menu:
|
||||
|
||||
# Database Preparation
|
||||
|
||||
You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), MariaDB, SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter.
|
||||
You need a database to use Gitea. Gitea supports PostgreSQL (>= 12), MySQL (>= 8.0), MariaDB (>= 10.4), SQLite (builtin), and MSSQL (>= 2012 SP4). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter.
|
||||
|
||||
If you use an unsupported database version, please [get in touch](/help/support) with us for information on our Extended Support Contracts. We can provide testing and support for older databases and integrate those fixes into the Gitea codebase.
|
||||
|
||||
Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database).
|
||||
|
||||
|
@ -117,7 +117,7 @@ chmod 770 /etc/gitea
|
||||
- 使用 `gitea generate secret` 创建 `SECRET_KEY` 和 `INTERNAL_TOKEN`
|
||||
- 提供所有必要的密钥
|
||||
|
||||
详情参考 [命令行文档](/zh-cn/command-line/) 中有关 `gitea generate secret` 的内容。
|
||||
详情参考 [命令行文档](administration/command-line.md) 中有关 `gitea generate secret` 的内容。
|
||||
|
||||
### 配置 Gitea 工作路径
|
||||
|
||||
@ -209,6 +209,6 @@ remote: ./hooks/pre-receive.d/gitea: line 2: [...]: No such file or directory
|
||||
|
||||
如果您没有使用 Gitea 内置的 SSH 服务器,您还需要通过在管理选项中运行任务 `Update the '.ssh/authorized_keys' file with Gitea SSH keys.` 来重新编写授权密钥文件。
|
||||
|
||||
> 更多经验总结,请参考英文版 [Troubleshooting](/en-us/install-from-binary/#troubleshooting)
|
||||
> 更多经验总结,请参考英文版 [Troubleshooting](https://docs.gitea.com/installation/install-from-binary#troubleshooting)
|
||||
|
||||
如果从本页中没有找到你需要的内容,请访问 [帮助页面](help/support.md)
|
||||
|
@ -64,7 +64,7 @@ git checkout v@version@ # or git checkout pr-xyz
|
||||
|
||||
- `go` @minGoVersion@ 或更高版本,请参阅 [这里](https://golang.org/dl/)
|
||||
- `node` @minNodeVersion@ 或更高版本,并且安装 `npm`, 请参阅 [这里](https://nodejs.org/zh-cn/download/)
|
||||
- `make`, 请参阅 [这里](/zh-cn/hacking-on-gitea/)
|
||||
- `make`, 请参阅 [这里](development/hacking-on-gitea.md)
|
||||
|
||||
为了尽可能简化编译过程,提供了各种 [make任务](https://github.com/go-gitea/gitea/blob/main/Makefile)。
|
||||
|
||||
|
@ -114,7 +114,7 @@ If you cannot see the settings page, please make sure that you have the right pe
|
||||
|
||||
The format of the registration token is a random string `D0gvfu2iHfUjNqCYVljVyRV14fISpJxxxxxxxxxx`.
|
||||
|
||||
A registration token can also be obtained from the gitea [command-line interface](../../administration/command-line.en-us.md#actions-generate-runner-token):
|
||||
A registration token can also be obtained from the gitea [command-line interface](administration/command-line.md#actions-generate-runner-token):
|
||||
|
||||
```
|
||||
gitea --config /etc/gitea/app.ini actions generate-runner-token
|
||||
|
@ -113,7 +113,7 @@ Runner级别决定了从哪里获取注册令牌。
|
||||
|
||||
注册令牌的格式是一个随机字符串 `D0gvfu2iHfUjNqCYVljVyRV14fISpJxxxxxxxxxx`。
|
||||
|
||||
注册令牌也可以通过 Gitea 的 [命令行](../../administration/command-line.en-us.md#actions-generate-runner-token) 获得:
|
||||
注册令牌也可以通过 Gitea 的 [命令行](administration/command-line.md#actions-generate-runner-token) 获得:
|
||||
|
||||
### 注册Runner
|
||||
|
||||
|
@ -29,6 +29,10 @@ Like `uses: https://github.com/actions/checkout@v3` or `uses: http://your_gitea.
|
||||
Gitea Actions supports writing actions in Go.
|
||||
See [Creating Go Actions](https://blog.gitea.com/creating-go-actions/).
|
||||
|
||||
### Support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly on schedule
|
||||
|
||||
Github Actions doesn't support that. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
||||
|
||||
## Unsupported workflows syntax
|
||||
|
||||
### `concurrency`
|
||||
@ -110,14 +114,18 @@ It's ignored by Gitea Actions now.
|
||||
|
||||
Pre and Post steps don't have their own section in the job log user interface.
|
||||
|
||||
### Services steps
|
||||
|
||||
Services steps don't have their own section in the job log user interface.
|
||||
|
||||
## Different behavior
|
||||
|
||||
### Downloading actions
|
||||
|
||||
Previously (Pre 1.21.0), `[actions].DEFAULT_ACTIONS_URL` defaulted to `https://gitea.com`.
|
||||
We have since restricted this option to only allow two values (`github` and `self`).
|
||||
When set to `github`, the new default, Gitea will download non-fully-qualified actions from <https://github.com>.
|
||||
For example, if you use `uses: actions/checkout@v3`, it will download the checkout repository from <https://github.com/actions/checkout.git>.
|
||||
When set to `github`, the new default, Gitea will download non-fully-qualified actions from `https://github.com`.
|
||||
For example, if you use `uses: actions/checkout@v3`, it will download the checkout repository from `https://github.com/actions/checkout.git`.
|
||||
|
||||
If you want to download an action from another git hoster, you can use an absolute URL, e.g. `uses: https://gitea.com/actions/checkout@v3`.
|
||||
|
||||
|
@ -29,6 +29,10 @@ Gitea Actions支持通过URL绝对路径定义actions,这意味着您可以使
|
||||
Gitea Actions支持使用Go编写Actions。
|
||||
请参阅[创建Go Actions](https://blog.gitea.com/creating-go-actions/)。
|
||||
|
||||
### 支持非标准的调度语法 @yearly, @monthly, @weekly, @daily, @hourly
|
||||
|
||||
Github Actions 不支持这些语法,详见: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
||||
|
||||
## 不支持的工作流语法
|
||||
|
||||
### `concurrency`
|
||||
@ -116,6 +120,10 @@ Gitea Actions目前不支持此功能。
|
||||
|
||||
预处理和后处理步骤在Job日志用户界面中没有自己的用户界面。
|
||||
|
||||
### 服务步骤
|
||||
|
||||
服务步骤在Job日志用户界面中没有自己的用户界面。
|
||||
|
||||
## 不一样的行为
|
||||
|
||||
### 下载Actions
|
||||
|
@ -23,7 +23,7 @@ First of all, you need a Gitea instance.
|
||||
You can follow the [documentation](installation/from-package.md) to set up a new instance or upgrade your existing one.
|
||||
It doesn't matter how you install or run Gitea, as long as its version is 1.19.0 or higher.
|
||||
|
||||
Actions are disabled by default, so you need to add the following to the configuration file to enable it:
|
||||
Since 1.21.0, Actions are enabled by default. If you are using versions before 1.21.0, you need to add the following to the configuration file to enable it:
|
||||
|
||||
```ini
|
||||
[actions]
|
||||
|
@ -23,7 +23,7 @@ menu:
|
||||
您可以按照[文档](installation/from-package.md) 来设置一个新实例或升级现有实例。
|
||||
无论您如何安装或运行Gitea,只要版本号是1.19.0或更高即可。
|
||||
|
||||
默认情况下,Actions是禁用的,因此您需要将以下内容添加到配置文件中以启用它:
|
||||
从1.21.0开始,默认情况下,Actions是启用的。如果您正在使用1.21.0之前的版本,您需要将以下内容添加到配置文件中以启用它:
|
||||
|
||||
```ini
|
||||
[actions]
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user