Skip to content

Commit 2aebffc

Browse files
authored
Merge branch 'main' into fix-21250
2 parents 3069ff1 + 8765f13 commit 2aebffc

File tree

91 files changed

+1828
-1018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1828
-1018
lines changed

cmd/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func setPort(port string) error {
203203
defaultLocalURL += ":" + setting.HTTPPort + "/"
204204

205205
// Save LOCAL_ROOT_URL if port changed
206-
setting.CreateOrAppendToCustomConf(func(cfg *ini.File) {
206+
setting.CreateOrAppendToCustomConf("server.LOCAL_ROOT_URL", func(cfg *ini.File) {
207207
cfg.Section("server").Key("LOCAL_ROOT_URL").SetValue(defaultLocalURL)
208208
})
209209
}

custom/conf/app.example.ini

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,14 +379,19 @@ LOG_SQL = false ; if unset defaults to true
379379
;; Whether the installer is disabled (set to true to disable the installer)
380380
INSTALL_LOCK = false
381381
;;
382-
;; Global secret key that will be used - if blank will be regenerated.
382+
;; Global secret key that will be used
383+
;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
383384
SECRET_KEY =
384385
;;
386+
;; Alternative location to specify secret key, instead of this file; you cannot specify both this and SECRET_KEY, and must pick one
387+
;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
388+
;SECRET_KEY_URI = file:/etc/gitea/secret_key
389+
;;
385390
;; Secret used to validate communication within Gitea binary.
386391
INTERNAL_TOKEN=
387392
;;
388-
;; Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: file:/etc/gitea/internal_token)
389-
;INTERNAL_TOKEN_URI = ;e.g. /etc/gitea/internal_token
393+
;; Alternative location to specify internal token, instead of this file; you cannot specify both this and INTERNAL_TOKEN, and must pick one
394+
;INTERNAL_TOKEN_URI = file:/etc/gitea/internal_token
390395
;;
391396
;; How long to remember that a user is logged in before requiring relogin (in days)
392397
;LOGIN_REMEMBER_DAYS = 7
@@ -882,7 +887,7 @@ ROUTER = console
882887
;USE_COMPAT_SSH_URI = false
883888
;;
884889
;; Close issues as long as a commit on any branch marks it as fixed
885-
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki
890+
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects
886891
;DISABLED_REPO_UNITS =
887892
;;
888893
;; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects.

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
494494
## Security (`security`)
495495

496496
- `INSTALL_LOCK`: **false**: Controls access to the installation page. When set to "true", the installation page is not accessible.
497-
- `SECRET_KEY`: **\<random at every install\>**: Global secret key. This should be changed.
497+
- `SECRET_KEY`: **\<random at every install\>**: Global secret key. This key is VERY IMPORTANT, if you lost it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
498+
- `SECRET_KEY_URI`: **<empty>**: Instead of defining SECRET_KEY, this option can be used to use the key stored in a file (example value: `file:/etc/gitea/secret_key`). It shouldn't be lost like SECRET_KEY.
498499
- `LOGIN_REMEMBER_DAYS`: **7**: Cookie lifetime, in days.
499500
- `COOKIE_USERNAME`: **gitea\_awesome**: Name of the cookie used to store the current username.
500501
- `COOKIE_REMEMBER_NAME`: **gitea\_incredible**: Name of cookie used to store authentication
@@ -520,7 +521,7 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
520521
- `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to Gitea repositories you should set the environment appropriately.
521522
- `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server.
522523
- `INTERNAL_TOKEN`: **\<random at every install if no uri set\>**: Secret used to validate communication within Gitea binary.
523-
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
524+
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
524525
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others.
525526
- `CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie.
526527
- `MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users.

docs/content/doc/developers/guidelines-frontend.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ menu:
2121

2222
## Background
2323

24-
Gitea uses [Less CSS](https://lesscss.org), [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue2](https://vuejs.org/v2/guide/) for its frontend.
24+
Gitea uses [Less CSS](https://lesscss.org), [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend.
2525

2626
The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template).
2727

@@ -44,7 +44,7 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h
4444
4. jQuery events across different features could use their own namespaces if there are potential conflicts.
4545
5. CSS styling for classes provided by frameworks should not be overwritten. Always use new class-names with 2-3 feature related keywords to overwrite framework styles.
4646
6. The backend can pass complex data to the frontend by using `ctx.PageData["myModuleData"] = map[]{}`
47-
7. Simple pages and SEO-related pages use Go HTML Template render to generate static Fomantic-UI HTML output. Complex pages can use Vue2 (or Vue3 in future).
47+
7. Simple pages and SEO-related pages use Go HTML Template render to generate static Fomantic-UI HTML output. Complex pages can use Vue3.
4848

4949
### Framework Usage
5050

@@ -97,6 +97,6 @@ However, there are still some special cases, so the current guideline is:
9797

9898
A lot of legacy code already existed before this document's written. It's recommended to refactor legacy code to follow the guidelines.
9999

100-
### Vue2/Vue3 and JSX
100+
### Vue3 and JSX
101101

102-
Gitea is using Vue2 now, we plan to upgrade to Vue3. We decided not to introduce JSX to keep the HTML and the JavaScript code separated.
102+
Gitea is using Vue3 now. We decided not to introduce JSX to keep the HTML and the JavaScript code separated.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ Our translations are currently crowd-sourced on our [Crowdin project](https://cr
214214

215215
Whether you want to change a translation or add a new one, it will need to be there as all translations are overwritten in our CI via the Crowdin integration.
216216

217-
## Hooks aren't running
217+
## Push Hook / Webhook aren't running
218218

219-
If Gitea is not running hooks, a common cause is incorrect setup of SSH keys.
219+
If you can push but can't see push activities on the home dashboard, or the push doesn't trigger webhook, there are a few possibilities:
220220

221-
See [SSH Issues](#ssh-issues) for more information.
222-
223-
You can also try logging into the administration panel and running the `Resynchronize pre-receive, update and post-receive hooks of all repositories.` option.
221+
1. The git hooks are out of sync: run "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel
222+
2. The git repositories (and hooks) are stored on some filesystems (ex: mounted by NAS) which don't support script execution, make sure the filesystem supports `chmod a+x any-script`
223+
3. If you are using docker, make sure Docker Server (not the client) >= 20.10.6
224224

225225
## SSH issues
226226

docs/content/doc/installation/from-binary.en-us.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ chown root:git /etc/gitea
9797
chmod 770 /etc/gitea
9898
```
9999

100-
**NOTE:** `/etc/gitea` is temporarily set with write permissions for user `git` so that the web installer can write the configuration file. After the installation is finished, it is recommended to set permissions to read-only using:
101-
102-
```sh
103-
chmod 750 /etc/gitea
104-
chmod 640 /etc/gitea/app.ini
105-
```
100+
> **NOTE:** `/etc/gitea` is temporarily set with write permissions for user `git` so that the web installer can write the configuration file. After the installation is finished, it is recommended to set permissions to read-only using:
101+
>
102+
> ```sh
103+
> chmod 750 /etc/gitea
104+
> chmod 640 /etc/gitea/app.ini
105+
> ```
106106
107107
If you don't want the web installer to be able to write to the config file, it is possible to make the config file read-only for the Gitea user (owner/group `root:git`, mode `0640`) however you will need to edit your config file manually to:
108108

docs/content/page/index.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ You can try it out using [the online demo](https://try.gitea.io/).
287287
- UI frameworks:
288288
- [jQuery](https://jquery.com)
289289
- [Fomantic UI](https://fomantic-ui.com)
290-
- [Vue2](https://vuejs.org)
290+
- [Vue3](https://vuejs.org)
291291
- and various components (see package.json)
292292
- Editors:
293293
- [CodeMirror](https://codemirror.net)

docs/content/page/index.fr-fr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Le but de ce projet est de fournir de la manière la plus simple, la plus rapide
258258
- Interface graphique :
259259
- [jQuery](https://jquery.com)
260260
- [Fomantic UI](https://fomantic-ui.com)
261-
- [Vue2](https://vuejs.org)
261+
- [Vue3](https://vuejs.org)
262262
- [CodeMirror](https://codemirror.net)
263263
- [EasyMDE](https://github.com/Ionaru/easy-markdown-editor)
264264
- [Monaco Editor](https://microsoft.github.io/monaco-editor)

docs/content/page/index.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Gitea的首要目标是创建一个极易安装,运行非常快速,安装和
5252
- UI 框架:
5353
- [jQuery](https://jquery.com)
5454
- [Fomantic UI](https://fomantic-ui.com)
55-
- [Vue2](https://vuejs.org)
55+
- [Vue3](https://vuejs.org)
5656
- 更多组件参见 package.json
5757
- 编辑器:
5858
- [CodeMirror](https://codemirror.net)

docs/content/page/index.zh-tw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [G
271271
- UI 元件:
272272
- [jQuery](https://jquery.com)
273273
- [Fomantic UI](https://fomantic-ui.com)
274-
- [Vue2](https://vuejs.org)
274+
- [Vue3](https://vuejs.org)
275275
- [CodeMirror](https://codemirror.net)
276276
- [EasyMDE](https://github.com/Ionaru/easy-markdown-editor)
277277
- [Monaco Editor](https://microsoft.github.io/monaco-editor)

0 commit comments

Comments
 (0)