Commit f9fdea9b authored by Aryan Noshirvani's avatar Aryan Noshirvani

Remove base64 decode check and write private key directly to id_ed25519

parent 170ddba3
...@@ -34,11 +34,7 @@ deploy_prod: ...@@ -34,11 +34,7 @@ deploy_prod:
- echo "Deploying to production server..." - echo "Deploying to production server..."
- | - |
if [ -n "$SSH_PRIVATE_KEY" ]; then if [ -n "$SSH_PRIVATE_KEY" ]; then
if echo "$SSH_PRIVATE_KEY" | grep -q "BEGIN"; then printf "%s\n" "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_ed25519
printf "%s\n" "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_ed25519
else
echo "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' > ~/.ssh/id_ed25519
fi
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
else else
echo "WARNING: SSH_PRIVATE_KEY variable is not set." echo "WARNING: SSH_PRIVATE_KEY variable is not set."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment