IceWhaleTech / CasaOS-AppStore

Manifest files for CasaOS Apps
Apache License 2.0
154 stars 253 forks source link

[Bug] Gitea lacks SSH Container Passthrough #373

Open MrSnowman opened 6 months ago

MrSnowman commented 6 months ago

Describe the bug The Gitea app is missing ssh container passthrough by default. So any user who wishes to use ssh keys to auth needs to set up passthrough themselves.

To Reproduce Steps to reproduce the behavior:

  1. Create gitea account
  2. Create a repo
  3. Add a new public key to your gitea account and add the associated private key to ssh-agent
  4. Attempt to clone the repo over SSH
  5. Git asks for authentication via password, ignorant of any key requirement

Expected behavior Successfully cloning the repo over ssh without any hassle.

Additional context The problem is that server git gets is the hosts on port 22, not the gitea docker containers port. Users could clone with something like

git clone ssh://git@[domain/ip]:[docker_mapped_port]/gitea_username/repo.git

Any normal ssh fetches gitea will prompt you to use won't work. There's little sign of what the problem is for users also as they'll be confused why their keys aren't being updated or if they enter the host ssh password (on a whim) they'll be told that the repo is missing. SSH Container Passthrough is needed. https://docs.gitea.com/next/installation/install-with-docker#ssh-container-passthrough