Docker Rootless SSH Passthrough Steps #8212

Closed
opened 2025-11-02 07:57:47 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @caesartcs on GitHub (Dec 5, 2021).

Gitea Version

1.15.7-rootless

Git Version

git version 2.25.1

Operating System

Ubuntu 20.04

How are you running Gitea?

Docker-compose
image: latest-rootless (1.15.7)

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Pertaining to #17505
I do not believe that the steps are necessarily correct as posted in the docs at SSH Container Passthrough - Rootless

The trouble I am facing, after following the docs, is that it does not seem that my host user (named git) has access to the /usr/bin/docker binary once you finish all the steps in the docs posted above. My host user git is part of the docker group and if the bash shell is given to it, instead of the /usr/local/bin/gitea-shell, it is able to run the docker binary without complaint.

I believe that there needs to be additional information appended to the docs around how the git user is created.
I'm afraid I have not yet been able to clear this bug myself yet so I do not know what can be added.

I am successfully able to ssh -v git@<gitea ip> -p 2222 -i ../.ssh/gitea and it spits out my username. So I know that it is setup correctly. But the actual SSH Passthrough for cloning is where this is something amiss.

This is the error log gitea gives when attempting to git clone ssh...

2021/12/05 04:53:48 modules/ssh/ssh.go:259:sshConnectionFailed() [W] Failed connection from 192.168.6.48:53628 with error: [ssh: no auth passed yet],
2021/12/05 04:53:48 modules/ssh/ssh.go:261:sshConnectionFailed() [W] Failed authentication attempt from 192.168.6.48:53628

Screenshots

No response

Originally created by @caesartcs on GitHub (Dec 5, 2021). ### Gitea Version 1.15.7-rootless ### Git Version git version 2.25.1 ### Operating System Ubuntu 20.04 ### How are you running Gitea? Docker-compose image: latest-rootless (1.15.7) ### Database MySQL ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description Pertaining to #17505 I do not believe that the steps are necessarily correct as posted in the docs at [SSH Container Passthrough - Rootless](https://docs.gitea.io/en-us/install-with-docker-rootless/#ssh-container-passthrough) The trouble I am facing, after following the docs, is that it does not seem that my host user (named `git`) has access to the `/usr/bin/docker` binary once you finish all the steps in the docs posted above. My host user `git` is part of the docker group and if the bash shell is given to it, instead of the `/usr/local/bin/gitea-shell`, it is able to run the docker binary without complaint. **I believe that there needs to be additional information appended to the docs around how the `git` user is created.** I'm afraid I have not yet been able to clear this bug myself yet so I do not know what can be added. I am successfully able to `ssh -v git@<gitea ip> -p 2222 -i ../.ssh/gitea` and it spits out my username. So I know that it is setup correctly. But the actual SSH Passthrough for cloning is where this is something amiss. This is the error log gitea gives when attempting to `git clone ssh...` ``` 2021/12/05 04:53:48 modules/ssh/ssh.go:259:sshConnectionFailed() [W] Failed connection from 192.168.6.48:53628 with error: [ssh: no auth passed yet], 2021/12/05 04:53:48 modules/ssh/ssh.go:261:sshConnectionFailed() [W] Failed authentication attempt from 192.168.6.48:53628 ``` ### Screenshots _No response_
Author
Owner

@caesartcs commented on GitHub (Dec 6, 2021):

I have found the issue. It is on my end. If you have multiple SSH keys, you need to specify which host uses which key in your working computers .ssh/config file.

I think it might be a good idea to add this to the docs. But I will not create a PR for it and leave it as a closed issue.
I hope this helps whoever else has this trouble.

@caesartcs commented on GitHub (Dec 6, 2021): I have found the issue. It is on my end. If you have multiple SSH keys, you need to specify which host uses which key in your working computers `.ssh/config` file. I think it might be a good idea to add this to the docs. But I will not create a PR for it and leave it as a closed issue. I hope this helps whoever else has this trouble.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8212