Skip to content

fix(skills-init): install openssh-client so ssh-keyscan is available#1786

Open
SarthakB11 wants to merge 1 commit intokagent-dev:mainfrom
SarthakB11:sarth/1770-skills-init-openssh
Open

fix(skills-init): install openssh-client so ssh-keyscan is available#1786
SarthakB11 wants to merge 1 commit intokagent-dev:mainfrom
SarthakB11:sarth/1770-skills-init-openssh

Conversation

@SarthakB11
Copy link
Copy Markdown

summary

closes #1770

  • skills-init image only had git in apk, so ssh-keyscan was unavailable when an agent used ssh-based git auth (gitAuthSecretRef -> kubernetes.io/ssh-auth). the init container exited under set -e with ssh-keyscan: not found and the agent pod went into crashloopbackoff.
  • add openssh-client to the apk install list in docker/skills-init/Dockerfile and verify ssh-keyscan resolves 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/Dockerfile and go/core/internal/controller/translator/agent/skills-init.sh.tmpl to 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

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>
Copilot AI review requested due to automatic review settings April 30, 2026 23:24
@github-actions github-actions Bot added the bug Something isn't working label Apr 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-client in the skills-init Alpine image so ssh-keyscan is 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] skills-init image missing openssh-client/ssh-keyscan - SSH git auth crashes init container

2 participants