mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 04:43:59 +01:00
Format files (#13698)
* align "make help" * format * untouch build/generate-svg.js * untouch .eslintrc * combine editorconfig's * rm editorconfig Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
742e21aeba
commit
e7b47c5215
37 changed files with 92 additions and 134 deletions
|
@ -9,7 +9,7 @@ charset = utf-8
|
|||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{go,tmpl,html}]
|
||||
[*.{go, tmpl, html}]
|
||||
indent_style = tab
|
||||
|
||||
[Makefile]
|
||||
|
|
4
Makefile
4
Makefile
|
@ -152,7 +152,7 @@ all: build
|
|||
.PHONY: help
|
||||
help:
|
||||
@echo "Make Routines:"
|
||||
@echo " - \"\" equivalent to \"build\""
|
||||
@echo " - \"\" equivalent to \"build\""
|
||||
@echo " - build build everything"
|
||||
@echo " - frontend build frontend files"
|
||||
@echo " - backend build backend files"
|
||||
|
@ -180,7 +180,7 @@ help:
|
|||
@echo " - revive run revive linter"
|
||||
@echo " - misspell check for misspellings"
|
||||
@echo " - vet examines Go source code and reports suspicious constructs"
|
||||
@echo " - test[\#TestSpecificName] run unit test"
|
||||
@echo " - test[\#TestSpecificName] run unit test"
|
||||
@echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite"
|
||||
@echo " - pr#<index> build and start gitea from a PR with integration test data loaded"
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ sed -i -r -e '/^[a-zA-Z0-9_.-]+[ ]*=[ ]*".*"$/ {
|
|||
}' ./options/locale/*.ini
|
||||
|
||||
# Remove translation under 25% of en_us
|
||||
baselines=`wc -l "./options/locale_en-US.ini" | cut -d" " -f1`
|
||||
baselines=$(wc -l "./options/locale_en-US.ini" | cut -d" " -f1)
|
||||
baselines=$((baselines / 4))
|
||||
for filename in ./options/locale/*.ini; do
|
||||
lines=`wc -l "$filename" | cut -d" " -f1`
|
||||
lines=$(wc -l "$filename" | cut -d" " -f1)
|
||||
if [ $lines -lt $baselines ]; then
|
||||
echo "Removing $filename: $lines/$baselines"
|
||||
rm "$filename"
|
||||
|
|
|
@ -23,7 +23,7 @@ SCRIPT_TYPE = bash
|
|||
; If the charsets have equal confidence, tie-breaking will be done by order in this list
|
||||
; with charsets earlier in the list chosen in preference to those later.
|
||||
; Adding "defaults" will place the unused charsets at that position.
|
||||
DETECTED_CHARSETS_ORDER=UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr
|
||||
DETECTED_CHARSETS_ORDER = UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr
|
||||
; Default ANSI charset to override non-UTF-8 charsets to
|
||||
ANSI_CHARSET =
|
||||
; Force every new repository to be private
|
||||
|
@ -65,11 +65,11 @@ PREFIX_ARCHIVE_FILES = true
|
|||
; Disable the creation of new mirrors. Pre-existing mirrors remain valid.
|
||||
DISABLE_MIRRORS = false
|
||||
; The default branch name of new repositories
|
||||
DEFAULT_BRANCH=master
|
||||
DEFAULT_BRANCH = master
|
||||
; Allow adoption of unadopted repositories
|
||||
ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES=false
|
||||
ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES = false
|
||||
; Allow deletion of unadopted repositories
|
||||
ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES=false
|
||||
ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false
|
||||
|
||||
[repository.editor]
|
||||
; List of file extensions for which lines should be wrapped in the Monaco editor
|
||||
|
@ -97,25 +97,25 @@ MAX_FILES = 5
|
|||
|
||||
[repository.pull-request]
|
||||
; List of prefixes used in Pull Request title to mark them as Work In Progress
|
||||
WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP]
|
||||
WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP]
|
||||
; List of keywords used in Pull Request comments to automatically close a related issue
|
||||
CLOSE_KEYWORDS=close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved
|
||||
CLOSE_KEYWORDS = close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved
|
||||
; List of keywords used in Pull Request comments to automatically reopen a related issue
|
||||
REOPEN_KEYWORDS=reopen,reopens,reopened
|
||||
REOPEN_KEYWORDS = reopen,reopens,reopened
|
||||
; In the default merge message for squash commits include at most this many commits
|
||||
DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT=50
|
||||
DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT = 50
|
||||
; In the default merge message for squash commits limit the size of the commit messages to this
|
||||
DEFAULT_MERGE_MESSAGE_SIZE=5120
|
||||
DEFAULT_MERGE_MESSAGE_SIZE = 5120
|
||||
; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list
|
||||
DEFAULT_MERGE_MESSAGE_ALL_AUTHORS=false
|
||||
DEFAULT_MERGE_MESSAGE_ALL_AUTHORS = false
|
||||
; In default merge messages limit the number of approvers listed as Reviewed-by: to this many
|
||||
DEFAULT_MERGE_MESSAGE_MAX_APPROVERS=10
|
||||
DEFAULT_MERGE_MESSAGE_MAX_APPROVERS = 10
|
||||
; In default merge messages only include approvers who are official
|
||||
DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY=true
|
||||
DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = true
|
||||
|
||||
[repository.issue]
|
||||
; List of reasons why a Pull Request or Issue can be locked
|
||||
LOCK_REASONS=Too heated,Off-topic,Resolved,Spam
|
||||
LOCK_REASONS = Too heated,Off-topic,Resolved,Spam
|
||||
|
||||
[repository.release]
|
||||
; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
|
||||
|
@ -133,7 +133,7 @@ SIGNING_KEY = default
|
|||
SIGNING_NAME =
|
||||
SIGNING_EMAIL =
|
||||
; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter
|
||||
DEFAULT_TRUST_MODEL=collaborator
|
||||
DEFAULT_TRUST_MODEL = collaborator
|
||||
; Determines when gitea should sign the initial commit when creating a repository
|
||||
; Either:
|
||||
; - never
|
||||
|
@ -158,19 +158,19 @@ MERGES = pubkey, twofa, basesigned, commitssigned
|
|||
[cors]
|
||||
; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers
|
||||
; enable cors headers (disabled by default)
|
||||
ENABLED=false
|
||||
ENABLED = false
|
||||
; scheme of allowed requests
|
||||
SCHEME=http
|
||||
SCHEME = http
|
||||
; list of requesting domains that are allowed
|
||||
ALLOW_DOMAIN=*
|
||||
ALLOW_DOMAIN = *
|
||||
; allow subdomains of headers listed above to request
|
||||
ALLOW_SUBDOMAIN=false
|
||||
ALLOW_SUBDOMAIN = false
|
||||
; list of methods allowed to request
|
||||
METHODS=GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
|
||||
METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
|
||||
; max time to cache response
|
||||
MAX_AGE=10m
|
||||
MAX_AGE = 10m
|
||||
; allow request with credentials
|
||||
ALLOW_CREDENTIALS=false
|
||||
ALLOW_CREDENTIALS = false
|
||||
|
||||
[ui]
|
||||
; Number of repositories that are displayed on one explore page
|
||||
|
@ -456,7 +456,7 @@ ISSUE_INDEXER_QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"
|
|||
ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20
|
||||
; Timeout the indexer if it takes longer than this to start.
|
||||
; Set to zero to disable timeout.
|
||||
STARTUP_TIMEOUT=30s
|
||||
STARTUP_TIMEOUT = 30s
|
||||
|
||||
; repo indexer by default disabled, since it uses a lot of disk space
|
||||
REPO_INDEXER_ENABLED = false
|
||||
|
@ -597,7 +597,7 @@ RESET_PASSWD_CODE_LIVE_MINUTES = 180
|
|||
REGISTER_EMAIL_CONFIRM = false
|
||||
; List of domain names that are allowed to be used to register on a Gitea instance
|
||||
; gitea.io,example.com
|
||||
EMAIL_DOMAIN_WHITELIST=
|
||||
EMAIL_DOMAIN_WHITELIST =
|
||||
; Disallow registration, only allow admins to create accounts.
|
||||
DISABLE_REGISTRATION = false
|
||||
; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false
|
||||
|
@ -620,7 +620,7 @@ ENABLE_CAPTCHA = false
|
|||
CAPTCHA_TYPE = image
|
||||
; Enable recaptcha to use Google's recaptcha service
|
||||
; Go to https://www.google.com/recaptcha/admin to sign up for a key
|
||||
RECAPTCHA_SECRET =
|
||||
RECAPTCHA_SECRET =
|
||||
RECAPTCHA_SITEKEY =
|
||||
; For hCaptcha, create an account at https://accounts.hcaptcha.com/login to get your keys
|
||||
HCAPTCHA_SECRET =
|
||||
|
@ -1117,15 +1117,15 @@ DEFAULT_MAX_BLOB_SIZE = 10485760
|
|||
; Enables OAuth2 provider
|
||||
ENABLE = true
|
||||
; Lifetime of an OAuth2 access token in seconds
|
||||
ACCESS_TOKEN_EXPIRATION_TIME=3600
|
||||
ACCESS_TOKEN_EXPIRATION_TIME = 3600
|
||||
; Lifetime of an OAuth2 refresh token in hours
|
||||
REFRESH_TOKEN_EXPIRATION_TIME=730
|
||||
REFRESH_TOKEN_EXPIRATION_TIME = 730
|
||||
; Check if refresh token got already used
|
||||
INVALIDATE_REFRESH_TOKENS=false
|
||||
INVALIDATE_REFRESH_TOKENS = false
|
||||
; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate
|
||||
JWT_SECRET=
|
||||
JWT_SECRET =
|
||||
; Maximum length of oauth2 token/cookie stored on server
|
||||
MAX_TOKEN_LENGTH=32767
|
||||
MAX_TOKEN_LENGTH = 32767
|
||||
|
||||
[i18n]
|
||||
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
[[ -f ./setup ]] && source ./setup
|
||||
|
||||
pushd /app/gitea > /dev/null
|
||||
exec su-exec $USER /app/gitea/gitea web
|
||||
pushd /app/gitea >/dev/null
|
||||
exec su-exec $USER /app/gitea/gitea web
|
||||
popd
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
[[ -f ./setup ]] && source ./setup
|
||||
|
||||
pushd /root > /dev/null
|
||||
exec su-exec root /usr/sbin/sshd -D -e 2>&1
|
||||
pushd /root >/dev/null
|
||||
exec su-exec root /usr/sbin/sshd -D -e 2>&1
|
||||
popd
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.go]
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
|
||||
[*.{tmpl,html}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[*.{less}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.{yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
|
@ -240,7 +240,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||
- `SSH_PORT`: **22**: SSH port displayed in clone URL.
|
||||
- `SSH_LISTEN_HOST`: **0.0.0.0**: Listen address for the built-in SSH server.
|
||||
- `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server.
|
||||
- `SSH_ROOT_PATH`: **~/.ssh**: Root path of SSH directory.
|
||||
- `SSH_ROOT_PATH`: **~/.ssh**: Root path of SSH directory.
|
||||
- `SSH_CREATE_AUTHORIZED_KEYS_FILE`: **true**: Gitea will create a authorized_keys file by default when it is not using the internal ssh server. If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
|
||||
- `SSH_AUTHORIZED_KEYS_BACKUP`: **true**: Enable SSH Authorized Key Backup when rewriting all keys, default is true.
|
||||
- `SSH_TRUSTED_USER_CA_KEYS`: **\<empty\>**: Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. Multiple keys should be comma separated. E.g.`ssh-<algorithm> <key>` or `ssh-<algorithm> <key1>, ssh-<algorithm> <key2>`. For more information see `TrustedUserCAKeys` in the sshd config man pages. When empty no file will be created and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` will default to `off`.
|
||||
|
@ -294,7 +294,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||
- `USER`: **root**: Database username.
|
||||
- `PASSWD`: **\<empty\>**: Database user password. Use \`your password\` or """your password""" for quoting if you use special characters in the password.
|
||||
- `SCHEMA`: **\<empty\>**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand,
|
||||
the user must have creation privileges on it, and the user search path must be set to the look into the schema first
|
||||
the user must have creation privileges on it, and the user search path must be set to the look into the schema first
|
||||
(e.g. `ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;`).
|
||||
- `SSL_MODE`: **disable**: SSL/TLS encryption mode for connecting to the database. This option is only applied for PostgreSQL and MySQL.
|
||||
- Valid values for MySQL:
|
||||
|
@ -318,7 +318,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||
- `MAX_OPEN_CONNS` **0**: Database maximum open connections - default is 0, meaning there is no limit.
|
||||
- `MAX_IDLE_CONNS` **2**: Max idle database connections on connnection pool, default is 2 - this will be capped to `MAX_OPEN_CONNS`.
|
||||
- `CONN_MAX_LIFETIME` **0 or 3s**: Sets the maximum amount of time a DB connection may be reused - default is 0, meaning there is no limit (except on MySQL where it is 3s - see #6804 & #7071).
|
||||
|
||||
|
||||
Please see #8540 & #8273 for further discussion of the appropriate values for `MAX_OPEN_CONNS`, `MAX_IDLE_CONNS` & `CONN_MAX_LIFETIME` and their
|
||||
relation to port exhaustion.
|
||||
|
||||
|
@ -465,7 +465,7 @@ relation to port exhaustion.
|
|||
- `DEFAULT_ORG_VISIBILITY`: **public**: Set default visibility mode for organisations, either "public", "limited" or "private".
|
||||
- `DEFAULT_ORG_MEMBER_VISIBLE`: **false** True will make the membership of the users visible when added to the organisation.
|
||||
- `ALLOW_ONLY_EXTERNAL_REGISTRATION`: **false** Set to true to force registration only using third-party services.
|
||||
- `NO_REPLY_ADDRESS`: **DOMAIN** Default value for the domain part of the user's email address in the git log if he has set KeepEmailPrivate to true.
|
||||
- `NO_REPLY_ADDRESS`: **DOMAIN** Default value for the domain part of the user's email address in the git log if he has set KeepEmailPrivate to true.
|
||||
The user's email will be replaced with a concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
|
||||
|
||||
## SSH Minimum Key Sizes (`ssh.minimum_key_sizes`)
|
||||
|
@ -493,7 +493,7 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
|
|||
- `HELO_HOSTNAME`: **\<empty\>**: Custom hostname for HELO operation.
|
||||
- `HOST`: **\<empty\>**: SMTP mail host address and port (example: smtp.gitea.io:587).
|
||||
- Using opportunistic TLS via STARTTLS on port 587 is recommended per RFC 6409.
|
||||
- `IS_TLS_ENABLED` : **false** : Forcibly use TLS to connect even if not on a default SMTPS port.
|
||||
- `IS_TLS_ENABLED` : **false** : Forcibly use TLS to connect even if not on a default SMTPS port.
|
||||
- Note, if the port ends with `465` SMTPS/SMTP over TLS will be used despite this setting.
|
||||
- Otherwise if `IS_TLS_ENABLED=false` and the server supports `STARTTLS` this will be used. Thus if `STARTTLS` is preferred you should set `IS_TLS_ENABLED=false`.
|
||||
- `FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or
|
||||
|
@ -855,7 +855,7 @@ Task queue configuration has been moved to `queue.task`. However, the below conf
|
|||
## LFS (`lfs`)
|
||||
|
||||
Storage configuration for lfs data. It will be derived from default `[storage]` or
|
||||
`[storage.xxx]` when set `STORAGE_TYPE` to `xxx`. When derived, the default of `PATH`
|
||||
`[storage.xxx]` when set `STORAGE_TYPE` to `xxx`. When derived, the default of `PATH`
|
||||
is `data/lfs` and the default of `MINIO_BASE_PATH` is `lfs/`.
|
||||
|
||||
- `STORAGE_TYPE`: **local**: Storage type for lfs, `local` for local disk or `minio` for s3 compatible object storage service or other name defined with `[storage.xxx]`
|
||||
|
|
|
@ -15,7 +15,7 @@ menu:
|
|||
|
||||
# Custom files rendering configuration
|
||||
|
||||
Gitea supports custom file renderings (i.e., Jupyter notebooks, asciidoc, etc.) through external binaries,
|
||||
Gitea supports custom file renderings (i.e., Jupyter notebooks, asciidoc, etc.) through external binaries,
|
||||
it is just a matter of:
|
||||
|
||||
* installing external binaries
|
||||
|
@ -26,7 +26,7 @@ This supports rendering of whole files. If you want to render code blocks in mar
|
|||
|
||||
## Installing external binaries
|
||||
|
||||
In order to get file rendering through external binaries, their associated packages must be installed.
|
||||
In order to get file rendering through external binaries, their associated packages must be installed.
|
||||
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
|
||||
|
||||
```
|
||||
|
@ -41,7 +41,7 @@ RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng libffi-d
|
|||
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip3 install -U setuptools
|
||||
RUN pip3 install jupyter docutils
|
||||
RUN pip3 install jupyter docutils
|
||||
# add above any other python package you may need to install
|
||||
```
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ You can configure the outputs of this logger by setting the `MODE`
|
|||
value in the `[log]` section of the configuration.
|
||||
|
||||
Each output sublogger is configured in a separate `[log.sublogger.default]`
|
||||
which inherits from the sublogger `[log.sublogger]` section and from the
|
||||
which inherits from the sublogger `[log.sublogger]` section and from the
|
||||
generic `[log]` section, but there are certain default values. These will
|
||||
not be inherited from the `[log]` section:
|
||||
|
||||
|
@ -361,7 +361,7 @@ If you are running on Unix you may wish to release-and-reopen logs in order to u
|
|||
It is possible force gitea to release and reopen it's logging files and connections by sending `SIGUSR1` to the
|
||||
running process, or running `gitea manager logging release-and-reopen`.
|
||||
|
||||
Alternatively, you may wish to pause and resume logging - this can be accomplished through the use of the
|
||||
Alternatively, you may wish to pause and resume logging - this can be accomplished through the use of the
|
||||
`gitea manager logging pause` and `gitea manager logging resume` commands. Please note that whilst logging
|
||||
is paused log events below INFO level will not be stored and only a limited number of events will be stored.
|
||||
Logging may block, albeit temporarily, slowing gitea considerably whilst paused - therefore it is
|
||||
|
|
|
@ -249,7 +249,7 @@ This template produces something along these lines:
|
|||
>
|
||||
> Mike, I think we should tone down the blues a little.
|
||||
> \__________________________________________________________________
|
||||
>
|
||||
>
|
||||
> [View it on Gitea](#).
|
||||
|
||||
## Advanced
|
||||
|
|
|
@ -19,7 +19,7 @@ Gitea fait largement usage de Make pour automatiser les tâches et avoir un dév
|
|||
|
||||
### Linux
|
||||
|
||||
Vous pouvez installer Make avec votre gestionnaire de paquetages
|
||||
Vous pouvez installer Make avec votre gestionnaire de paquetages
|
||||
|
||||
Depuis Ubuntu/Debian:
|
||||
|
||||
|
|
|
@ -56,5 +56,3 @@ Pattern matching works as follows:
|
|||
* To match all files named `Makefile`, use `**Makefile`.
|
||||
* Matching a directory has no effect; the pattern `resources/bin` will not include/exclude files inside that directory; `resources/bin/**` will.
|
||||
* All files and patterns are normalized to lower case, so `**Makefile`, `**makefile` and `**MAKEFILE` are equivalent.
|
||||
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ from within the `$GOPATH`, hence the `go get` approach is no longer recommended.
|
|||
|
||||
## Forking Gitea
|
||||
|
||||
Download the master Gitea source code as above. Then, fork the
|
||||
Download the master Gitea source code as above. Then, fork the
|
||||
[Gitea repository](https://github.com/go-gitea/gitea) on GitHub,
|
||||
and either switch the git remote origin for your fork or add your fork as another remote:
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@ menu:
|
|||
|
||||
# Integrations
|
||||
|
||||
Gitea has a wonderful community of third-party integrations, as well as first-class support in various other
|
||||
Gitea has a wonderful community of third-party integrations, as well as first-class support in various other
|
||||
projects.
|
||||
|
||||
We are curating a list over at [awesome-gitea](https://gitea.com/gitea/awesome-gitea) to track these!
|
||||
|
||||
If you are looking for [CI/CD](https://gitea.com/gitea/awesome-gitea#devops),
|
||||
an [SDK](https://gitea.com/gitea/awesome-gitea#sdk),
|
||||
or even some extra [themes](https://gitea.com/gitea/awesome-gitea#themes),
|
||||
If you are looking for [CI/CD](https://gitea.com/gitea/awesome-gitea#devops),
|
||||
an [SDK](https://gitea.com/gitea/awesome-gitea#sdk),
|
||||
or even some extra [themes](https://gitea.com/gitea/awesome-gitea#themes),
|
||||
you can find them listed in the [awesome-gitea](https://gitea.com/gitea/awesome-gitea) repository!
|
||||
|
|
|
@ -30,7 +30,7 @@ Access Token Endpoint | `/login/oauth/access_token`
|
|||
## Supported OAuth2 Grants
|
||||
|
||||
At the moment Gitea only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636) extension.
|
||||
|
||||
|
||||
|
||||
To use the Authorization Code Grant as a third party application it is required to register a new application via the "Settings" (`/user/settings/applications`) section of the settings.
|
||||
|
||||
|
@ -46,7 +46,7 @@ Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea
|
|||
|
||||
```curl
|
||||
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE
|
||||
```
|
||||
```
|
||||
|
||||
The `CLIENT_ID` can be obtained by registering an application in the settings. The `STATE` is a random string that will be send back to your application after the user authorizes. The `state` parameter is optional but should be used to prevent CSRF attacks.
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ menu:
|
|||
|
||||
Gitea's localization happens through our [Crowdin project](https://crowdin.com/project/gitea).
|
||||
|
||||
For changes to an **English** translation, a pull request can be made that changes the appropriate key in
|
||||
For changes to an **English** translation, a pull request can be made that changes the appropriate key in
|
||||
the [english locale](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini).
|
||||
|
||||
For changes to a **non-English** translation, refer to the Crowdin project above.
|
||||
|
|
|
@ -93,7 +93,7 @@ https://github.com/loganinak/MigrateGitlabToGogs
|
|||
* INI (config file)
|
||||
* `-c` flag
|
||||
* Else `%(CustomPath)/conf/app.ini`
|
||||
* SQLite Database
|
||||
* SQLite Database
|
||||
* `PATH` in `database` section of `app.ini`
|
||||
* Else `%(AppDataPath)/gitea.db`
|
||||
|
||||
|
@ -114,7 +114,7 @@ If certain clone options aren't showing up (HTTP/S or SSH), the following option
|
|||
Gitea's custom templates must be added to the correct location or Gitea will not find and use them.
|
||||
The correct path for the template(s) will be relative to the `CustomPath`
|
||||
|
||||
1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration
|
||||
1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration
|
||||
* If that doesn't exist, you can try `echo $GITEA_CUSTOM`
|
||||
2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-x-file)
|
||||
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}}) page to add your template to the correct location.
|
||||
|
@ -123,7 +123,7 @@ The correct path for the template(s) will be relative to the `CustomPath`
|
|||
In Gitea, an "active" user refers to a user that has activated their account via email.
|
||||
A "login prohibited" user is a user that is not allowed to log in to Gitea anymore
|
||||
|
||||
## Setting up logging
|
||||
## Setting up logging
|
||||
* [Official Docs]({{< relref "doc/advanced/logging-documentation.en-us.md" >}})
|
||||
|
||||
## What is Swagger?
|
||||
|
@ -167,7 +167,7 @@ Use [Fail2Ban]({{< relref "doc/usage/fail2ban-setup.en-us.md" >}}) to monitor an
|
|||
## How to add/use custom themes
|
||||
Gitea supports two official themes right now, `gitea` and `arc-green` (`light` and `dark` respectively)
|
||||
To add your own theme, currently the only way is to provide a complete theme (not just color overrides)
|
||||
|
||||
|
||||
As an example, let's say our theme is `arc-blue` (this is a real theme, and can be found [in this issue](https://github.com/go-gitea/gitea/issues/6011))
|
||||
Name the `.css` file `theme-arc-blue.css` and add it to your custom folder in `custom/pulic/css`
|
||||
Allow users to use it by adding `arc-blue` to the list of `THEMES` in your `app.ini`
|
||||
|
@ -196,7 +196,7 @@ Whether you want to change a translation or add a new one, it will need to be th
|
|||
## Hooks aren't running
|
||||
If Gitea is not running hooks, a common cause is incorrect setup of SSH keys.
|
||||
See [SSH Issues](#ssh-issues) for more information.
|
||||
|
||||
|
||||
You can also try logging into the administration panel and running the `Resynchronize pre-receive, update and post-receive hooks of all repositories.` option.
|
||||
|
||||
## SSH issues
|
||||
|
@ -213,8 +213,8 @@ If this is unexpected, please log in with password and setup Gitea under another
|
|||
|
||||
If you do not get the above message but still connect, it means your SSH key is **not** being managed by Gitea. This means hooks won't run, among other potential problems.
|
||||
|
||||
If you cannot connect at all, your SSH key may not be configured correctly locally.
|
||||
This is specific to SSH and not Gitea, so will not be covered here.
|
||||
If you cannot connect at all, your SSH key may not be configured correctly locally.
|
||||
This is specific to SSH and not Gitea, so will not be covered here.
|
||||
|
||||
### SSH Common Errors
|
||||
|
||||
|
@ -269,7 +269,7 @@ To migrate an repository *with* all tags, you need to do two things:
|
|||
```
|
||||
git push --tags
|
||||
```
|
||||
|
||||
|
||||
* (Re-)sync tags of all repositories within Gitea:
|
||||
```
|
||||
gitea admin repo-sync-releases
|
||||
|
@ -285,7 +285,7 @@ Check that you have proper access to the repository
|
|||
error: failed to push some refs to '<GIT_REPO_URL>'
|
||||
```
|
||||
Check the value of `LFS_HTTP_AUTH_EXPIRY` in your `app.ini` file.
|
||||
By default, your LFS token will expire after 20 minutes. If you have a slow connection or a large file (or both), it may not finish uploading within the time limit.
|
||||
By default, your LFS token will expire after 20 minutes. If you have a slow connection or a large file (or both), it may not finish uploading within the time limit.
|
||||
|
||||
You may want to set this value to `60m` or `120m`.
|
||||
|
||||
|
@ -300,11 +300,11 @@ There is no setting for password resets. It is enabled when a [mail service]({{<
|
|||
- By navigating to your `Site Administration -> User Accounts` page and editing a user.
|
||||
- By using the [admin CLI commands]({{< relref "doc/usage/command-line.en-us.md#admin" >}}).
|
||||
Keep in mind most commands will also need a [global flag]({{< relref "doc/usage/command-line.en-us.md#global-options" >}}) to point the CLI at the correct configuration.
|
||||
- As a **user** you can change it...
|
||||
- As a **user** you can change it...
|
||||
- In your account `Settings -> Account` page (this method **requires** you to know your current password).
|
||||
- By using the `Forgot Password` link.
|
||||
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service]({{< relref "doc/usage/email-setup.en-us.md" >}}).
|
||||
|
||||
|
||||
## Why is my markdown broken
|
||||
In Gitea version `1.11` we moved to [goldmark](https://github.com/yuin/goldmark) for markdown rendering, which is [CommonMark](https://commonmark.org/) compliant.
|
||||
If you have markdown that worked as you expected prior to version `1.11` and after upgrading it's not working anymore, please look through the CommonMark spec to see whether the problem is due to a bug or non-compliant syntax.
|
||||
|
|
|
@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
|
|||
No content shown here is rendered, all content is based in the template layouts/doc/search.html
|
||||
|
||||
Setting a very low sitemap priority will tell search engines this is not important content.
|
||||
|
||||
|
|
|
@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
|
|||
No content shown here is rendered, all content is based in the template layouts/doc/search.html
|
||||
|
||||
Setting a very low sitemap priority will tell search engines this is not important content.
|
||||
|
||||
|
|
|
@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
|
|||
No content shown here is rendered, all content is based in the template layouts/doc/search.html
|
||||
|
||||
Setting a very low sitemap priority will tell search engines this is not important content.
|
||||
|
||||
|
|
|
@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
|
|||
No content shown here is rendered, all content is based in the template layouts/doc/search.html
|
||||
|
||||
Setting a very low sitemap priority will tell search engines this is not important content.
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ Note: All steps below requires that the database engine of your choice is instal
|
|||
|
||||
Enter the password as prompted.
|
||||
|
||||
3. Create database user which will be used by Gitea, authenticated by password. This example uses `'gitea'` as password. Please use a secure password for your instance.
|
||||
3. Create database user which will be used by Gitea, authenticated by password. This example uses `'gitea'` as password. Please use a secure password for your instance.
|
||||
|
||||
For local database:
|
||||
|
||||
|
@ -147,7 +147,7 @@ Note: All steps below requires that the database engine of your choice is instal
|
|||
Note: rules on `pg_hba.conf` are evaluated sequentially, that is the first matching rule will be used for authentication. Your PostgreSQL installation may come with generic authentication rules that match all users and databases. You may need to place the rules presented here above such generic rules if it is the case.
|
||||
|
||||
Restart PostgreSQL to apply new authentication rules.
|
||||
|
||||
|
||||
7. On your Gitea server, test connection to the database.
|
||||
|
||||
For local database:
|
||||
|
|
|
@ -84,7 +84,7 @@ To enable Gitea to run as a service, run `sysrc gitea_enable=YES` and start it w
|
|||
|
||||
## Cloudron
|
||||
|
||||
Gitea is available as a 1-click install on [Cloudron](https://cloudron.io).
|
||||
Gitea is available as a 1-click install on [Cloudron](https://cloudron.io).
|
||||
Cloudron makes it easy to run apps like Gitea on your server and keep them up-to-date and secure.
|
||||
|
||||
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=io.gitea.cloudronapp)
|
||||
|
@ -96,7 +96,7 @@ you can experiment with running Gitea.
|
|||
|
||||
## Third-party
|
||||
|
||||
Various other third-party packages of Gitea exist.
|
||||
Various other third-party packages of Gitea exist.
|
||||
To see a curated list, head over to [awesome-gitea](https://gitea.com/gitea/awesome-gitea/src/branch/master/README.md#user-content-packages).
|
||||
|
||||
Do you know of an existing package that isn't on the list? Send in a PR to get it added!
|
||||
|
|
|
@ -40,7 +40,7 @@ Gitea</a>
|
|||
|
||||
First, we must retrieve the source code. Since, the advent of go modules, the
|
||||
simplest way of doing this is to use git directly as we no longer have to have
|
||||
gitea built from within the GOPATH.
|
||||
gitea built from within the GOPATH.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/go-gitea/gitea
|
||||
|
|
|
@ -38,7 +38,7 @@ git branch -a
|
|||
git checkout v{{< version >}}
|
||||
```
|
||||
|
||||
Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activer cette branche en premier :
|
||||
Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activer cette branche en premier :
|
||||
|
||||
```
|
||||
git fetch origin pull/xyz/head:pr-xyz # xyz is PR value
|
||||
|
@ -68,7 +68,7 @@ TAGS="bindata" make build
|
|||
|
||||
## Test
|
||||
|
||||
Après avoir suivi toutes les étapes, vous devriez avoir le binaire `gitea` dans votre répertoire courant. Dans un premier temps, vous pouvez tester qu'il fonctionne puis, dans un second temps, vous pouvez le copier dans la destination de votre choix. Lorsque vous lancez Gitea manuellement à partir de votre CLI, vous pouvez toujours le tuer en appuyant sur `Ctrl + C`.
|
||||
Après avoir suivi toutes les étapes, vous devriez avoir le binaire `gitea` dans votre répertoire courant. Dans un premier temps, vous pouvez tester qu'il fonctionne puis, dans un second temps, vous pouvez le copier dans la destination de votre choix. Lorsque vous lancez Gitea manuellement à partir de votre CLI, vous pouvez toujours le tuer en appuyant sur `Ctrl + C`.
|
||||
|
||||
```
|
||||
./gitea web
|
||||
|
|
|
@ -69,4 +69,3 @@ TAGS="bindata" make build
|
|||
## 需要協助?
|
||||
|
||||
如果本頁中無法解決您的問題,請直接到 [Discord server](https://discord.gg/Gitea),在那邊可以快速得到協助。
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Gitea provides automatically updated Docker images within its Docker Hub organiz
|
|||
possible to always use the latest stable tag or to use another service that handles updating
|
||||
Docker images.
|
||||
|
||||
The rootless image use Gitea internal ssh to provide git protocol and doesn't support openssh.
|
||||
The rootless image use Gitea internal ssh to provide git protocol and doesn't support openssh.
|
||||
|
||||
This reference setup guides users through the setup based on `docker-compose`, but the installation
|
||||
of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow
|
||||
|
|
|
@ -306,7 +306,7 @@ container if you wish to use SSH support. If you wish to do this without running
|
|||
SSH on a non-standard port (or move your host port to a non-standard port), you can forward
|
||||
SSH connections destined for the container with a little extra setup.
|
||||
|
||||
This guide assumes that you have created a user on the host called `git` which shares the same
|
||||
This guide assumes that you have created a user on the host called `git` which shares the same
|
||||
UID/GID as the container values `USER_UID`/`USER_GID`. You should also create the directory
|
||||
`/var/lib/gitea` on the host, owned by the `git` user and mounted in the container, e.g.
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ docker run -d --name=gitea -p 10022:22 -p 10080:3000 -v /var/lib/gitea:/data git
|
|||
|
||||
Vous devriez avoir une instance fonctionnelle de Gitea. Pour accèder à l'interface web, visitez l'adresse http://hostname:10080 avec votre navigateur web préféré. Si vous voulez clôner un dépôt, vous pouvez le faire avec la commande `git clone ssh://git@hostname:10022/username/repo.git`.
|
||||
|
||||
## Named Volumes
|
||||
## Named Volumes
|
||||
|
||||
Ce guide aboutira à une installation avec les données Gita et PostgreSQL stockées dans des volumes nommés. Cela permet une sauvegarde, une restauration et des mises à niveau en toute simplicité.
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ Then repeat the procedure, but this time using the [lastest release](https://dl.
|
|||
|
||||
## Upgrading from a more recent version of Gogs
|
||||
|
||||
Upgrading from a more recent version of Gogs is also possible, but requires a bit more work.
|
||||
Upgrading from a more recent version of Gogs is also possible, but requires a bit more work.
|
||||
See [#4286](https://github.com/go-gitea/gitea/issues/4286).
|
||||
|
||||
## Troubleshooting
|
||||
|
|
|
@ -312,12 +312,12 @@ Diagnose the problems of current gitea instance according the given configuratio
|
|||
Currently there are a check list below:
|
||||
|
||||
- Check if OpenSSH authorized_keys file id correct
|
||||
When your gitea instance support OpenSSH, your gitea instance binary path will be written to `authorized_keys`
|
||||
When your gitea instance support OpenSSH, your gitea instance binary path will be written to `authorized_keys`
|
||||
when there is any public key added or changed on your gitea instance.
|
||||
Sometimes if you moved or renamed your gitea binary when upgrade and you haven't run `Update the '.ssh/authorized_keys' file with Gitea SSH keys. (Not needed for the built-in SSH server.)` on your Admin Panel. Then all pull/push via SSH will not be work.
|
||||
This check will help you to check if it works well.
|
||||
|
||||
For contributors, if you want to add more checks, you can wrie ad new function like `func(ctx *cli.Context) ([]string, error)` and
|
||||
For contributors, if you want to add more checks, you can wrie ad new function like `func(ctx *cli.Context) ([]string, error)` and
|
||||
append it to `doctor.go`.
|
||||
|
||||
```go
|
||||
|
@ -407,7 +407,7 @@ Manage running server operations:
|
|||
- `--expression value`, `-e value`: Matching expression for the logger
|
||||
- `--prefix value`, `-p value`: Prefix for the logger
|
||||
- `--color`: Use color in the logs
|
||||
- `--filename value`, `-f value`: Filename for the logger -
|
||||
- `--filename value`, `-f value`: Filename for the logger -
|
||||
- `--rotate`, `-r`: Rotate logs
|
||||
- `--max-size value`, `-s value`: Maximum size in bytes before rotation
|
||||
- `--daily`, `-d`: Rotate logs daily
|
||||
|
|
|
@ -17,7 +17,7 @@ menu:
|
|||
|
||||
To use Gitea's built-in Email support, update the `app.ini` config file [mailer] section:
|
||||
|
||||
## Sendmail version
|
||||
## Sendmail version
|
||||
Use the operating system’s sendmail command instead of SMTP. This is common on Linux servers.
|
||||
Note: For use in the official Gitea Docker image, please configure with the SMTP version.
|
||||
```ini
|
||||
|
@ -48,7 +48,7 @@ For the full list of options check the [Config Cheat Sheet]({{< relref "doc/adva
|
|||
|
||||
- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
|
||||
- Via the server supporting TLS through STARTTLS - usually provided on port 587. (Also known as Opportunistic TLS.)
|
||||
- SMTPS connection (SMTP over transport layer security) via the default port 465.
|
||||
- SMTPS connection (SMTP over transport layer security) via the default port 465.
|
||||
- Forced SMTPS connection with `IS_TLS_ENABLED=true`. (These are both known as Implicit TLS.)
|
||||
- This is due to protections imposed by the Go internal libraries against STRIPTLS attacks.
|
||||
|
||||
|
|
|
@ -23,4 +23,4 @@ To use Gitea's built-in LFS support, you must update the `app.ini` file:
|
|||
LFS_START_SERVER = true
|
||||
; Where your lfs files reside, default is data/lfs.
|
||||
LFS_CONTENT_PATH = /home/gitea/data/lfs
|
||||
```
|
||||
```
|
||||
|
|
|
@ -17,7 +17,7 @@ menu:
|
|||
|
||||
Some projects have a standard list of questions that users need to answer
|
||||
when creating an issue or pull request. Gitea supports adding templates to the
|
||||
main branch of the repository so that they can autopopulate the form when users are
|
||||
main branch of the repository so that they can autopopulate the form when users are
|
||||
creating issues and pull requests. This will cut down on the initial back and forth
|
||||
of getting some clarifying details.
|
||||
|
||||
|
@ -45,7 +45,7 @@ Additionally, the New Issue page URL can be suffixed with `?title=Issue+Title&bo
|
|||
|
||||
# Issue Template Directory
|
||||
|
||||
Alternatively, users can create multiple issue templates inside a special directory and allow users to choose one that more specifically
|
||||
Alternatively, users can create multiple issue templates inside a special directory and allow users to choose one that more specifically
|
||||
addresses their problem.
|
||||
|
||||
Possible directory names for issue templates:
|
||||
|
@ -74,6 +74,6 @@ This is the template!
|
|||
```
|
||||
|
||||
In the above example, when a user is presented with the list of issues they can submit, this would show as `Template Name` with the description
|
||||
`This template is for testing!`. When submitting an issue with the above example, the issue title would be pre-populated with
|
||||
`This template is for testing!`. When submitting an issue with the above example, the issue title would be pre-populated with
|
||||
`[TEST] ` while the issue body would be pre-populated with `This is the template!`. The issue would also be assigned two labels,
|
||||
`bug` and `help needed`.
|
||||
|
|
|
@ -45,7 +45,7 @@ server {
|
|||
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
|
||||
|
||||
## Using Nginx as a reverse proxy and serve static resources directly
|
||||
We can tune the performance in splitting requests into categories static and dynamic.
|
||||
We can tune the performance in splitting requests into categories static and dynamic.
|
||||
|
||||
CSS files, JavaScript files, images and web fonts are static content.
|
||||
The front page, a repository view or issue list is dynamic content.
|
||||
|
@ -205,7 +205,7 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a
|
|||
- Open the IIS Manager Console and click on the `Gitea Proxy` Website from the tree view on the left. Select and double click the URL Rewrite Icon from the middle pane to load the URL Rewrite interface.
|
||||
- Choose the `Add Rule` action from the right pane of the management console and select the `Reverse Proxy Rule` from the `Inbound and Outbound Rules` category.
|
||||
- In the Inbound Rules section, set the server name to be the host that Gitea is running on with its port. e.g. if you are running Gitea on the localhost with port 3000, the following should work: `127.0.0.1:3000`
|
||||
- Enable SSL Offloading
|
||||
- Enable SSL Offloading
|
||||
- In the Outbound Rules, ensure `Rewrite the domain names of the links in HTTP response` is set and set the `From:` field as above and the `To:` to your external hostname, say: `git.example.com`
|
||||
- Now edit the `web.config` for your website to match the following: (changing `127.0.0.1:3000` and `git.example.com` as appropriate)
|
||||
|
||||
|
|
|
@ -69,4 +69,3 @@ Feeding `go-sdk` to the available transformers yields...
|
|||
| LOWER | go-sdk |
|
||||
| UPPER | GO-SDK |
|
||||
| TITLE | Go-Sdk |
|
||||
|
||||
|
|
Loading…
Reference in a new issue