Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to non-deprecation setting #18358

Merged
merged 7 commits into from
Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions custom/conf/app.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ RUN_MODE = ; prod
;; Enables git-lfs support. true or false, default is false.
;LFS_START_SERVER = false
;;
;; Where your lfs files reside, default is data/lfs.
;LFS_CONTENT_PATH = data/lfs
;;
;; LFS authentication secret, change this yourself
LFS_JWT_SECRET =
Expand Down Expand Up @@ -2183,6 +2181,9 @@ PATH =
;;
;[lfs]
;STORAGE_TYPE = local
;;
;; Where your lfs files reside, default is data/lfs.
;PATH = data/lfs

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down
4 changes: 3 additions & 1 deletion docker/root/etc/templates/app.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DISABLE_SSH = $DISABLE_SSH
SSH_PORT = $SSH_PORT
SSH_LISTEN_PORT = $SSH_LISTEN_PORT
LFS_START_SERVER = $LFS_START_SERVER
LFS_CONTENT_PATH = /data/git/lfs

[database]
PATH = /data/gitea/gitea.db
Expand Down Expand Up @@ -59,3 +58,6 @@ REVERSE_PROXY_TRUSTED_PROXIES = *
[service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION
REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW

[lfs]
PATH = /data/git/lfs
4 changes: 3 additions & 1 deletion docker/rootless/etc/templates/app.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ SSH_PORT = $SSH_PORT
SSH_LISTEN_PORT = $SSH_LISTEN_PORT
BUILTIN_SSH_SERVER_USER = $RUN_USER
LFS_START_SERVER = $LFS_START_SERVER
LFS_CONTENT_PATH = $GITEA_WORK_DIR/git/lfs

[database]
PATH = $GITEA_WORK_DIR/data/gitea.db
Expand Down Expand Up @@ -55,3 +54,6 @@ REVERSE_PROXY_TRUSTED_PROXIES = *
[service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION
REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW

[lfs]
PATH = $GITEA_WORK_DIR/git/lfs
4 changes: 3 additions & 1 deletion docs/content/doc/usage/git-lfs-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ To use Gitea's built-in LFS support, you must update the `app.ini` file:
[server]
; Enables git-lfs support. true or false, default is false.
LFS_START_SERVER = true

[lfs]
; Where your lfs files reside, default is data/lfs.
LFS_CONTENT_PATH = /home/gitea/data/lfs
PATH = /home/gitea/data/lfs
```

**Note**: LFS server support needs at least Git v2.1.2 installed on the server
4 changes: 3 additions & 1 deletion integrations/mssql.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2201
START_SSH_SERVER = true
LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-mssql/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-mssql/data
Expand Down Expand Up @@ -100,3 +99,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ

[lfs]
PATH = integrations/gitea-integration-mssql/data/lfs
4 changes: 3 additions & 1 deletion integrations/mysql8.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2204
START_SSH_SERVER = true
LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-mysql8/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-mysql8/data
Expand Down Expand Up @@ -97,3 +96,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ

[lfs]
PATH = integrations/gitea-integration-mysql8/data/lfs
4 changes: 3 additions & 1 deletion integrations/pgsql.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2202
START_SSH_SERVER = true
LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-pgsql/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-pgsql/data
Expand Down Expand Up @@ -101,3 +100,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ

[lfs]
PATH = integrations/gitea-integration-pgsql/data/lfs
4 changes: 3 additions & 1 deletion integrations/sqlite.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2203
START_SSH_SERVER = true
LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-sqlite/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-sqlite/data
Expand Down Expand Up @@ -99,3 +98,6 @@ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTI3OTU5ODN9.O

[oauth2]
JWT_SECRET = KZb_QLUd4fYVyxetjxC4eZkrBgWM2SndOOWDNtgUUko

[lfs]
PATH = integrations/gitea-integration-sqlite/data/lfs
2 changes: 1 addition & 1 deletion routers/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func SubmitInstall(ctx *context.Context) {

if form.LFSRootPath != "" {
cfg.Section("server").Key("LFS_START_SERVER").SetValue("true")
cfg.Section("server").Key("LFS_CONTENT_PATH").SetValue(form.LFSRootPath)
cfg.Section("lfs").Key("PATH").SetValue(form.LFSRootPath)
var lfsJwtSecret string
if lfsJwtSecret, err = generate.NewJwtSecretBase64(); err != nil {
ctx.RenderWithErr(ctx.Tr("install.lfs_jwt_secret_failed", err), tplInstall, &form)
Expand Down