Skip to content

Commit 54c73bd

Browse files
mikolyszlunny
authored andcommitted
Fix comments in config1 (#3946)
* Fix some comments in custom/conf/app.ini.sample Some comments in app.ini.sample were very vague, didn't contain much information. Some of them have been fixed, but mistakes that need to be fixed by an expert still remain, see #3928 Signed-off-by: Mikolaj Holysz <[email protected]> * Add an additional comment pointing to more documentation. Add an additional comment to the top of the sample configuration file. It contains a link pointing to gitea's docs and the configcheat sheet, which contains some explanations about the parameters in the config. Signed-off-by: Mikolaj Holysz <[email protected]>
1 parent 4dc43b3 commit 54c73bd

File tree

1 file changed

+67
-65
lines changed

1 file changed

+67
-65
lines changed

custom/conf/app.ini.sample

Lines changed: 67 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
; Copy required sections to your own app.ini (default is custom/conf/app.ini)
33
; and modify as needed.
44

5-
; App name that shows on every page title
5+
; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation.
6+
7+
; App name that shows in every page title
68
APP_NAME = Gitea: Git with a cup of tea
79
; Change it if you run locally
810
RUN_USER = git
@@ -16,28 +18,28 @@ SCRIPT_TYPE = bash
1618
ANSI_CHARSET =
1719
; Force every new repository to be private
1820
FORCE_PRIVATE = false
19-
; Default private when create a new repository, could be: last, private, public. Default is last which means last user repo visiblity.
21+
; Default privacy setting when creating a new repository, allowed values: last, private, public. Default is last which means the last setting used.
2022
DEFAULT_PRIVATE = last
21-
; Global maximum creation limit of repository per user, -1 means no limit
23+
; Global limit of repositories per user, applied at creation time. -1 means no limit
2224
MAX_CREATION_LIMIT = -1
2325
; Mirror sync queue length, increase if mirror syncing starts hanging
2426
MIRROR_QUEUE_LENGTH = 1000
2527
; Patch test queue length, increase if pull request patch testing starts hanging
2628
PULL_REQUEST_QUEUE_LENGTH = 1000
2729
; Preferred Licenses to place at the top of the List
28-
; Name must match file name in conf/license or custom/conf/license
30+
; The name here must match the filename in conf/license or custom/conf/license
2931
PREFERRED_LICENSES = Apache License 2.0,MIT License
30-
; Disable ability to interact with repositories by HTTP protocol
32+
; Disable the ability to interact with repositories using the HTTP protocol
3133
DISABLE_HTTP_GIT = false
3234
; Force ssh:// clone url instead of scp-style uri when default SSH port is used
3335
USE_COMPAT_SSH_URI = false
3436

3537
[repository.editor]
36-
; List of file extensions that should have line wraps in the CodeMirror editor
37-
; Separate extensions with a comma. To line wrap files w/o extension, just put a comma
38+
; List of file extensions for which lines should be wrapped in the CodeMirror editor
39+
; Separate extensions with a comma. To line wrap files without an extension, just put a comma
3840
LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
3941
; Valid file modes that have a preview API associated with them, such as api/v1/markdown
40-
; Separate values by commas. Preview tab in edit mode won't show if the file extension doesn't match
42+
; Separate the values by commas. The preview tab in edit mode won't be displayed if the file extension doesn't match
4143
PREVIEWABLE_FILE_MODES = markdown
4244

4345
[repository.local]
@@ -53,39 +55,39 @@ ENABLED = true
5355
TEMP_PATH = data/tmp/uploads
5456
; One or more allowed types, e.g. image/jpeg|image/png. Nothing means any file type
5557
ALLOWED_TYPES =
56-
; Max size of each file in MB. Defaults to 3MB
58+
; Max size of each file in megabytes. Defaults to 3MB
5759
FILE_MAX_SIZE = 3
5860
; Max number of files per upload. Defaults to 5
5961
MAX_FILES = 5
6062

6163
[ui]
62-
; Number of repositories that are showed in one explore page
64+
; Number of repositories that are displayed on one explore page
6365
EXPLORE_PAGING_NUM = 20
64-
; Number of issues that are showed in one page
66+
; Number of issues that are displayed on one page
6567
ISSUE_PAGING_NUM = 10
66-
; Number of maximum commits showed in one activity feed
68+
; Number of maximum commits displayed in one activity feed
6769
FEED_MAX_COMMIT_NUM = 5
6870
; Value of `theme-color` meta tag, used by Android >= 5.0
6971
; An invalid color like "none" or "disable" will have the default style
7072
; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
7173
THEME_COLOR_META_TAG = `#6cc644`
72-
; Max size of files to be displayed (defaults is 8MiB)
74+
; Max size of files to be displayed (default is 8MiB)
7375
MAX_DISPLAY_FILE_SIZE = 8388608
74-
; Whether show the user email in the Explore Users page
76+
; Whether the email of the user should be shown in the Explore Users page
7577
SHOW_USER_EMAIL = true
7678

7779
[ui.admin]
78-
; Number of users that are showed in one page
80+
; Number of users that are displayed on one page
7981
USER_PAGING_NUM = 50
80-
; Number of repos that are showed in one page
82+
; Number of repos that are displayed on one page
8183
REPO_PAGING_NUM = 50
82-
; Number of notices that are showed in one page
84+
; Number of notices that are displayed on in one page
8385
NOTICE_PAGING_NUM = 25
84-
; Number of organization that are showed in one page
86+
; Number of organizations that are displayed on one page
8587
ORG_PAGING_NUM = 50
8688

8789
[ui.user]
88-
; Number of repos that are showed in one page
90+
; Number of repos that are displayed on one page
8991
REPO_PAGING_NUM = 15
9092

9193
[ui.meta]
@@ -100,19 +102,19 @@ ENABLE_HARD_LINE_BREAK = false
100102
; for example git,magnet
101103
CUSTOM_URL_SCHEMES =
102104
; List of file extensions that should be rendered/edited as Markdown
103-
; Separate extensions with a comma. To render files w/o extension as markdown, just put a comma
105+
; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma
104106
FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
105107

106108
[server]
107-
; Listen protocol. One of 'http', 'https', 'unix' or 'fcgi'.
109+
; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
108110
PROTOCOL = http
109111
DOMAIN = localhost
110112
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
111-
; Listen address. Either a IPv4/IPv6 address or the path to a unix socket.
113+
; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
112114
HTTP_ADDR = 0.0.0.0
113115
HTTP_PORT = 3000
114116
; If REDIRECT_OTHER_PORT is true, and PROTOCOL is set to https an http server
115-
; will be started on PORT_TO_REDIRECT and redirect request to the main
117+
; will be started on PORT_TO_REDIRECT and it will redirect plain, non-secure http requests to the main
116118
; ROOT_URL. Defaults are false for REDIRECT_OTHER_PORT and 80 for
117119
; PORT_TO_REDIRECT.
118120
REDIRECT_OTHER_PORT = false
@@ -125,33 +127,33 @@ UNIX_SOCKET_PERMISSION = 666
125127
LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
126128
; Disable SSH feature when not available
127129
DISABLE_SSH = false
128-
; Whether use builtin SSH server or not.
130+
; Whether to use the builtin SSH server or not.
129131
START_SSH_SERVER = false
130-
; Username to use for builtin SSH server. If blank, then it is the value of RUN_USER.
132+
; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER.
131133
BUILTIN_SSH_SERVER_USER =
132134
; Domain name to be exposed in clone URL
133135
SSH_DOMAIN = %(DOMAIN)s
134-
; Network interface builtin SSH server listens on
136+
; THe network interface the builtin SSH server should listen on
135137
SSH_LISTEN_HOST =
136138
; Port number to be exposed in clone URL
137139
SSH_PORT = 22
138-
; Port number builtin SSH server listens on
140+
; The port number the builtin SSH server should listen on
139141
SSH_LISTEN_PORT = %(SSH_PORT)s
140142
; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
141143
SSH_ROOT_PATH =
142-
; For built-in SSH server only, choose the ciphers to support for SSH connections,
144+
; For the built-in SSH server, choose the ciphers to support for SSH connections,
143145
; for system SSH this setting has no effect
144146
SSH_SERVER_CIPHERS = aes128-ctr, aes192-ctr, aes256-ctr, [email protected], arcfour256, arcfour128
145-
; For built-in SSH server only, choose the key exchange algorithms to support for SSH connections,
147+
; For the built-in SSH server, choose the key exchange algorithms to support for SSH connections,
146148
; for system SSH this setting has no effect
147149
SSH_SERVER_KEY_EXCHANGES = diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, [email protected]
148-
; For built-in SSH server only, choose the MACs to support for SSH connections,
150+
; For the built-in SSH server, choose the MACs to support for SSH connections,
149151
; for system SSH this setting has no effect
150152
SSH_SERVER_MACS = [email protected], hmac-sha2-256, hmac-sha1, hmac-sha1-96
151-
; Directory to create temporary files when test public key using ssh-keygen,
152-
; default is system temporary directory.
153+
; Directory to create temporary files in when testing public keys using ssh-keygen,
154+
; default is the system temporary directory.
153155
SSH_KEY_TEST_PATH =
154-
; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
156+
; Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call.
155157
SSH_KEYGEN_PATH = ssh-keygen
156158
; Enable SSH Authorized Key Backup when rewriting all keys, default is true
157159
SSH_BACKUP_AUTHORIZED_KEYS = true
@@ -171,7 +173,7 @@ DISABLE_ROUTER_LOG = false
171173
; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
172174
CERT_FILE = custom/https/cert.pem
173175
KEY_FILE = custom/https/key.pem
174-
; Upper level of template and static file path
176+
; Root directory containing templates and static files.
175177
; default is the path where Gitea is executed
176178
STATIC_ROOT_PATH =
177179
; Default path for App data
@@ -182,9 +184,9 @@ ENABLE_GZIP = false
182184
LANDING_PAGE = home
183185
; Enables git-lfs support. true or false, default is false.
184186
LFS_START_SERVER = false
185-
; Where your lfs files put on, default is data/lfs.
187+
; Where your lfs files reside, default is data/lfs.
186188
LFS_CONTENT_PATH = data/lfs
187-
; LFS authentication secret, changed this to yourself.
189+
; LFS authentication secret, change this yourself
188190
LFS_JWT_SECRET =
189191

190192
; Define allowed algorithms and their minimum key length (use -1 to disable a type)
@@ -204,7 +206,7 @@ USER = root
204206
PASSWD =
205207
; For "postgres" only, either "disable", "require" or "verify-full"
206208
SSL_MODE = disable
207-
; For "sqlite3" and "tidb", use absolute path when you start as service
209+
; For "sqlite3" and "tidb", use absolute path when you start gitea as service
208210
PATH = data/gitea.db
209211
; For "sqlite3" only. Query timeout
210212
SQLITE_TIMEOUT = 500
@@ -222,21 +224,21 @@ UPDATE_BUFFER_LEN = 20
222224
MAX_FILE_SIZE = 1048576
223225

224226
[admin]
225-
; Disable regular (non-admin) users to create organizations
227+
; Disallow regular (non-admin) users from creating organizations.
226228
DISABLE_REGULAR_ORG_CREATION = false
227229

228230
[security]
229231
; Whether the installer is disabled
230232
INSTALL_LOCK = false
231233
; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
232234
SECRET_KEY = !#@FDEWREWR&*(
233-
; Auto-login remember days
235+
; How long to remember that an user is logged in before requiring relogin (in days)
234236
LOGIN_REMEMBER_DAYS = 7
235237
COOKIE_USERNAME = gitea_awesome
236238
COOKIE_REMEMBER_NAME = gitea_incredible
237239
; Reverse proxy authentication header name of user name
238240
REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
239-
; Sets the minimum password length for new Users
241+
; The minimum password length for new Users
240242
MIN_PASSWORD_LENGTH = 6
241243
; True when users are allowed to import local server paths
242244
IMPORT_LOCAL_PATHS = false
@@ -245,7 +247,7 @@ DISABLE_GIT_HOOKS = false
245247

246248
[openid]
247249
;
248-
; OpenID is an open standard and decentralized authentication protocol.
250+
; OpenID is an open, standard and decentralized authentication protocol.
249251
; Your identity is the address of a webpage you provide, which describes
250252
; how to prove you are in control of that page.
251253
;
@@ -264,7 +266,7 @@ DISABLE_GIT_HOOKS = false
264266
; Whether to allow signin in via OpenID
265267
ENABLE_OPENID_SIGNIN = true
266268
; Whether to allow registering via OpenID
267-
; Do not include to rely on DISABLE_REGISTRATION setting
269+
; Do not include to rely on rhw DISABLE_REGISTRATION setting
268270
;ENABLE_OPENID_SIGNUP = true
269271
; Allowed URI patterns (POSIX regexp).
270272
; Space separated.
@@ -280,11 +282,11 @@ BLACKLISTED_URIS =
280282
[service]
281283
; Time limit to confirm account/email registration
282284
ACTIVE_CODE_LIVE_MINUTES = 180
283-
; Time limit to confirm forgot password reset process
285+
; Time limit to perform the reset of a forgotten password
284286
RESET_PASSWD_CODE_LIVE_MINUTES = 180
285-
; User need to confirm e-mail for registration
287+
; Whether a new user needs to confirm their email when registering.
286288
REGISTER_EMAIL_CONFIRM = false
287-
; Does not allow register and admin create account only
289+
; Disallow registration, only allow admins to create accounts.
288290
DISABLE_REGISTRATION = false
289291
; User must sign in to view anything.
290292
REQUIRE_SIGNIN_VIEW = false
@@ -296,21 +298,21 @@ ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
296298
; Enable captcha validation for registration
297299
ENABLE_CAPTCHA = true
298300
; Default value for KeepEmailPrivate
299-
; New user will get the value of this setting copied into their profile
301+
; Each new user will get the value of this setting copied into their profile
300302
DEFAULT_KEEP_EMAIL_PRIVATE = false
301303
; Default value for AllowCreateOrganization
302-
; New user will have rights set to create organizations depending on this setting
304+
; Every new user will have rights set to create organizations depending on this setting
303305
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
304306
; Enable Timetracking
305307
ENABLE_TIMETRACKING = true
306308
; Default value for EnableTimetracking
307309
; Repositories will use timetracking by default depending on this setting
308310
DEFAULT_ENABLE_TIMETRACKING = true
309311
; Default value for AllowOnlyContributorsToTrackTime
310-
; Only users with write permissions could track time if this is true
312+
; Only users with write permissions can track time if this is true
311313
DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
312314
; Default value for the domain part of the user's email address in the git log
313-
; if he has set KeepEmailPrivate true. The user's email replaced with a
315+
; if he has set KeepEmailPrivate to true. The user's email will be replaced with a
314316
; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
315317
NO_REPLY_ADDRESS = noreply.example.org
316318

@@ -335,9 +337,9 @@ SUBJECT = %(APP_NAME)s
335337
; QQ: smtp.qq.com:465
336338
; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
337339
HOST =
338-
; Disable HELO operation when hostname are different.
340+
; Disable HELO operation when hostnames are different.
339341
DISABLE_HELO =
340-
; Custom hostname for HELO operation, default is from system.
342+
; Custom hostname for HELO operation, if no value is provided, one is retrieved from system.
341343
HELO_HOSTNAME =
342344
; Do not verify the certificate of the server. Only use this for self-signed certificates
343345
SKIP_VERIFY =
@@ -377,7 +379,7 @@ ITEM_TTL = 16h
377379
; Either "memory", "file", or "redis", default is "memory"
378380
PROVIDER = memory
379381
; Provider config options
380-
; memory: not have any config yet
382+
; memory: doesn't have any config yet
381383
; file: session file path, e.g. `data/sessions`
382384
; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
383385
; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
@@ -398,11 +400,11 @@ AVATAR_UPLOAD_PATH = data/avatars
398400
; Chinese users can choose "duoshuo"
399401
; or a custom avatar source, like: http://cn.gravatar.com/avatar/
400402
GRAVATAR_SOURCE = gravatar
401-
; This value will be forced to be true in offline mode.
403+
; This value will always be true in offline mode.
402404
DISABLE_GRAVATAR = false
403405
; Federated avatar lookup uses DNS to discover avatar associated
404406
; with emails, see https://www.libravatar.org
405-
; This value will be forced to be false in offline mode or Gravatar is disabled.
407+
; This value will always be false in offline mode or when Gravatar is disabled.
406408
ENABLE_FEDERATED_AVATAR = false
407409

408410
[attachment]
@@ -412,9 +414,9 @@ ENABLE = true
412414
PATH = data/attachments
413415
; One or more allowed types, e.g. image/jpeg|image/png
414416
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip
415-
; Max size of each file. Defaults to 32MB
417+
; Max size of each file. Defaults to 4MB
416418
MAX_SIZE = 4
417-
; Max number of files per upload. Defaults to 10
419+
; Max number of files per upload. Defaults to 5
418420
MAX_FILES = 5
419421

420422
[time]
@@ -428,7 +430,7 @@ ROOT_PATH =
428430
; Either "console", "file", "conn", "smtp" or "database", default is "console"
429431
; Use comma to separate multiple modes, e.g. "console, file"
430432
MODE = console
431-
; Buffer length of channel, keep it as it is if you don't know what it is.
433+
; Buffer length of the channel, keep it as it is if you don't know what it is.
432434
BUFFER_LEN = 10000
433435
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
434436
LEVEL = Trace
@@ -442,13 +444,13 @@ LEVEL =
442444
LEVEL =
443445
; This enables automated log rotate(switch of following options), default is true
444446
LOG_ROTATE = true
445-
; Max line number of single file, default is 1000000
447+
; Max number of lines in a single file, default is 1000000
446448
MAX_LINES = 1000000
447-
; Max size shift of single file, default is 28 means 1 << 28, 256MB
449+
; Max size shift of a single file, default is 28 means 1 << 28, 256MB
448450
MAX_SIZE_SHIFT = 28
449451
; Segment log daily, default is true
450452
DAILY_ROTATE = true
451-
; Expired days of log file(delete after max days), default is 7
453+
; delete the log file after n days, default is 7
452454
MAX_DAYS = 7
453455

454456
; For "conn" mode only
@@ -532,9 +534,9 @@ UPDATE_EXISTING = true
532534
[git]
533535
; Disables highlight of added and removed changes
534536
DISABLE_DIFF_HIGHLIGHT = false
535-
; Max number of lines allowed of a single file in diff view
537+
; Max number of lines allowed in a single file in diff view
536538
MAX_GIT_DIFF_LINES = 1000
537-
; Max number of characters of a line allowed in diff view
539+
; Max number of allowed characters in a line in diff view
538540
MAX_GIT_DIFF_LINE_CHARACTERS = 5000
539541
; Max number of files shown in diff view
540542
MAX_GIT_DIFF_FILES = 100
@@ -559,7 +561,7 @@ MIN_INTERVAL = 10m
559561
[api]
560562
; Enables /api/swagger, /api/v1/swagger etc. endpoints. True or false; default is true.
561563
ENABLE_SWAGGER_ENDPOINT = true
562-
; Max number of items will response in a page
564+
; Max number of items in a page
563565
MAX_RESPONSE_ITEMS = 50
564566

565567
[i18n]
@@ -598,7 +600,7 @@ ko-KR = ko
598600
SHOW_FOOTER_BRANDING = false
599601
; Show version information about Gitea and Go in the footer
600602
SHOW_FOOTER_VERSION = true
601-
; Show time of template execution in the footer
603+
; Show template execution time in the footer
602604
SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
603605

604606
[markup.asciidoc]
@@ -607,5 +609,5 @@ ENABLED = false
607609
FILE_EXTENSIONS = .adoc,.asciidoc
608610
; External command to render all matching extensions
609611
RENDER_COMMAND = "asciidoc --out-file=- -"
610-
; Input is not a standard input but a file
612+
; Don't pass the file on STDIN, pass the filename as argument instead.
611613
IS_INPUT_FILE = false

0 commit comments

Comments
 (0)