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.

68 lines
2.1 KiB

  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, 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.