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:
+1
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user