You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

faq.en-us.md 20KB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
Restricted users (#6274) * Restricted users (#4334): initial implementation * Add User.IsRestricted & UI to edit it * Pass user object instead of user id to places where IsRestricted flag matters * Restricted users: maintain access rows for all referenced repos (incl public) * Take logged in user & IsRestricted flag into account in org/repo listings, searches and accesses * Add basic repo access tests for restricted users Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Mention restricted users in the faq Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert unnecessary change `.isUserPartOfOrg` -> `.IsUserPartOfOrg` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Remove unnecessary `org.IsOrganization()` call Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert to an `int64` keyed `accessMap` * Add type `userAccess` * Add convenience func updateUserAccess() * Turn accessMap into a `map[int64]userAccess` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * or even better: `map[int64]*userAccess` * updateUserAccess(): use tighter syntax as suggested by lafriks * even tighter * Avoid extra loop * Don't disclose limited orgs to unauthenticated users * Don't assume block only applies to orgs * Use an array of `VisibleType` for filtering * fix yet another thinko * Ok - no need for u * Revert "Ok - no need for u" This reverts commit 5c3e886aabd5acd997a3b35687d322439732c200. Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
Restricted users (#6274) * Restricted users (#4334): initial implementation * Add User.IsRestricted & UI to edit it * Pass user object instead of user id to places where IsRestricted flag matters * Restricted users: maintain access rows for all referenced repos (incl public) * Take logged in user & IsRestricted flag into account in org/repo listings, searches and accesses * Add basic repo access tests for restricted users Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Mention restricted users in the faq Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert unnecessary change `.isUserPartOfOrg` -> `.IsUserPartOfOrg` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Remove unnecessary `org.IsOrganization()` call Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert to an `int64` keyed `accessMap` * Add type `userAccess` * Add convenience func updateUserAccess() * Turn accessMap into a `map[int64]userAccess` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * or even better: `map[int64]*userAccess` * updateUserAccess(): use tighter syntax as suggested by lafriks * even tighter * Avoid extra loop * Don't disclose limited orgs to unauthenticated users * Don't assume block only applies to orgs * Use an array of `VisibleType` for filtering * fix yet another thinko * Ok - no need for u * Revert "Ok - no need for u" This reverts commit 5c3e886aabd5acd997a3b35687d322439732c200. Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
Restricted users (#6274) * Restricted users (#4334): initial implementation * Add User.IsRestricted & UI to edit it * Pass user object instead of user id to places where IsRestricted flag matters * Restricted users: maintain access rows for all referenced repos (incl public) * Take logged in user & IsRestricted flag into account in org/repo listings, searches and accesses * Add basic repo access tests for restricted users Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Mention restricted users in the faq Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert unnecessary change `.isUserPartOfOrg` -> `.IsUserPartOfOrg` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Remove unnecessary `org.IsOrganization()` call Signed-off-by: Manush Dodunekov <manush@stendahls.se> * Revert to an `int64` keyed `accessMap` * Add type `userAccess` * Add convenience func updateUserAccess() * Turn accessMap into a `map[int64]userAccess` Signed-off-by: Manush Dodunekov <manush@stendahls.se> * or even better: `map[int64]*userAccess` * updateUserAccess(): use tighter syntax as suggested by lafriks * even tighter * Avoid extra loop * Don't disclose limited orgs to unauthenticated users * Don't assume block only applies to orgs * Use an array of `VisibleType` for filtering * fix yet another thinko * Ok - no need for u * Revert "Ok - no need for u" This reverts commit 5c3e886aabd5acd997a3b35687d322439732c200. Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. ---
  2. date: "2019-04-05T16:00:00+02:00"
  3. title: "FAQ"
  4. slug: "faq"
  5. weight: 5
  6. toc: false
  7. draft: false
  8. aliases:
  9. - /en-us/faq
  10. menu:
  11. sidebar:
  12. parent: "help"
  13. name: "FAQ"
  14. weight: 5
  15. identifier: "faq"
  16. ---
  17. # Frequently Asked Questions <!-- omit in toc -->
  18. This page contains some common questions and answers.
  19. For more help resources, check all [Support Options]({{< relref "doc/help/support.en-us.md" >}}).
  20. **Table of Contents**
  21. {{< toc >}}
  22. ## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes?
  23. Version 1.20.x will be used for this example.
  24. On our [downloads page](https://dl.gitea.com/gitea/) you will see a 1.20 directory, as well as directories for 1.20.0, 1.20.1.
  25. The 1.20 directory is the nightly build, which is built on each merged commit to the [`release/v1.20`](https://github.com/go-gitea/gitea/tree/release/v1.20) branch.
  26. The 1.20.0 directory is a release build that was created when the [`v1.20.0`](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) tag was created.
  27. The nightly builds (1.x) downloads will change as commits are merged to their respective branch, they contain the latest changes/fixes before a tag release is built.
  28. If a bug fix is targeted on 1.20.1 but 1.20.1 is not released yet, you can get the "1.20-nightly" build to get the bug fix.
  29. ## How to migrate from Gogs/GitHub/etc. to Gitea
  30. To migrate from Gogs to Gitea:
  31. - [Gogs version 0.9.146 or less]({{< relref "doc/installation/upgrade-from-gogs.en-us.md" >}})
  32. - [Gogs version 0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286)
  33. To migrate from GitHub to Gitea, you can use Gitea's built-in migration form.
  34. In order to migrate items such as issues, pull requests, etc. you will need to input at least your username.
  35. [Example (requires login)](https://try.gitea.io/repo/migrate)
  36. To migrate from GitLab to Gitea, you can use this non-affiliated tool:
  37. https://github.com/loganinak/MigrateGitlabToGogs
  38. ## Where does Gitea store what file
  39. - _`AppWorkPath`_
  40. - The `--work-path` flag
  41. - Else Environment variable `GITEA_WORK_DIR`
  42. - Else a built-in value set at build time
  43. - Else the directory that contains the Gitea binary
  44. - `%(APP_DATA_PATH)` (default for database, indexers, etc.)
  45. - `APP_DATA_PATH` from `app.ini`
  46. - Else _`AppWorkPath`_`/data`
  47. - _`CustomPath`_ (custom templates)
  48. - The `--custom-path` flag
  49. - Else Environment variable `GITEA_CUSTOM`
  50. - Else a built-in value set at build time
  51. - Else _`AppWorkPath`_`/custom`
  52. - HomeDir
  53. - Unix: Environment variable `HOME`
  54. - Windows: Environment variable `USERPROFILE`, else environment variables `HOMEDRIVE`+`HOMEPATH`
  55. - RepoRootPath
  56. - `ROOT` in the \[repository] section of `app.ini` if absolute
  57. - Else _`AppWorkPath`_`/ROOT` if `ROOT` in the \[repository] section of `app.ini` if relative
  58. - Default `%(APP_DATA_PATH)/gitea-repositories`
  59. - INI (config file)
  60. - `--config` flag
  61. - A possible built-in value set a build time
  62. - Else _`CustomPath`_`/conf/app.ini`
  63. - SQLite Database
  64. - `PATH` in `database` section of `app.ini`
  65. - Else `%(APP_DATA_PATH)/gitea.db`
  66. ## Not seeing a clone URL or the clone URL being incorrect
  67. There are a few places that could make this show incorrectly.
  68. 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" >}})
  69. 2. Make sure you have correctly set `ROOT_URL` in the `server` section of your `app.ini`
  70. If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini`
  71. - `DISABLE_HTTP_GIT`: if set to true, there will be no HTTP/HTTPS link
  72. - `DISABLE_SSH`: if set to true, there will be no SSH link
  73. - `SSH_EXPOSE_ANONYMOUS`: if set to false, SSH links will be hidden for anonymous users
  74. ## File upload fails with: 413 Request Entity Too Large
  75. This error occurs when the reverse proxy limits the file upload size.
  76. See the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}) for a solution with nginx.
  77. ## Custom Templates not loading or working incorrectly
  78. Gitea's custom templates must be added to the correct location or Gitea will not find and use them.
  79. The correct path for the template(s) will be relative to the `CustomPath`
  80. 1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration
  81. If that doesn't exist, you can try `echo $GITEA_CUSTOM`
  82. 2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file)
  83. 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.
  84. ## Does Gitea have a "GitHub/GitLab pages" feature?
  85. Gitea doesn't provide a built-in Pages server. You need a dedicated domain to serve static pages to avoid CSRF security risks.
  86. For simple usage, you can use a reverse proxy to rewrite & serve static contents from Gitea's raw file URLs.
  87. 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.
  88. ## Active user vs login prohibited user
  89. In Gitea, an "active" user refers to a user that has activated their account via email.
  90. A "login prohibited" user is a user that is not allowed to log in to Gitea anymore
  91. ## Setting up logging
  92. - [Official Docs]({{< relref "doc/administration/logging-config.en-us.md" >}})
  93. ## What is Swagger?
  94. [Swagger](https://swagger.io/) is what Gitea uses for its API documentation.
  95. All Gitea instances have the built-in API and there is no way to disable it completely.
  96. You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`.
  97. For more information, refer to Gitea's [API docs]({{< relref "doc/development/api-usage.en-us.md" >}}).
  98. You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
  99. You can also see an example of the `swagger.json` file at <https://try.gitea.io/swagger.v1.json>.
  100. ## Adjusting your server for public/private use
  101. ### Preventing spammers
  102. There are multiple things you can combine to prevent spammers.
  103. 1. By whitelisting or blocklisting certain email domains
  104. 2. By only whitelisting certain domains with OpenID (see below)
  105. 3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY`
  106. 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
  107. ### Only allow/block certain email domains
  108. You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]`
  109. ### Only allow/block certain OpenID providers
  110. You can configure `WHITELISTED_URIS` or `BLACKLISTED_URIS` under `[openid]` in your `app.ini`
  111. **NOTE:** whitelisted takes precedence, so if it is non-blank then blacklisted is ignored
  112. ### Issue only users
  113. The current way to achieve this is to create/modify a user with a max repo creation limit of 0.
  114. ### Restricted users
  115. 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.\_\_
  116. Example use case: A company runs a Gitea instance that requires login. Most repos are public (accessible/browsable by all co-workers).
  117. 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.
  118. ### Enable Fail2ban
  119. 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
  120. ## How to add/use custom themes
  121. 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).
  122. To add your own theme, currently the only way is to provide a complete theme (not just color overrides)
  123. 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))
  124. Name the `.css` file `theme-arc-blue.css` and add it to your custom folder in `custom/public/assets/css`
  125. Allow users to use it by adding `arc-blue` to the list of `THEMES` in your `app.ini`
  126. ## SSHD vs built-in SSH
  127. SSHD is the built-in SSH server on most Unix systems.
  128. Gitea also provides its own SSH server, for usage when SSHD is not available.
  129. ## Gitea is running slow
  130. The most common culprit for this is loading federated avatars.
  131. This can be turned off by setting `ENABLE_FEDERATED_AVATAR` to `false` in your `app.ini`
  132. Another option that may need to be changed is setting `DISABLE_GRAVATAR` to `true` in your `app.ini`
  133. ## Can't create repositories/files
  134. Make sure that Gitea has sufficient permissions to write to its home directory and data directory.
  135. See [AppDataPath and RepoRootPath](#where-does-gitea-store-what-file)
  136. **Note for Arch users:** At the time of writing this, there is an issue with the Arch package's systemd file including this line:
  137. `ReadWritePaths=/etc/gitea/app.ini`
  138. Which makes all other paths non-writeable to Gitea.
  139. ## Translation is incorrect/how to add more translations
  140. Our translations are currently crowd-sourced on our [Crowdin project](https://crowdin.com/project/gitea)
  141. 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.
  142. ## Push Hook / Webhook aren't running
  143. 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:
  144. 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
  145. 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`
  146. 3. If you are using docker, make sure Docker Server (not the client) >= 20.10.6
  147. ## SSH issues
  148. If you cannot reach repositories over `ssh`, but `https` works fine, consider looking into the following.
  149. First, make sure you can access Gitea via SSH.
  150. `ssh git@myremote.example`
  151. If the connection is successful, you should receive an error message like the following:
  152. ```
  153. Hi there, You've successfully authenticated, but Gitea does not provide shell access.
  154. If this is unexpected, please log in with password and setup Gitea under another user.
  155. ```
  156. 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.
  157. If you cannot connect at all, your SSH key may not be configured correctly locally.
  158. This is specific to SSH and not Gitea, so will not be covered here.
  159. ### SSH Common Errors
  160. ```
  161. Permission denied (publickey).
  162. fatal: Could not read from remote repository.
  163. ```
  164. This error signifies that the server rejected a log in attempt, check the
  165. following things:
  166. - On the client:
  167. - Ensure the public and private ssh keys are added to the correct Gitea user.
  168. - Make sure there are no issues in the remote url. In particular, ensure the name of the
  169. Git user (before the `@`) is spelled correctly.
  170. - Ensure public and private ssh keys are correct on client machine.
  171. - On the server:
  172. - Make sure the repository exists and is correctly named.
  173. - Check the permissions of the `.ssh` directory in the system user's home directory.
  174. - Verify that the correct public keys are added to `.ssh/authorized_keys`.
  175. Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the
  176. Gitea admin panel.
  177. - Read Gitea logs.
  178. - Read /var/log/auth (or similar).
  179. - Check permissions of repositories.
  180. The following is an example of a missing public SSH key where authentication
  181. succeeded, but some other setting is preventing SSH from reaching the correct
  182. repository.
  183. ```
  184. fatal: Could not read from remote repository.
  185. Please make sure you have the correct access rights
  186. and the repository exists.
  187. ```
  188. In this case, look into the following settings:
  189. - On the server:
  190. - Make sure that the `git` system user has a usable shell set
  191. - Verify this with `getent passwd git | cut -d: -f7`
  192. - `usermod` or `chsh` can be used to modify this.
  193. - Ensure that the `gitea serv` command in `.ssh/authorized_keys` uses the
  194. correct configuration file.
  195. ## Missing releases after migrating repository with tags
  196. To migrate an repository _with_ all tags, you need to do two things:
  197. - Push tags to the repository:
  198. ```
  199. git push --tags
  200. ```
  201. - (Re-)sync tags of all repositories within Gitea:
  202. ```
  203. gitea admin repo-sync-releases
  204. ```
  205. ## LFS Issues
  206. For issues concerning LFS data upload
  207. ```
  208. batch response: Authentication required: Authorization error: <GITEA_LFS_URL>/info/lfs/objects/batch
  209. Check that you have proper access to the repository
  210. error: failed to push some refs to '<GIT_REPO_URL>'
  211. ```
  212. Check the value of `LFS_HTTP_AUTH_EXPIRY` in your `app.ini` file.
  213. 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.
  214. You may want to set this value to `60m` or `120m`.
  215. ## How can I create users before starting Gitea
  216. 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.
  217. ## How can I enable password reset
  218. 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.
  219. ## How can a user's password be changed
  220. - As an **admin**, you can change any user's password (and optionally force them to change it on next login)...
  221. - By navigating to your `Site Administration -> User Accounts` page and editing a user.
  222. - By using the [admin CLI commands]({{< relref "doc/administration/command-line.en-us.md#admin" >}}).
  223. 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.
  224. - As a **user** you can change it...
  225. - In your account `Settings -> Account` page (this method **requires** you to know your current password).
  226. - By using the `Forgot Password` link.
  227. 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" >}}).
  228. ## Why is my markdown broken
  229. In Gitea version `1.11` we moved to [goldmark](https://github.com/yuin/goldmark) for markdown rendering, which is [CommonMark](https://commonmark.org/) compliant.
  230. 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.
  231. If it is the latter, _usually_ there is a compliant alternative listed in the spec.
  232. ## Upgrade errors with MySQL
  233. If you are receiving errors on upgrade of Gitea using MySQL that read:
  234. > `ORM engine initialization failed: migrate: do migrate: Error: 1118: Row size too large...`
  235. Please run `gitea convert` or run `ALTER TABLE table_name ROW_FORMAT=dynamic;` for each table in the database.
  236. The underlying problem is that the space allocated for indices by the default row format
  237. is too small. Gitea requires that the `ROWFORMAT` for its tables is `DYNAMIC`.
  238. If you are receiving an error line containing `Error 1071: Specified key was too long; max key length is 1000 bytes...`
  239. 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
  240. you must use InnoDB. You should run `ALTER TABLE table_name ENGINE=InnoDB;` for each table in the database.
  241. If you are using MySQL 5, another possible fix is
  242. ```mysql
  243. SET GLOBAL innodb_file_format=Barracuda;
  244. SET GLOBAL innodb_file_per_table=1;
  245. SET GLOBAL innodb_large_prefix=1;
  246. ```
  247. ## Why Are Emoji Broken On MySQL
  248. Unfortunately MySQL's `utf8` charset does not completely allow all possible UTF-8 characters, in particular Emoji.
  249. They created a new charset and collation called `utf8mb4` that allows for emoji to be stored but tables which use
  250. the `utf8` charset, and connections which use the `utf8` charset will not use this.
  251. Please run `gitea convert`, or run `ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`
  252. for the database_name and run `ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`
  253. for each table in the database.
  254. ## Why are Emoji displaying only as placeholders or in monochrome
  255. 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.
  256. ## Initial logging
  257. 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.
  258. 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.
  259. If you report a bug or issue you MUST give us logs with this information restored.
  260. You should only set this option once you have completely configured everything.
  261. ## Warnings about struct defaults during database startup
  262. Sometimes when there are migrations the old columns and default values may be left
  263. unchanged in the database schema. This may lead to warning such as:
  264. ```
  265. 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
  266. ```
  267. These can safely be ignored, but you are able to stop these warnings by getting Gitea to recreate these tables using:
  268. ```
  269. gitea doctor recreate-table user
  270. ```
  271. This will cause Gitea to recreate the user table and copy the old data into the new table
  272. with the defaults set appropriately.
  273. You can ask Gitea to recreate multiple tables using:
  274. ```
  275. gitea doctor recreate-table table1 table2 ...
  276. ```
  277. And if you would like Gitea to recreate all tables simply call:
  278. ```
  279. gitea doctor recreate-table
  280. ```
  281. It is highly recommended to back-up your database before running these commands.
  282. ## How to adopt repositories from disk
  283. - 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`.
  284. - **Note:** the directory names must be lowercase.
  285. - You can also check `<ROOT_URL>/admin/config` for the repository root path.
  286. - Ensure that the user/org exists that you want to adopt repositories for.
  287. - As an admin, go to `<ROOT_URL>/admin/repos/unadopted` and search.
  288. - Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}).
  289. - If the above steps are done correctly, you should be able to select repositories to adopt.
  290. - If no repositories are found, enable [debug logging]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors.
  291. ## Gitea can't start on NFS
  292. In most cases, it's caused by broken NFS lock system. You can try to stop Gitea process and
  293. run `flock -n /data-nfs/gitea/queues/LOCK echo 'lock acquired'` to see whether the lock can be acquired immediately.
  294. If the lock can't be acquired, NFS might report some errors like `lockd: cannot monitor node-3, statd: server rpc.statd not responding, timed out` in its server logs.
  295. Then the NFS lock could be reset by:
  296. ```bash
  297. # /etc/init.d/nfs stop
  298. # rm -rf /var/lib/nfs/sm/*
  299. # /etc/init.d/nfs start
  300. ```