ci(prober): robust deploy-key handling (fix 'error in libcrypto') - #77
Merged
Merged
Conversation
The Configure SSH step wrote the key verbatim, so a key with CRLF line endings (or one accidentally stored base64) produced 'Load key: error in libcrypto' → 'Permission denied (publickey)'. Now strip CR, accept raw or base64 keys, and validate the key with ssh-keygen -y so a malformed DROPLET_SSH_KEY fails fast with an actionable message. Also pass the secret via env instead of inline interpolation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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.
Why
The
deploy-proberrun failed at Ship prober + lib to droplet:error in libcrypto= the private key written fromDROPLET_SSH_KEYis malformed — almost always CRLF line endings or a key that lost its internal newlines when the secret was saved. The step wrote the secret verbatim, so it can't recover from that and fails later with a confusing "Permission denied".What
Configure SSHnow:\r(fixes CRLF keys),BEGIN…key or a base64-encoded one,ssh-keygen -yand fails fast with an actionable message,env:rather than inline interpolation.Then the stored secret itself is truncated/mangled (not just CRLF) and must be re-added — the reliable way preserves the file exactly:
(and ensure that key's public half is in
ubuntu@scan.crawlproof.com:~/.ssh/authorized_keys).🤖 Generated with Claude Code