Update SSH key setup in deploy workflow #18
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rdenadai/web.redecapivara.social!18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rdenadai-patch-8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changed from printf to echo for setting up SSH key.
Pull Request Overview
This PR modifies the deploy workflow to switch from printf to echo when writing the SSH private key file and removes some inline comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -36,10 +36,8 @@ jobs:- name: Set up SSH keyrun: |mkdir -p ~/.sshAfter creating ~/.ssh, set directory permissions to 700 to prevent SSH from refusing the key due to permissive directory permissions. Add: chmod 700 ~/.ssh right after mkdir.
@ -41,3 +39,3 @@echo "${{ secrets.VM_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsachmod 600 ~/.ssh/id_rsa# Verify key is validssh-keygen -l -f ~/.ssh/id_rsa || { echo "Invalid SSH key"; exit 1; }Using echo to write a multi-line SSH private key is unreliable across shells and can alter formatting (e.g., extra trailing newline or escape handling), leading to an invalid key. Please revert to printf to preserve the exact content.
[nitpick] The removed comment explained why printf was used to preserve key formatting; keeping a brief rationale helps prevent regressions. Consider restoring a short comment (e.g., 'Use printf to preserve multi-line key formatting') alongside reverting to printf.