CasaOS-AppStore
CasaOS-AppStore copied to clipboard
[Bug] Gitea lacks SSH Container Passthrough
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:
- Create gitea account
- Create a repo
- Add a new public key to your gitea account and add the associated private key to ssh-agent
- Attempt to clone the repo over SSH
- 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