-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
docs: add SSH passthrough instructions to with-docker-rootless (#17505) #17508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The passthrough is based upon AuthorizedKeysCommand and a custom shell wrapper that forwards commands to the container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing this PR :)
I'm slightly confused here. The results of the AuthorizedKeysCommand will be a line like:
The host SSH would then attempt to run that command. How are you ensuring that that command can be run? I worry that the I think your passthrough idea is trying to suggest a different kind of passthrough. The original docs suggested:
These appear to be trying to do:
Is that right? If so, then instead of the shadow Your docker shell idea could simply shadow Other thoughts: If actual network passthrough was desired, there is nothing preventing you from having the gitea executable on the host system with an app.ini that has a different |
Not exactly, the host SSH would pass it verbatim as an argument to
I'm not. In the end the command is passed to the container. If it fails, it fails there and never on the host.
The shell wrapper above then calls When cloning a repo, for instance, what ends up happening is that the following is run inside the gitea container:
I hope the above clarifies how this works. I never had an
Yes, I suppose so.
I suppose that might work, BUT:
I don't think having a That said, I can see a network passthrough being needed between different hosts. Perhaps your suggestion above could be made to work with a containerized gitea on the 'gateway' host? |
Aha! I'd forgotten that the the user's shell is used to parse the
OK we should probably be explicit that this will require that the host
You could use a combination of the two techniques. IIRC the AuthorizedKeysCommand is run by root - so you should be able to use the docker shell technique to run gitea keys but just pass a different |
That's a good point, thanks! I'll update the documentation. |
Codecov Report
@@ Coverage Diff @@
## main #17508 +/- ##
==========================================
+ Coverage 45.50% 45.51% +0.01%
==========================================
Files 793 793
Lines 88772 88772
==========================================
+ Hits 40396 40405 +9
+ Misses 41863 41847 -16
- Partials 6513 6520 +7
Continue to review full report at Codecov.
|
…tea#17505) (go-gitea#17508) The passthrough is based upon AuthorizedKeysCommand and a custom shell wrapper that forwards commands to the container over the docker pipe.
The passthrough is based upon AuthorizedKeysCommand and a custom shell wrapper that forwards commands to the container.
Close #17505