You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* upstream/main: (34 commits)
Fix formatted link for PR review notifications to matrix (go-gitea#21319)
Show private data in feeds (go-gitea#21369)
Add nicer error handling on template compile errors (go-gitea#21350)
Fix some typos and update db transaction demo in backend guideline (go-gitea#21322)
Refactor parseTreeEntries, speed up tree list (go-gitea#21368)
Add GET and DELETE endpoints for Docker blob uploads (go-gitea#21367)
Make external issue tracker regexp configurable via API (go-gitea#21338)
Add new CSS variables --color-accent and --color-small-accent (go-gitea#21305)
Set SemverCompatible to false for Conan packages (go-gitea#21275)
Parse OAuth Authorization header when request omits client secret (go-gitea#21351)
Disable Firefox E2E tests (go-gitea#21363)
Add redirect of /upgrade/ to /upgrade-from-gitea/ on docs site (go-gitea#21330)
Update to go-enry v2.8.3 (go-gitea#21360)
Update go to 1.19 (go-gitea#21361)
SessionUser protection against nil pointer dereference (go-gitea#21358)
Fix and improve incorrect error messages (go-gitea#21342)
Fix default theme-auto selector when nologin (go-gitea#21346)
Add `stat` to `ToCommit` function for speed (go-gitea#21337)
Fix typo in API comment document (go-gitea#21347)
Update comment about repository.DISABLED_REPO_UNITS in app.example.ini (go-gitea#21343)
...
Copy file name to clipboardExpand all lines: custom/conf/app.example.ini
+9-4
Original file line number
Diff line number
Diff line change
@@ -379,14 +379,19 @@ LOG_SQL = false ; if unset defaults to true
379
379
;; Whether the installer is disabled (set to true to disable the installer)
380
380
INSTALL_LOCK = false
381
381
;;
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.
383
384
SECRET_KEY =
384
385
;;
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
+
;;
385
390
;; Secret used to validate communication within Gitea binary.
386
391
INTERNAL_TOKEN=
387
392
;;
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)
Copy file name to clipboardExpand all lines: docs/content/doc/advanced/config-cheat-sheet.en-us.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -494,7 +494,8 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
494
494
## Security (`security`)
495
495
496
496
-`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.
498
499
-`LOGIN_REMEMBER_DAYS`: **7**: Cookie lifetime, in days.
499
500
-`COOKIE_USERNAME`: **gitea\_awesome**: Name of the cookie used to store the current username.
500
501
-`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
520
521
-`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.
521
522
-`IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server.
522
523
-`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`)
524
525
-`PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others.
525
526
-`CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie.
526
527
-`MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users.
Copy file name to clipboardExpand all lines: docs/content/doc/developers/guidelines-frontend.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ menu:
21
21
22
22
## Background
23
23
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.
25
25
26
26
The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template).
27
27
@@ -44,7 +44,7 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h
44
44
4. jQuery events across different features could use their own namespaces if there are potential conflicts.
45
45
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.
46
46
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.
48
48
49
49
### Framework Usage
50
50
@@ -97,6 +97,6 @@ However, there are still some special cases, so the current guideline is:
97
97
98
98
A lot of legacy code already existed before this document's written. It's recommended to refactor legacy code to follow the guidelines.
99
99
100
-
### Vue2/Vue3 and JSX
100
+
### Vue3 and JSX
101
101
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.
Copy file name to clipboardExpand all lines: docs/content/doc/installation/from-binary.en-us.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -97,12 +97,12 @@ chown root:git /etc/gitea
97
97
chmod 770 /etc/gitea
98
98
```
99
99
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
+
>```
106
106
107
107
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:
0 commit comments