Add SSH authentication support to arcane-deploy action#13
Conversation
Add auth-type: ssh alongside existing http and none options.
New inputs: ssh-private-key (required for SSH) and
ssh-host-key-verification (default: accept_new).
When auth-type is ssh, the action passes sshKey, username ("git"),
and sshHostKeyVerification to the Arcane git repository API for both
create and credential-update flows. The SSH private key is masked in
logs like other secrets.
https://claude.ai/code/session_019FKVbkxfTf8fyqdx7BzCFs
Triggered by: 6e52762 Workflow run: https://github.com/nsheaps/github-actions/actions/runs/23325364297
nsheaps
left a comment
There was a problem hiding this comment.
Review: Add SSH authentication support to arcane-deploy action
Overall: Looks solid for a first pass. The approach is correct — SSH creds are passed through the same Arcane API pattern as HTTP tokens.
Good
- SSH key is masked with
::add-mask::— correct security practice - Validation that
ssh-private-keyis required whenauth-type=sshmirrors the HTTP token validation ssh-host-key-verificationdefaults toaccept_newwhich is sensible (likeStrictHostKeyChecking=accept-new)- Username hardcoded to
"git"is correct for SSH git operations
Things to check / potential issues
-
Does the Arcane API field name match? The PR is passing SSH credentials through the API — were the exact field names Arcane expects verified? The backend service encrypts
ssh_keyand hasssh_host_key_verification, but the API might use different field names than the internal model. Worth confirming against the Arcane API schema or testing it. -
Credential update on existing repos — The diff updates SSH creds on every deploy ("so they stay current"). For HTTP tokens that makes sense (they rotate/expire). For SSH deploy keys that don't expire, it's unnecessary but harmless — just extra API calls. Fine to leave.
-
accept_allfor host key verification — This is effectivelyStrictHostKeyChecking=no. Might want a comment in the README noting this is insecure and should only be used for testing. -
No
repository-urlchanges? — The README example showsrepository-urlas an input for SSH, but SSH URLs usegit@github.com:owner/repo.gitformat vs HTTPS. Does the action handle URL format differences, or does Arcane handle that internally based on auth type? -
Multiline secret handling — SSH private keys are multiline. Does the
::add-mask::and env var passing handle newlines correctly in GitHub Actions? This is a common gotcha. Worth testing with an actual deploy key.
Verdict
The bones are right. Recommend a quick integration test with an actual deploy key before merging — especially to validate points 1, 4, and 5.
- Mask SSH private key line-by-line for multiline secret handling, since ::add-mask:: operates per-line in GitHub Actions - Default repository-url to SSH format (git@github.com:...) when auth-type is ssh, so users don't need to override it manually - Add comment documenting camelCase API field name convention (sshKey, sshHostKeyVerification) matching existing authType/token - Add security warning for accept_all host key verification in README - Remove explicit repository-url from SSH example (auto-derived now) https://claude.ai/code/session_019FKVbkxfTf8fyqdx7BzCFs
Summary
This PR adds SSH authentication support to the arcane-deploy GitHub Action, allowing users to authenticate with Git repositories using SSH keys (such as GitHub deploy keys) instead of only HTTP tokens.
Key Changes
New input parameters:
ssh-private-key: SSH private key for git authentication (required when auth-type=ssh)ssh-host-key-verification: SSH host key verification mode with optionsaccept_new(default),accept_all, orrejectUpdated authentication flow:
ensure_repository()function to handle SSH credentials for both creating new repositories and updating existing onesssh-private-keywhenauth-typeis set tosshnone, httptonone, http, sshSecurity improvements:
::add-mask::to prevent accidental exposureDocumentation updates:
Implementation Details
"git"for SSH authentication, which is standard for most Git hosting providershttps://claude.ai/code/session_019FKVbkxfTf8fyqdx7BzCFs