Skip to content

Commit 1fdc91a

Browse files
authored
Update main.yml
1 parent 6d2802e commit 1fdc91a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deployment_key
2828
chmod 600 ~/.ssh/deployment_key
2929
eval "$(ssh-agent -s)"
30+
# Clear the agent to ensure no other keys are used
31+
ssh-add -D
32+
# Add only the correct key to the agent
33+
ssh-add ~/.ssh/deployment_key
3034
# Use expect to send the passphrase for the key
3135
expect -c "
3236
spawn ssh-add ~/.ssh/deployment_key

0 commit comments

Comments
 (0)