Better Git SSH passthru system for Gitea server running in Docker container.
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.

README.md 1.1KB

1 year ago
1 year ago
12345678910111213141516171819202122232425262728
  1. # Gitea passthru scripts for Docker
  2. The Docker image for Gitea instructs you to place a passthru script
  3. at `/app/app/gitea` on the host. If you don't like having files in
  4. odd locations on your host system, this isn't a great solution.
  5. ## passthru
  6. This is a slightly modified version of the passthru Bash script from the
  7. Docker image documentation. Since `passthru` lives in your project
  8. directory now, and the original script passes `$0` as the executable
  9. to run in the Docker image, it has been modified to always pass
  10. `/app/gitea/gitea` instead.
  11. ## watchkeys
  12. This Bash scripts runs as a daemon on your host and watches the
  13. Gitea `git/.ssh` folder for changes to `authorized_keys`, which it
  14. reads and modifies to point all the `command` directives at
  15. the passthrough script instead of `/app/gitea/gitea` and then
  16. writes to `.ssh/authorized_keys` in the Docker project folder,
  17. which you will have configured as the home directory for your
  18. `git` account.
  19. ## watchkeys.service
  20. This is the `systemd` configuration file that launches the daemon.
  21. Modify to taste and create a symlink to it in `/lib/systemd/system`.