diff --git a/modules/setting/lfs.go b/modules/setting/lfs.go index 140a96f9ed..75463ce1e5 100644 --- a/modules/setting/lfs.go +++ b/modules/setting/lfs.go @@ -56,7 +56,7 @@ func loadLFSFrom(rootCfg ConfigProvider) error { LFS.JWTSecretBytes = make([]byte, 32) n, err := base64.RawURLEncoding.Decode(LFS.JWTSecretBytes, []byte(LFS.JWTSecretBase64)) - if err != nil || n != 32 { + if (err != nil || n != 32) && InstallLock { LFS.JWTSecretBase64, err = generate.NewJwtSecretBase64() if err != nil { return fmt.Errorf("error generating JWT Secret for custom config: %v", err)