fix: decode SSH key from base64 to avoid masking issues in GitLab CI

GitLab masked variables reject values with whitespace (like SSH keys),
so store the key as base64 and decode it in the pipeline.
This commit is contained in:
siujamo
2026-05-20 01:15:43 -05:00
parent fa330947b9
commit a5748a3e2b
+1 -1
View File
@@ -28,7 +28,7 @@ deploy:
before_script:
- apk add --no-cache openssh-client rsync
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
- echo "$SSH_PRIVATE_KEY_BASE64" | base64 -d > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- ssh-keyscan -H onixbyte.cn >> ~/.ssh/known_hosts
script: