[BUGFIX] Make Gerrit SSH probe portable across host systems - #24
Open
maikschneider wants to merge 1 commit into
Open
[BUGFIX] Make Gerrit SSH probe portable across host systems#24maikschneider wants to merge 1 commit into
maikschneider wants to merge 1 commit into
Conversation
The reachability check used bash's /dev/tcp with a hostname. Since the cs command moved from the web container to the host, this runs on the user's own OS, where the construct is not dependable: on macOS a hostname-based /dev/tcp redirection is killed with SIGKILL, so the probe always reported "network unreachable" even though Gerrit was reachable and authentication worked. /dev/tcp is also absent from bash builds compiled with --disable-net-redirections. A single verbose ssh call now serves as both reachability and auth probe, and its output is classified into the existing CS_SSH_REASON values. This needs nothing beyond ssh itself, which the command already requires for pushing to Gerrit. The identity check no longer runs ssh-add first: keys used from ~/.ssh without an agent are valid, and reporting them as a missing agent key was wrong. "No key offered" is now derived from the ssh transcript instead, and the wording no longer refers to ddev-ssh-agent, which is not involved for a host command.
garvinhicking
approved these changes
Aug 8, 2026
garvinhicking
left a comment
Contributor
There was a problem hiding this comment.
Thanks, fixes my issue as well
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.
The reachability check used bash's
/dev/tcpwith a hostname. Since #12 movedcsto the host, it runs on the user's own OS, where that is not dependable: on macOS the redirection is killed with SIGKILL, so the probe always reported "network unreachable" even when Gerrit was reachable.A single verbose
sshcall now covers reachability and auth, classified into the existingCS_SSH_REASONvalues. Thessh-addgate is gone, since keys used from~/.sshwithout an agent are valid.Verified on macOS (bash 3.2, 5.3) and in the web container (bash 5.2).
resolves #23