2019-04-13 05:46:52 +03:00
---
date: "2019-04-05T16:00:00+02:00"
title: "FAQ"
slug: "faq"
weight: 5
2020-12-09 09:47:06 +03:00
toc: false
2019-04-13 05:46:52 +03:00
draft: false
Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.
1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-28 06:33:41 +03:00
aliases:
- /en-us/faq
2019-04-13 05:46:52 +03:00
menu:
sidebar:
parent: "help"
name: "FAQ"
weight: 5
identifier: "faq"
---
2020-12-04 10:33:38 +03:00
# Frequently Asked Questions <!-- omit in toc -->
2019-04-13 05:46:52 +03:00
2022-07-28 04:22:47 +03:00
This page contains some common questions and answers.
Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.
1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-28 06:33:41 +03:00
For more help resources, check all [Support Options ]({{< relref "doc/help/support.en-us.md" >}} ).
2020-12-09 09:47:06 +03:00
**Table of Contents**
2019-04-13 05:46:52 +03:00
2020-12-08 07:52:26 +03:00
{{< toc > }}
2019-04-13 05:46:52 +03:00
2019-04-24 21:44:58 +03:00
## Difference between 1.x and 1.x.x downloads
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
Version 1.7.x will be used for this example.
2020-12-09 09:47:06 +03:00
**NOTE:** this example applies to Docker images as well!
2019-04-24 21:44:58 +03:00
2022-07-28 04:22:47 +03:00
On our [downloads page ](https://dl.gitea.io/gitea/ ) you will see a 1.7 directory, as well as directories for 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, and 1.7.6.
The 1.7 and 1.7.0 directories are **not** the same. The 1.7 directory is built on each merged commit to the [`release/v1.7` ](https://github.com/go-gitea/gitea/tree/release/v1.7 ) branch.
2020-12-09 09:47:06 +03:00
The 1.7.0 directory, however, is a build that was created when the [`v1.7.0` ](https://github.com/go-gitea/gitea/releases/tag/v1.7.0 ) tag was created.
2019-04-24 21:44:58 +03:00
2022-07-28 04:22:47 +03:00
This means that 1.x downloads will change as commits are merged to their respective branch (think of it as a separate "main" branch for each release).
2019-04-24 21:44:58 +03:00
On the other hand, 1.x.x downloads should never change.
2019-04-13 05:46:52 +03:00
## How to migrate from Gogs/GitHub/etc. to Gitea
2020-12-09 09:47:06 +03:00
2019-04-13 05:46:52 +03:00
To migrate from Gogs to Gitea:
2023-03-23 18:18:24 +03:00
- [Gogs version 0.9.146 or less ]({{< relref "doc/installation/upgrade-from-gogs.en-us.md" >}} )
2020-12-09 09:47:06 +03:00
- [Gogs version 0.11.46.0418 ](https://github.com/go-gitea/gitea/issues/4286 )
2019-04-13 05:46:52 +03:00
2022-07-28 04:22:47 +03:00
To migrate from GitHub to Gitea, you can use Gitea's built-in migration form.
In order to migrate items such as issues, pull requests, etc. you will need to input at least your username.
2020-01-24 17:23:38 +03:00
[Example (requires login) ](https://try.gitea.io/repo/migrate )
2019-04-13 05:46:52 +03:00
2022-07-28 04:22:47 +03:00
To migrate from GitLab to Gitea, you can use this non-affiliated tool:
2019-04-13 05:46:52 +03:00
https://github.com/loganinak/MigrateGitlabToGogs
2020-12-04 10:33:38 +03:00
## Where does Gitea store what file
2020-12-09 09:47:06 +03:00
2022-11-10 04:22:31 +03:00
- _`AppWorkPath`_
- The `--work-path` flag
- Else Environment variable `GITEA_WORK_DIR`
- Else a built-in value set at build time
2022-05-28 11:47:13 +03:00
- Else the directory that contains the Gitea binary
2022-11-10 04:22:31 +03:00
- `%(APP_DATA_PATH)` (default for database, indexers, etc.)
2020-12-09 09:47:06 +03:00
- `APP_DATA_PATH` from `app.ini`
2022-11-10 04:22:31 +03:00
- Else _`AppWorkPath`_ `/data`
- _`CustomPath`_ (custom templates)
- The `--custom-path` flag
- Else Environment variable `GITEA_CUSTOM`
- Else a built-in value set at build time
- Else _`AppWorkPath`_ `/custom`
2020-12-09 09:47:06 +03:00
- HomeDir
- Unix: Environment variable `HOME`
- Windows: Environment variable `USERPROFILE` , else environment variables `HOMEDRIVE` +`HOMEPATH`
- RepoRootPath
2022-05-31 01:47:55 +03:00
- `ROOT` in the \[repository] section of `app.ini` if absolute
2022-11-10 04:22:31 +03:00
- Else _`AppWorkPath`_ `/ROOT` if `ROOT` in the \[repository] section of `app.ini` if relative
- Default `%(APP_DATA_PATH)/gitea-repositories`
2020-12-09 09:47:06 +03:00
- INI (config file)
2022-11-10 04:22:31 +03:00
- `--config` flag
- A possible built-in value set a build time
- Else _`CustomPath`_ `/conf/app.ini`
2020-12-09 09:47:06 +03:00
- SQLite Database
- `PATH` in `database` section of `app.ini`
2022-11-10 04:22:31 +03:00
- Else `%(APP_DATA_PATH)/gitea.db`
2019-04-13 05:46:52 +03:00
## Not seeing a clone URL or the clone URL being incorrect
2020-12-09 09:47:06 +03:00
2019-04-13 05:46:52 +03:00
There are a few places that could make this show incorrectly.
2023-03-23 18:18:24 +03:00
1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide ]({{< relref "doc/administration/reverse-proxies.en-us.md" >}} )
2019-04-13 05:46:52 +03:00
2. Make sure you have correctly set `ROOT_URL` in the `server` section of your `app.ini`
If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini`
2022-07-28 04:22:47 +03:00
- `DISABLE_HTTP_GIT` : if set to true, there will be no HTTP/HTTPS link
- `DISABLE_SSH` : if set to true, there will be no SSH link
- `SSH_EXPOSE_ANONYMOUS` : if set to false, SSH links will be hidden for anonymous users
2019-04-13 05:46:52 +03:00
2021-07-10 03:16:07 +03:00
## File upload fails with: 413 Request Entity Too Large
This error occurs when the reverse proxy limits the file upload size.
2023-03-23 18:18:24 +03:00
See the [reverse proxy guide ]({{< relref "doc/administration/reverse-proxies.en-us.md" >}} ) for a solution with nginx.
2021-07-10 03:16:07 +03:00
2019-04-13 05:46:52 +03:00
## Custom Templates not loading or working incorrectly
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
Gitea's custom templates must be added to the correct location or Gitea will not find and use them.
2019-04-13 05:46:52 +03:00
The correct path for the template(s) will be relative to the `CustomPath`
2020-11-28 09:12:22 +03:00
1. To find `CustomPath` , look for Custom File Root Path in Site Administration -> Configuration
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
If that doesn't exist, you can try `echo $GITEA_CUSTOM`
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
2. If you are still unable to find a path, the default can be [calculated above ](#where-does-gitea-store-what-file )
2023-03-23 18:18:24 +03:00
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea ]({{< relref "doc/administration/customizing-gitea.en-us.md" >}} ) page to add your template to the correct location.
2019-04-13 05:46:52 +03:00
2023-04-11 19:36:58 +03:00
## Does Gitea have a "GitHub/GitLab pages" feature?
Gitea doesn't provide a built-in Pages server. You need a dedicated domain to serve static pages to avoid CSRF security risks.
For simple usage, you can use a reverse proxy to rewrite & serve static contents from Gitea's raw file URLs.
And there are already available third-party services, like a standalone [pages server ](https://codeberg.org/Codeberg/pages-server ) or a [caddy plugin ](https://github.com/42wim/caddy-gitea ), that can provide the required functionality.
2019-04-13 05:46:52 +03:00
## Active user vs login prohibited user
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
In Gitea, an "active" user refers to a user that has activated their account via email.
2019-04-13 05:46:52 +03:00
A "login prohibited" user is a user that is not allowed to log in to Gitea anymore
2020-11-28 09:12:22 +03:00
## Setting up logging
2020-12-09 09:47:06 +03:00
2023-05-22 11:47:33 +03:00
- [Official Docs ]({{< relref "doc/administration/logging-config.en-us.md" >}} )
2019-04-13 05:46:52 +03:00
## What is Swagger?
2020-12-09 09:47:06 +03:00
2022-09-20 01:48:48 +03:00
[Swagger ](https://swagger.io/ ) is what Gitea uses for its API documentation.
2022-07-28 04:22:47 +03:00
2022-09-20 01:48:48 +03:00
All Gitea instances have the built-in API and there is no way to disable it completely.
You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini` .
2023-03-23 18:18:24 +03:00
For more information, refer to Gitea's [API docs ]({{< relref "doc/development/api-usage.en-us.md" >}} ).
2022-07-28 04:22:47 +03:00
2022-09-20 01:48:48 +03:00
You can see the latest API (for example) on < https: / / try . gitea . io / api / swagger > .
2019-04-13 05:46:52 +03:00
2023-01-17 23:18:42 +03:00
You can also see an example of the `swagger.json` file at < https: // try . gitea . io / swagger . v1 . json > .
2019-04-13 05:46:52 +03:00
## Adjusting your server for public/private use
### Preventing spammers
2020-12-09 09:47:06 +03:00
There are multiple things you can combine to prevent spammers.
2019-04-13 05:46:52 +03:00
2021-02-15 02:31:29 +03:00
1. By whitelisting or blocklisting certain email domains
2. By only whitelisting certain domains with OpenID (see below)
3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
2023-03-23 18:18:24 +03:00
4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI ]({{< relref "doc/administration/command-line.en-us.md" >}} ), [API ]({{< relref "doc/development/api-usage.en-us.md" >}} ), or Gitea's Admin UI
2019-04-13 05:46:52 +03:00
2021-02-15 02:31:29 +03:00
### Only allow/block certain email domains
2020-12-09 09:47:06 +03:00
2021-02-15 02:31:29 +03:00
You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]`
2019-09-17 09:24:39 +03:00
### Only allow/block certain OpenID providers
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
You can configure `WHITELISTED_URIS` or `BLACKLISTED_URIS` under `[openid]` in your `app.ini`
2019-04-13 05:46:52 +03:00
**NOTE:** whitelisted takes precedence, so if it is non-blank then blacklisted is ignored
### Issue only users
2020-12-09 09:47:06 +03:00
2019-04-13 05:46:52 +03:00
The current way to achieve this is to create/modify a user with a max repo creation limit of 0.
2020-01-13 20:33:46 +03:00
### Restricted users
2020-12-09 09:47:06 +03:00
Restricted users are limited to a subset of the content based on their organization/team memberships and collaborations, ignoring the public flag on organizations/repos etc.\_\_
2020-01-13 20:33:46 +03:00
2021-07-08 14:38:13 +03:00
Example use case: A company runs a Gitea instance that requires login. Most repos are public (accessible/browsable by all co-workers).
2020-01-13 20:33:46 +03:00
At some point, a customer or third party needs access to a specific repo and only that repo. Making such a customer account restricted and granting any needed access using team membership(s) and/or collaboration(s) is a simple way to achieve that without the need to make everything private.
2019-04-13 05:46:52 +03:00
### Enable Fail2ban
2023-03-23 18:18:24 +03:00
Use [Fail2Ban ]({{< relref "doc/administration/fail2ban-setup.en-us.md" >}} ) to monitor and stop automated login attempts or other malicious behavior based on log patterns
2019-04-13 05:46:52 +03:00
## How to add/use custom themes
2020-12-09 09:47:06 +03:00
2021-09-27 17:47:44 +03:00
Gitea supports three official themes right now, `gitea` (light), `arc-green` (dark), and `auto` (automatically switches between the previous two depending on operating system settings).
2020-12-09 09:47:06 +03:00
To add your own theme, currently the only way is to provide a complete theme (not just color overrides)
2020-11-28 09:12:22 +03:00
2022-07-28 04:22:47 +03:00
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/public/css`
2019-04-13 05:46:52 +03:00
Allow users to use it by adding `arc-blue` to the list of `THEMES` in your `app.ini`
## SSHD vs built-in SSH
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
SSHD is the built-in SSH server on most Unix systems.
2019-04-13 05:46:52 +03:00
Gitea also provides its own SSH server, for usage when SSHD is not available.
## Gitea is running slow
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
The most common culprit for this is loading federated avatars.
This can be turned off by setting `ENABLE_FEDERATED_AVATAR` to `false` in your `app.ini`
2019-04-13 05:46:52 +03:00
Another option that may need to be changed is setting `DISABLE_GRAVATAR` to `true` in your `app.ini`
## Can't create repositories/files
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
Make sure that Gitea has sufficient permissions to write to its home directory and data directory.
See [AppDataPath and RepoRootPath ](#where-does-gitea-store-what-file )
2019-04-13 05:46:52 +03:00
**Note for Arch users:** At the time of writing this, there is an issue with the Arch package's systemd file including this line:
2022-07-28 04:22:47 +03:00
`ReadWritePaths=/etc/gitea/app.ini`
2019-04-13 05:46:52 +03:00
Which makes all other paths non-writeable to Gitea.
## Translation is incorrect/how to add more translations
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
Our translations are currently crowd-sourced on our [Crowdin project ](https://crowdin.com/project/gitea )
2019-04-13 05:46:52 +03:00
Whether you want to change a translation or add a new one, it will need to be there as all translations are overwritten in our CI via the Crowdin integration.
2022-09-29 20:20:22 +03:00
## Push Hook / Webhook aren't running
2020-12-09 09:47:06 +03:00
2022-09-29 20:20:22 +03:00
If you can push but can't see push activities on the home dashboard, or the push doesn't trigger webhook, there are a few possibilities:
2022-07-28 04:22:47 +03:00
2022-09-29 20:20:22 +03:00
1. The git hooks are out of sync: run "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel
2. The git repositories (and hooks) are stored on some filesystems (ex: mounted by NAS) which don't support script execution, make sure the filesystem supports `chmod a+x any-script`
3. If you are using docker, make sure Docker Server (not the client) >= 20.10.6
2019-04-13 05:46:52 +03:00
## SSH issues
2020-12-09 09:47:06 +03:00
2019-04-13 05:46:52 +03:00
If you cannot reach repositories over `ssh` , but `https` works fine, consider looking into the following.
2022-07-28 04:22:47 +03:00
First, make sure you can access Gitea via SSH.
2020-12-09 09:47:06 +03:00
`ssh git@myremote.example`
2019-04-13 05:46:52 +03:00
If the connection is successful, you should receive an error message like the following:
2020-12-09 09:47:06 +03:00
2019-04-13 05:46:52 +03:00
```
Hi there, You've successfully authenticated, but Gitea does not provide shell access.
If this is unexpected, please log in with password and setup Gitea under another user.
```
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.
2020-11-28 09:12:22 +03:00
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.
2019-04-13 05:46:52 +03:00
### SSH Common Errors
```
Permission denied (publickey).
fatal: Could not read from remote repository.
```
This error signifies that the server rejected a log in attempt, check the
following things:
2020-12-09 09:47:06 +03:00
- On the client:
- Ensure the public and private ssh keys are added to the correct Gitea user.
- Make sure there are no issues in the remote url. In particular, ensure the name of the
2021-12-24 06:56:57 +03:00
Git user (before the `@` ) is spelled correctly.
2020-12-09 09:47:06 +03:00
- Ensure public and private ssh keys are correct on client machine.
- On the server:
- Make sure the repository exists and is correctly named.
- Check the permissions of the `.ssh` directory in the system user's home directory.
2022-07-28 04:22:47 +03:00
- Verify that the correct public keys are added to `.ssh/authorized_keys` .
2019-04-13 05:46:52 +03:00
Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the
Gitea admin panel.
2020-12-09 09:47:06 +03:00
- Read Gitea logs.
- Read /var/log/auth (or similar).
- Check permissions of repositories.
2019-04-13 05:46:52 +03:00
The following is an example of a missing public SSH key where authentication
succeeded, but some other setting is preventing SSH from reaching the correct
repository.
```
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
In this case, look into the following settings:
2020-12-09 09:47:06 +03:00
- On the server:
- Make sure that the `git` system user has a usable shell set
- Verify this with `getent passwd git | cut -d: -f7`
- `usermod` or `chsh` can be used to modify this.
- Ensure that the `gitea serv` command in `.ssh/authorized_keys` uses the
2019-04-13 05:46:52 +03:00
correct configuration file.
## Missing releases after migrating repository with tags
2020-12-09 09:47:06 +03:00
To migrate an repository _with_ all tags, you need to do two things:
- Push tags to the repository:
2019-04-13 05:46:52 +03:00
```
git push --tags
2020-12-09 09:47:06 +03:00
```
2020-11-28 09:12:22 +03:00
2020-12-09 09:47:06 +03:00
- (Re-)sync tags of all repositories within Gitea:
```
gitea admin repo-sync-releases
```
2019-04-13 05:46:52 +03:00
## LFS Issues
For issues concerning LFS data upload
```
2020-12-09 09:47:06 +03:00
batch response: Authentication required: Authorization error: < GITEA_LFS_URL > /info/lfs/objects/batch
2019-04-13 05:46:52 +03:00
Check that you have proper access to the repository
error: failed to push some refs to '< GIT_REPO_URL > '
```
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
Check the value of `LFS_HTTP_AUTH_EXPIRY` in your `app.ini` file.
2020-11-28 09:12:22 +03:00
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.
2019-04-13 05:46:52 +03:00
You may want to set this value to `60m` or `120m` .
2019-11-05 21:54:54 +03:00
## How can I create users before starting Gitea
2020-12-09 09:47:06 +03:00
2023-03-23 18:18:24 +03:00
Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands ]({{< relref "doc/administration/command-line.en-us.md#admin" >}} ) to add users like normal.
2019-11-08 22:44:18 +03:00
## How can I enable password reset
2020-12-09 09:47:06 +03:00
2023-03-23 18:18:24 +03:00
There is no setting for password resets. It is enabled when a [mail service ]({{< relref "doc/administration/email-setup.en-us.md" >}} ) is configured, and disabled otherwise.
2019-11-08 22:44:18 +03:00
## How can a user's password be changed
2020-12-09 09:47:06 +03:00
2019-11-08 22:44:18 +03:00
- As an **admin** , you can change any user's password (and optionally force them to change it on next login)...
2020-12-09 09:47:06 +03:00
- By navigating to your `Site Administration -> User Accounts` page and editing a user.
2023-03-23 18:18:24 +03:00
- By using the [admin CLI commands ]({{< relref "doc/administration/command-line.en-us.md#admin" >}} ).
2022-07-28 04:22:47 +03:00
2023-03-23 18:18:24 +03:00
Keep in mind most commands will also need a [global flag ]({{< relref "doc/administration/command-line.en-us.md#global-options" >}} ) to point the CLI at the correct configuration.
2020-11-28 09:12:22 +03:00
- As a **user** you can change it...
2019-11-08 22:44:18 +03:00
- In your account `Settings -> Account` page (this method **requires** you to know your current password).
2022-07-28 04:22:47 +03:00
- By using the `Forgot Password` link.
2023-03-23 18:18:24 +03:00
If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service ]({{< relref "doc/administration/email-setup.en-us.md" >}} ).
2020-11-28 09:12:22 +03:00
2020-03-05 18:05:18 +03:00
## Why is my markdown broken
2020-12-09 09:47:06 +03:00
2022-07-28 04:22:47 +03:00
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.
2020-03-05 18:05:18 +03:00
If it is the latter, _usually_ there is a compliant alternative listed in the spec.
2020-09-09 20:31:31 +03:00
## Upgrade errors with MySQL
If you are receiving errors on upgrade of Gitea using MySQL that read:
> `ORM engine initialization failed: migrate: do migrate: Error: 1118: Row size too large...`
Please run `gitea convert` or run `ALTER TABLE table_name ROW_FORMAT=dynamic;` for each table in the database.
The underlying problem is that the space allocated for indices by the default row format
is too small. Gitea requires that the `ROWFORMAT` for its tables is `DYNAMIC` .
If you are receiving an error line containing `Error 1071: Specified key was too long; max key length is 1000 bytes...`
then you are attempting to run Gitea on tables which use the ISAM engine. While this may have worked by chance in previous versions of Gitea, it has never been officially supported and
2022-07-28 04:22:47 +03:00
you must use InnoDB. You should run `ALTER TABLE table_name ENGINE=InnoDB;` for each table in the database.
2021-05-05 07:39:09 +03:00
If you are using MySQL 5, another possible fix is
2022-07-28 04:22:47 +03:00
2021-05-05 07:39:09 +03:00
```mysql
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_large_prefix=1;
```
2020-09-09 20:31:31 +03:00
## Why Are Emoji Broken On MySQL
Unfortunately MySQL's `utf8` charset does not completely allow all possible UTF-8 characters, in particular Emoji.
They created a new charset and collation called `utf8mb4` that allows for emoji to be stored but tables which use
the `utf8` charset, and connections which use the `utf8` charset will not use this.
Please run `gitea convert` , or run `ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`
for the database_name and run `ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`
for each table in the database.
You will also need to change the app.ini database charset to `CHARSET=utf8mb4` .
2020-12-04 18:01:47 +03:00
## Why are Emoji displaying only as placeholders or in monochrome
Gitea requires the system or browser to have one of the supported Emoji fonts installed, which are Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji and Twemoji Mozilla. Generally, the operating system should already provide one of these fonts, but especially on Linux, it may be necessary to install them manually.
2022-02-10 22:20:06 +03:00
## Stdout logging on SystemD and Docker
Stdout on systemd goes to the journal by default. Try using `journalctl` , `journalctl -u gitea` , or `journalctl <path-to-gitea-binary>` .
2022-09-07 18:58:55 +03:00
Similarly, stdout on docker can be viewed using `docker logs <container>` .
Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.
1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-28 06:33:41 +03:00
To collect logs for help and issue report, see [Support Options ]({{< relref "doc/help/support.en-us.md" >}} ).
2022-02-10 22:20:06 +03:00
## Initial logging
Before Gitea has read the configuration file and set-up its logging it will log a number of things to stdout in order to help debug things if logging does not work.
You can stop this logging by setting the `--quiet` or `-q` option. Please note this will only stop logging until Gitea has set-up its own logging.
If you report a bug or issue you MUST give us logs with this information restored.
You should only set this option once you have completely configured everything.
## Warnings about struct defaults during database startup
Sometimes when there are migrations the old columns and default values may be left
unchanged in the database schema. This may lead to warning such as:
```
2020/08/02 11:32:29 ...rm/session_schema.go:360:Sync2() [W] Table user Column keep_activity_private db default is , struct default is 0
```
2022-09-07 18:58:55 +03:00
These can safely be ignored, but you are able to stop these warnings by getting Gitea to recreate these tables using:
2022-02-10 22:20:06 +03:00
```
gitea doctor recreate-table user
```
This will cause Gitea to recreate the user table and copy the old data into the new table
with the defaults set appropriately.
You can ask Gitea to recreate multiple tables using:
```
gitea doctor recreate-table table1 table2 ...
```
And if you would like Gitea to recreate all tables simply call:
```
gitea doctor recreate-table
```
It is highly recommended to back-up your database before running these commands.
2022-07-21 07:54:42 +03:00
## Why are tabs/indents wrong when viewing files
2022-07-28 04:22:47 +03:00
If you are using Cloudflare, turn off the auto-minify option in the dashboard.
2022-07-21 07:54:42 +03:00
`Speed` -> `Optimization` -> Uncheck `HTML` within the `Auto-Minify` settings.
2023-02-06 19:20:20 +03:00
## How to adopt repositories from disk
- Add your (bare) repositories to the correct spot for your configuration (`repository.ROOT`), ensuring they are in the correct layout `<REPO_ROOT>/[user]/[repo].git` .
- **Note:** the directory names must be lowercase.
- You can also check `<ROOT_URL>/admin/config` for the repository root path.
- Ensure that the user/org exists that you want to adopt repositories for.
- As an admin, go to `<ROOT_URL>/admin/repos/unadopted` and search.
2023-03-23 18:18:24 +03:00
- Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES` ]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}} ).
2023-02-06 19:20:20 +03:00
- If the above steps are done correctly, you should be able to select repositories to adopt.
2023-03-23 18:18:24 +03:00
- If no repositories are found, enable [debug logging ]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}} ) to check for any specific errors.