Skip to content

[release/v1.8.x] Improve error message for encrypted SSH keys without password#2018

Merged
matheuscscp merged 1 commit intorelease/v1.8.xfrom
backport-2013-to-release/v1.8.x
Apr 1, 2026
Merged

[release/v1.8.x] Improve error message for encrypted SSH keys without password#2018
matheuscscp merged 1 commit intorelease/v1.8.xfrom
backport-2013-to-release/v1.8.x

Conversation

@fluxcdbot
Copy link
Copy Markdown
Member

Automated backport to release/v1.8.x, triggered by a label in #2013.

Detect encrypted SSH identity keys early in getAuthOpts() by parsing
with ssh.ParseRawPrivateKey and checking for PassphraseMissingError.
When detected, return a clear error pointing the user to add the
'password' field to their Secret instead of the misleading
"SSH agent requested but SSH_AUTH_SOCK not-specified" message.

Fixes #802

Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
(cherry picked from commit 790be38)
@matheuscscp matheuscscp merged commit 725815b into release/v1.8.x Apr 1, 2026
3 of 4 checks passed
@matheuscscp matheuscscp deleted the backport-2013-to-release/v1.8.x branch April 1, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants