Skip to content

Commit 079edc1

Browse files
committed
fix: restore InsecureIgnoreHostKey fallback when known_hosts is missing
The previous commit removed the InsecureIgnoreHostKey fallback when an SSH key is provided without known_hosts data, causing E2E failures with "knownhosts: key is unknown".
1 parent 5fc04c8 commit 079edc1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/git/manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ func (m *managerImpl) getSSHClientOptions(ctx context.Context, authSecret map[st
172172
}
173173
} else {
174174
logger.Info("SSH host key verification is disabled, provide known_hosts in auth secret to enable verification")
175+
auth.HostKeyCallback = gossh.InsecureIgnoreHostKey()
175176
}
176177

177178
return []client.Option{client.WithSSHAuth(auth)}, tempFilePath, nil

0 commit comments

Comments
 (0)