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

troubleshooting.en-us.md 3.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ---
  2. date: "2016-11-08T16:00:00+02:00"
  3. title: "Troubleshooting"
  4. slug: "troubleshooting"
  5. weight: 10
  6. toc: true
  7. draft: false
  8. menu:
  9. sidebar:
  10. parent: "help"
  11. name: "Troubleshooting"
  12. weight: 20
  13. identifier: "troubleshooting"
  14. ---
  15. # Troubleshooting
  16. This page contains some common seen issues and their solutions.
  17. ## SSH issues
  18. For issues reaching repositories over `ssh` while the Gitea web front-end, but
  19. `https` based git repository access works fine, consider looking into the following.
  20. ```
  21. Permission denied (publickey).
  22. fatal: Could not read from remote repository.
  23. ```
  24. This error signifies that the server rejected a log in attempt, check the
  25. following things:
  26. * On the client:
  27. * Ensure the public and private ssh keys are added to the correct Gitea user.
  28. * Make sure there are no issues in the remote url. In particular, ensure the name of the
  29. git user (before the `@`) is spelled correctly.
  30. * Ensure public and private ssh keys are correct on client machine.
  31. * Try to connect using ssh (ssh git@myremote.example) to ensure a connection
  32. can be made.
  33. * On the server:
  34. * Make sure the repository exists and is correctly named.
  35. * Check the permissions of the `.ssh` directory in the system user's home directory.
  36. * Verify that the correct public keys are added to `.ssh/authorized_keys`.
  37. Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the
  38. Gitea admin panel.
  39. * Read Gitea logs.
  40. * Read /var/log/auth (or similar).
  41. * Check permissions of repositories.
  42. The following is an example of a missing public SSH key where authentication
  43. succeeded, but some other setting is preventing SSH from reaching the correct
  44. repository.
  45. ```
  46. fatal: Could not read from remote repository.
  47. Please make sure you have the correct access rights
  48. and the repository exists.
  49. ```
  50. In this case, look into the following settings:
  51. * On the server:
  52. * Make sure that the `git` system user has a usable shell set
  53. * Verify this with `getent passwd git | cut -d: -f7`
  54. * `usermod` or `chsh` can be used to modify this.
  55. * Ensure that the `gitea serv` command in `.ssh/authorized_keys` uses the
  56. correct configuration file.
  57. ## Missing releases after migrating repository with tags
  58. To migrate an repository *with* all tags, you need to do two things:
  59. * Push tags to the repository:
  60. ```
  61. git push --tags
  62. ```
  63. * (Re-)sync tags of all repositories within Gitea:
  64. ```
  65. gitea admin repo-sync-releases
  66. ```
  67. ## LFS Issues
  68. For issues concerning LFS data upload
  69. ```
  70. batch response: Authentication required: Authorization error: <GITEA_LFS_URL>/info/lfs/objects/batch
  71. Check that you have proper access to the repository
  72. error: failed to push some refs to '<GIT_REPO_URL>'
  73. ```
  74. Have you checked 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.
  75. You may want to set this value to `60m` or `120m`.