ssh: add the ssh:// scheme in golangConnectionDial - #1020
Open
larrasket wants to merge 1 commit into
Open
Conversation
golangConnectionDial passed the bare host to Validate, which parses it with url.Parse and needs an ssh:// scheme. Without it the parsed host is empty and the dial target becomes ":22", so remote connections fail with "dial tcp :22: connect: connection refused". golangConnectionExec and golangConnectionScp already prefix ssh://. Move that idiom into a small helper and use it in all three, so the dial path is fixed and the normalization lives in one place. Fixes podman-container-tools#46 Signed-off-by: Saleh <root@lr0.org>
|
Packit jobs failed. @containers/packit-build please check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
golangConnectionDialpassed the bare host to Validate, which parses it withurl.Parseand needs an ssh:// scheme. Without it the parsed host is empty and the dial target becomes ":22", so remote connections fail with "dial tcp :22: connect: connection refused".golangConnectionExecandgolangConnectionScpalready prefix ssh://.Move that idiom into a small helper and use it in all three, so the dial path is fixed and the normalization lives in one place.
Fixes #46