Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: config.privateKey does not exist at given fs path #11

Closed
julesghub opened this issue Aug 7, 2020 · 4 comments
Closed

Error: config.privateKey does not exist at given fs path #11

julesghub opened this issue Aug 7, 2020 · 4 comments

Comments

@julesghub
Copy link

I'm getting:
Error: config.privateKey does not exist at given fs path

when I use the privateKey / passphase authenication in the following action step.

    - name: ls on gadi
      uses: garygrossgarten/github-action-ssh@release
      with:
        command: ls -a
        host: "gadi.nci.org.au"
        username: ${{ secrets.GADI_UNAME }}
        #password: ${{ secrets.GADI_PWORD }}
        privateKey: ${{ secrets.GADI_PRIVATE_KEY }}
        passphrase: ${{ secrets.GADI_PASSPHRASE }}

What does this mean?
Ideas on how I can fix it?

Note, when I use GADI_PWORD my action runs as expected.

cheers,
J

@dariodjuric
Copy link

The underlying library that this action uses is node-ssh. This library expects a private key with a specific string pattern, or a file that contains the private key. Are you sure you are using a proper private key?

@ridwankustanto
Copy link

@julesghub did you solve this? I got same issue here. I followed the example here.

@marv1913
Copy link

marv1913 commented Nov 2, 2020

@julesghub I had the same problem. I copied the private key without the "-----BEGIN OPENSSH PRIVATE KEY-----" and end part of the key file. After copying the whole content of the key file it was working.

@garygrossgarten
Copy link
Owner

@julesghub @ridwankustanto Did you resolve your issues? @marv1913 is correct. You need to copy the whole contents of your private key file to make it work. Closing this issue for now. Feel free to open it again if you still have issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants