fix(skills-init): install openssh-client so ssh-keyscan is available#1786
Open
SarthakB11 wants to merge 1 commit intokagent-dev:mainfrom
Open
fix(skills-init): install openssh-client so ssh-keyscan is available#1786SarthakB11 wants to merge 1 commit intokagent-dev:mainfrom
SarthakB11 wants to merge 1 commit intokagent-dev:mainfrom
Conversation
the skills-init image runs ssh-keyscan to populate ~/.ssh/known_hosts when an agent uses ssh-based git auth (gitAuthSecretRef -> kubernetes.io/ssh-auth). the alpine base only had git, so the binary was missing and the init container exited with 'ssh-keyscan: not found' under set -e, leaving the agent pod in crashloopbackoff. add openssh-client to the apk install list and verify ssh-keyscan resolves at build time so the same regression cannot ship silently again. closes kagent-dev#1770 Signed-off-by: SarthakB11 <sarthak.bhardwaj21b@iiitg.ac.in>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the skills-init init container crash when SSH-based git authentication is used by ensuring ssh-keyscan is present in the image, aligning the container’s runtime dependencies with what skills-init.sh expects.
Changes:
- Install
openssh-clientin theskills-initAlpine image sossh-keyscanis available. - Add a build-time check (
command -v ssh-keyscan) to prevent silently shipping an image missing the required binary.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
summary
closes #1770
gitin apk, sossh-keyscanwas unavailable when an agent used ssh-based git auth (gitAuthSecretRef->kubernetes.io/ssh-auth). the init container exited underset -ewithssh-keyscan: not foundand the agent pod went into crashloopbackoff.openssh-clientto the apk install list indocker/skills-init/Dockerfileand verifyssh-keyscanresolves at build time so the same regression cannot ship silently again.ai model disclosure
used claude code (claude opus 4.7) to triage candidate issues and draft the diff. self-reviewed against
docker/skills-init/Dockerfileandgo/core/internal/controller/translator/agent/skills-init.sh.tmplto confirm the reporter's root cause. verified via:docker build -t kagent-skills-init:test docker/skills-init docker run --rm kagent-skills-init:test ssh-keyscan github.com # returns real host keys, confirming openssh-client is present and functional