ssh-action
ssh-action copied to clipboard
Suddenly getting "Error: can't connect without a private SSH key or password"
Hi, I've been using this fantastic tool for several months now and haven't encountered any issues until this point. However, despite there not being any changes to my script or to my configuration, I'm suddenly receiving Error: can't connect without a private SSH key or password
. I am indeed using a private key -- below is my configuration for the action:
- name: SSH into droplet
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DROPLET_HOST }}
username: ${{ secrets.DROPLET_USERNAME }}
passphrase: ${{ secrets.DROPLET_PASSWORD }}
key: ${{ secrets.DROPLET_PRIVATE_KEY }}
envs: COMMIT_SHA
script_stop: true
script: |
git fetch origin
git merge $COMMIT_SHA
What could have changed that may be causing this issue?
Ah, think I found the problem! Turns out the action was only failing when triggered by a Dependabot PR, and as of the beginning of this month, workflows triggered by Dependabot PRs run with read-only permissions and aren't able to access Secrets. Am now looking into how to get around this issue
I am having the same issue. Is there any workaround or solution?
I am having the same issue. Is there any workaround or solution?
@sam541 Not sure if this is a possibility for you, but I think I resolved this for myself by enabling pull request workflows on forks? (on the Actions tab in the repo settings)
@eli-s-r I didn't try as I do not have any branches on my project currently. Thanks I will try when I need to make any pull request
Please try the latest version. Please open it again (for the author) or create a new one and reference this (for others) if you have the same problem.
I am having the same issue. Is there any workaround or solution?
use appleboy/[email protected]
instead of appleboy/ssh-action@master
@kzamaan cool thanks, at current time version was changed, need using appleboy/[email protected]
0.1.4 worked for me, but I think this is the permanent solution: https://github.com/appleboy/scp-action/issues/113