code.gitea.io/gitea@v1.22.3/docs/content/help/faq.en-us.md (about) 1 --- 2 date: "2019-04-05T16:00:00+02:00" 3 title: "FAQ" 4 slug: "faq" 5 sidebar_position: 5 6 toc: false 7 draft: false 8 aliases: 9 - /en-us/faq 10 menu: 11 sidebar: 12 parent: "help" 13 name: "FAQ" 14 sidebar_position: 5 15 identifier: "faq" 16 --- 17 18 # Frequently Asked Questions 19 20 This page contains some common questions and answers. 21 22 For more help resources, check all [Support Options](help/support.md). 23 24 ## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes? 25 26 Version 1.20.x will be used for this example. 27 28 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. 29 30 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. 31 32 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. 33 34 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. 35 36 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. 37 38 ## How to migrate from Gogs/GitHub/etc. to Gitea 39 40 To migrate from Gogs to Gitea: 41 42 - [Gogs version 0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286) 43 44 To migrate from GitHub to Gitea, you can use Gitea's built-in migration form. 45 46 In order to migrate items such as issues, pull requests, etc. you will need to input at least your username. 47 48 [Example (requires login)](https://demo.gitea.com/repo/migrate) 49 50 To migrate from GitLab to Gitea, you can use this non-affiliated tool: 51 52 https://github.com/loganinak/MigrateGitlabToGogs 53 54 ## Where does Gitea store what file 55 56 - _`AppWorkPath`_ 57 - The `WORK_PATH` option in `app.ini` 58 - Else the `--work-path` flag 59 - Else Environment variable `GITEA_WORK_DIR` 60 - Else a built-in value set at build time 61 - Else the directory that contains the Gitea binary 62 - `AppDataPath` (default for database, indexers, etc.) 63 - `APP_DATA_PATH` from `app.ini` 64 - Else _`AppWorkPath`_`/data` 65 - _`CustomPath`_ (custom templates) 66 - The `--custom-path` flag 67 - Else Environment variable `GITEA_CUSTOM` 68 - Else a built-in value set at build time 69 - Else _`AppWorkPath`_`/custom` 70 - HomeDir 71 - Unix: Environment variable `HOME` 72 - Windows: Environment variable `USERPROFILE`, else environment variables `HOMEDRIVE`+`HOMEPATH` 73 - RepoRootPath 74 - `ROOT` in the \[repository] section of `app.ini` if absolute 75 - Else _`AppWorkPath`_`/ROOT` if `ROOT` in the \[repository] section of `app.ini` if relative 76 - Default `%(APP_DATA_PATH)/gitea-repositories` 77 - INI (config file) 78 - `--config` flag 79 - A possible built-in value set a build time 80 - Else _`CustomPath`_`/conf/app.ini` 81 - SQLite Database 82 - `PATH` in `database` section of `app.ini` 83 - Else `%(APP_DATA_PATH)/gitea.db` 84 85 ## Not seeing a clone URL or the clone URL being incorrect 86 87 There are a few places that could make this show incorrectly. 88 89 1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide](administration/reverse-proxies.md) 90 2. Make sure you have correctly set `ROOT_URL` in the `server` section of your `app.ini` 91 92 If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini` 93 94 - `DISABLE_HTTP_GIT`: if set to true, there will be no HTTP/HTTPS link 95 - `DISABLE_SSH`: if set to true, there will be no SSH link 96 - `SSH_EXPOSE_ANONYMOUS`: if set to false, SSH links will be hidden for anonymous users 97 98 ## File upload fails with: 413 Request Entity Too Large 99 100 This error occurs when the reverse proxy limits the file upload size. 101 102 See the [reverse proxy guide](administration/reverse-proxies.md) for a solution with nginx. 103 104 ## Custom Templates not loading or working incorrectly 105 106 Gitea's custom templates must be added to the correct location or Gitea will not find and use them. 107 108 The correct path for the template(s) will be relative to the `CustomPath` 109 110 1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration 111 2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file) 112 3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea](administration/customizing-gitea.md) page to add your template to the correct location. 113 114 ## Does Gitea have a "GitHub/GitLab pages" feature? 115 116 Gitea doesn't provide a built-in Pages server. You need a dedicated domain to serve static pages to avoid CSRF security risks. 117 118 For simple usage, you can use a reverse proxy to rewrite & serve static contents from Gitea's raw file URLs. 119 120 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. 121 122 ## Active user vs login prohibited user 123 124 In Gitea, an "active" user refers to a user that has activated their account via email. 125 126 A "login prohibited" user is a user that is not allowed to log in to Gitea anymore 127 128 ## Setting up logging 129 130 - [Official Docs](administration/logging-config.md) 131 132 ## What is Swagger? 133 134 [Swagger](https://swagger.io/) is what Gitea uses for its API documentation. 135 136 All Gitea instances have the built-in API and there is no way to disable it completely. 137 You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`. 138 For more information, refer to Gitea's [API docs](development/api-usage.md). 139 140 You can see the latest API (for example) on https://gitea.com/api/swagger 141 142 You can also see an example of the `swagger.json` file at https://gitea.com/swagger.v1.json 143 144 ## Adjusting your server for public/private use 145 146 ### Preventing spammers 147 148 There are multiple things you can combine to prevent spammers. 149 150 1. By whitelisting or blocklisting certain email domains 151 2. By only whitelisting certain domains with OpenID (see below) 152 3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY` 153 4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI](administration/command-line.md), [API](development/api-usage.md), or Gitea's Admin UI 154 155 ### Only allow/block certain email domains 156 157 You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]` 158 159 ### Only allow/block certain OpenID providers 160 161 You can configure `WHITELISTED_URIS` or `BLACKLISTED_URIS` under `[openid]` in your `app.ini` 162 163 **NOTE:** whitelisted takes precedence, so if it is non-blank then blacklisted is ignored 164 165 ### Issue only users 166 167 The current way to achieve this is to create/modify a user with a max repo creation limit of 0. 168 169 ### Restricted users 170 171 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.\_\_ 172 173 Example use case: A company runs a Gitea instance that requires login. Most repos are public (accessible/browsable by all co-workers). 174 175 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. 176 177 ### Enable Fail2ban 178 179 Use [Fail2Ban](administration/fail2ban-setup.md) to monitor and stop automated login attempts or other malicious behavior based on log patterns 180 181 ## SSHD vs built-in SSH 182 183 SSHD is the built-in SSH server on most Unix systems. 184 185 Gitea also provides its own SSH server, for usage when SSHD is not available. 186 187 ## Gitea is running slow 188 189 The most common culprit for this is loading federated avatars. 190 191 This can be turned off by setting `ENABLE_FEDERATED_AVATAR` to `false` in your `app.ini` 192 193 Another option that may need to be changed is setting `DISABLE_GRAVATAR` to `true` in your `app.ini` 194 195 ## Can't create repositories/files 196 197 Make sure that Gitea has sufficient permissions to write to its home directory and data directory. 198 199 See [AppDataPath and RepoRootPath](#where-does-gitea-store-what-file) 200 201 **Note for Arch users:** At the time of writing this, there is an issue with the Arch package's systemd file including this line: 202 203 `ReadWritePaths=/etc/gitea/app.ini` 204 205 Which makes all other paths non-writeable to Gitea. 206 207 ## Translation is incorrect/how to add more translations 208 209 Our translations are currently crowd-sourced on our [Crowdin project](https://crowdin.com/project/gitea) 210 211 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. 212 213 ## Push Hook / Webhook / Actions aren't running 214 215 If you can push but can't see push activities on the home dashboard, or the push doesn't trigger webhook and Actions workflows, it's likely that the git hooks are not working. 216 217 There are a few possibilities: 218 219 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 220 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` 221 3. If you are using docker, make sure Docker Server (not the client) >= 20.10.6 222 223 ## SSH issues 224 225 If you cannot reach repositories over `ssh`, but `https` works fine, consider looking into the following. 226 227 First, make sure you can access Gitea via SSH. 228 229 `ssh git@myremote.example` 230 231 If the connection is successful, you should receive an error message like the following: 232 233 ``` 234 Hi there, You've successfully authenticated, but Gitea does not provide shell access. 235 If this is unexpected, please log in with password and setup Gitea under another user. 236 ``` 237 238 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. 239 240 If you cannot connect at all, your SSH key may not be configured correctly locally. 241 This is specific to SSH and not Gitea, so will not be covered here. 242 243 ### SSH Common Errors 244 245 ``` 246 Permission denied (publickey). 247 fatal: Could not read from remote repository. 248 ``` 249 250 This error signifies that the server rejected a log in attempt, check the 251 following things: 252 253 - On the client: 254 - Ensure the public and private ssh keys are added to the correct Gitea user. 255 - Make sure there are no issues in the remote url. In particular, ensure the name of the 256 Git user (before the `@`) is spelled correctly. 257 - Ensure public and private ssh keys are correct on client machine. 258 - On the server: 259 - Make sure the repository exists and is correctly named. 260 - Check the permissions of the `.ssh` directory in the system user's home directory. 261 - Verify that the correct public keys are added to `.ssh/authorized_keys`. 262 263 Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the 264 Gitea admin panel. 265 - Read Gitea logs. 266 - Read /var/log/auth (or similar). 267 - Check permissions of repositories. 268 269 The following is an example of a missing public SSH key where authentication 270 succeeded, but some other setting is preventing SSH from reaching the correct 271 repository. 272 273 ``` 274 fatal: Could not read from remote repository. 275 276 Please make sure you have the correct access rights 277 and the repository exists. 278 ``` 279 280 In this case, look into the following settings: 281 282 - On the server: 283 - Make sure that the `git` system user has a usable shell set 284 - Verify this with `getent passwd git | cut -d: -f7` 285 - `usermod` or `chsh` can be used to modify this. 286 - Ensure that the `gitea serv` command in `.ssh/authorized_keys` uses the 287 correct configuration file. 288 289 ## Missing releases after migrating repository with tags 290 291 To migrate an repository _with_ all tags, you need to do two things: 292 293 - Push tags to the repository: 294 295 ``` 296 git push --tags 297 ``` 298 299 - (Re-)sync tags of all repositories within Gitea: 300 301 ``` 302 gitea admin repo-sync-releases 303 ``` 304 305 ## LFS Issues 306 307 For issues concerning LFS data upload 308 309 ``` 310 batch response: Authentication required: Authorization error: <GITEA_LFS_URL>/info/lfs/objects/batch 311 Check that you have proper access to the repository 312 error: failed to push some refs to '<GIT_REPO_URL>' 313 ``` 314 315 Check the value of `LFS_HTTP_AUTH_EXPIRY` in your `app.ini` file. 316 317 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. 318 319 You may want to set this value to `60m` or `120m`. 320 321 ## How can I create users before starting Gitea 322 323 Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands](administration/command-line.md#admin) to add users like normal. 324 325 ## How can I enable password reset 326 327 There is no setting for password resets. It is enabled when a [mail service](administration/email-setup.md) is configured, and disabled otherwise. 328 329 ## How can a user's password be changed 330 331 - As an **admin**, you can change any user's password (and optionally force them to change it on next login)... 332 - By navigating to your `Site Administration -> User Accounts` page and editing a user. 333 - By using the [admin CLI commands](administration/command-line.md#admin). 334 335 Keep in mind most commands will also need a [global flag](administration/command-line.md#global-options) to point the CLI at the correct configuration. 336 - As a **user** you can change it... 337 - In your account `Settings -> Account` page (this method **requires** you to know your current password). 338 - By using the `Forgot Password` link. 339 340 If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service](administration/email-setup.md). 341 342 ## Why is my markdown broken 343 344 In Gitea version `1.11` we moved to [goldmark](https://github.com/yuin/goldmark) for markdown rendering, which is [CommonMark](https://commonmark.org/) compliant. 345 346 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. 347 348 If it is the latter, _usually_ there is a compliant alternative listed in the spec. 349 350 ## Upgrade errors with MySQL 351 352 If you are receiving errors on upgrade of Gitea using MySQL that read: 353 354 > `ORM engine initialization failed: migrate: do migrate: Error: 1118: Row size too large...` 355 356 Please run `gitea doctor convert` or run `ALTER TABLE table_name ROW_FORMAT=dynamic;` for each table in the database. 357 358 The underlying problem is that the space allocated for indices by the default row format 359 is too small. Gitea requires that the `ROWFORMAT` for its tables is `DYNAMIC`. 360 361 If you are receiving an error line containing `Error 1071: Specified key was too long; max key length is 1000 bytes...` 362 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 363 you must use InnoDB. You should run `ALTER TABLE table_name ENGINE=InnoDB;` for each table in the database. 364 365 ## Why are Emoji displaying only as placeholders or in monochrome 366 367 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. 368 369 ## Initial logging 370 371 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. 372 373 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. 374 375 If you report a bug or issue you MUST give us logs with this information restored. 376 377 You should only set this option once you have completely configured everything. 378 379 ## Warnings about struct defaults during database startup 380 381 Sometimes when there are migrations the old columns and default values may be left 382 unchanged in the database schema. This may lead to warning such as: 383 384 ``` 385 2020/08/02 11:32:29 ...rm/session_schema.go:360:Sync() [W] Table user Column keep_activity_private db default is , struct default is 0 386 ``` 387 388 These can safely be ignored, but you are able to stop these warnings by getting Gitea to recreate these tables using: 389 390 ``` 391 gitea doctor recreate-table user 392 ``` 393 394 This will cause Gitea to recreate the user table and copy the old data into the new table 395 with the defaults set appropriately. 396 397 You can ask Gitea to recreate multiple tables using: 398 399 ``` 400 gitea doctor recreate-table table1 table2 ... 401 ``` 402 403 And if you would like Gitea to recreate all tables simply call: 404 405 ``` 406 gitea doctor recreate-table 407 ``` 408 409 It is highly recommended to back-up your database before running these commands. 410 411 ## How to adopt repositories from disk 412 413 - 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`. 414 - **Note:** the directory names must be lowercase. 415 - You can also check `<ROOT_URL>/admin/config` for the repository root path. 416 - Ensure that the user/org exists that you want to adopt repositories for. 417 - As an admin, go to `<ROOT_URL>/admin/repos/unadopted` and search. 418 - Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](administration/config-cheat-sheet.md#repository). 419 - If the above steps are done correctly, you should be able to select repositories to adopt. 420 - If no repositories are found, enable [debug logging](administration/config-cheat-sheet.md#repository) to check for any specific errors. 421 422 ## Gitea can't start on NFS 423 424 In most cases, it's caused by broken NFS lock system. You can try to stop Gitea process and 425 run `flock -n /data-nfs/gitea/queues/LOCK echo 'lock acquired'` to see whether the lock can be acquired immediately. 426 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. 427 428 Then the NFS lock could be reset by: 429 430 ```bash 431 # /etc/init.d/nfs stop 432 # rm -rf /var/lib/nfs/sm/* 433 # /etc/init.d/nfs start 434 ```