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

permission denied on ed25519 key file #161

Open
mptr opened this issue Dec 29, 2023 · 5 comments
Open

permission denied on ed25519 key file #161

mptr opened this issue Dec 29, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mptr
Copy link

mptr commented Dec 29, 2023

I am getting permission denied error messages when using an ed25519 key file.
It Works when using v0.1.4 but not on master

Error Message:

##[group]Run appleboy/scp-action@master
with:
  host: ***
  username: ***
  key_path: id_ed25519
  port: 22
  strip_components: 1
  source: dist
  target: tmp-upload
  timeout: 30s
  command_timeout: 10m
  use_insecure_cipher: false
  rm: false
  debug: false
  overwrite: false
  tar_dereference: false
  tar_exec: tar
  proxy_port: 22
  proxy_timeout: 30s
  proxy_use_insecure_cipher: false
##[endgroup]
##[command]/usr/bin/docker run --name b5d7e76e14525dd1241ae88044ff93edbabdf_51e737 --label 4b5d7e --workdir /github/workspace --rm -e "INPUT_HOST" -e "INPUT_USERNAME" -e "INPUT_KEY_PATH" -e "INPUT_PORT" -e "INPUT_STRIP_COMPONENTS" -e "INPUT_SOURCE" -e "INPUT_TARGET" -e "INPUT_PASSWORD" -e "INPUT_TIMEOUT" -e "INPUT_COMMAND_TIMEOUT" -e "INPUT_KEY" -e "INPUT_PASSPHRASE" -e "INPUT_FINGERPRINT" -e "INPUT_USE_INSECURE_CIPHER" -e "INPUT_RM" -e "INPUT_DEBUG" -e "INPUT_OVERWRITE" -e "INPUT_TAR_DEREFERENCE" -e "INPUT_TAR_TMP_PATH" -e "INPUT_TAR_EXEC" -e "INPUT_PROXY_HOST" -e "INPUT_PROXY_PORT" -e "INPUT_PROXY_USERNAME" -e "INPUT_PROXY_PASSWORD" -e "INPUT_PROXY_PASSPHRASE" -e "INPUT_PROXY_TIMEOUT" -e "INPUT_PROXY_KEY" -e "INPUT_PROXY_KEY_PATH" -e "INPUT_PROXY_FINGERPRINT" -e "INPUT_PROXY_USE_INSECURE_CIPHER" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/sulona-angular/sulona-angular":"/github/workspace" 4b5d7e:76e14525dd1241ae88044ff93edbabdf
drone-scp version: v1.6.13
tar all files into /tmp/qEkYyzTcCi.tar.gz
2023/12/29 13:38:38 getKeyFile error: open id_ed25519: permission denied
2023/12/29 13:38:39 getKeyFile error: open id_ed25519: permission denied
remote server os type is unix
scp file to server.
2023/12/29 13:38:40 error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
drone-scp error: error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

Cleaning up orphan processes

Workflow File:

      [...]
      - name: Configure
        shell: bash
        run: |
          echo "${{ secrets.SSH_KEY }}" > id_ed25519 && chmod 600 id_ed25519
      - name: Upload
        uses: appleboy/scp-action@master
        with:
          host: ${{ secrets.SFTP_HOST }}
          username: ${{ secrets.SFTP_USER }}
          key_path: id_ed25519
          port: 22
          strip_components: 1
          source: dist
          target: tmp-upload
      [...]
@azat-io
Copy link

azat-io commented Dec 31, 2023

Same problem

@appleboy
Copy link
Owner

appleboy commented Jan 1, 2024

I will take it.

@appleboy appleboy added the bug Something isn't working label Jan 1, 2024
@appleboy appleboy self-assigned this Jan 1, 2024
@git-shogg
Copy link

git-shogg commented Jan 10, 2024

Same problem here. I am running two key deployment steps.

  1. Utilizing the appleboy/ssh-action@master. To run some set-up commands on my host.
  2. Utilizing the appleboy/scp-action@master. To move some files onto my host.

Strangely the failure is not consistent. I have made no changes at all and have had two different outcomes when re-running my GitHub action. The first time it failed on the ssh-action (handshake failed) and the second time it it failed on the scp-action (handshake failed). At present the host is running Ubuntu 23.10.

@mptr and @azat-io can you share which distribution and version are you running (might help @appleboy troubleshoot)?

@azat-io
Copy link

azat-io commented Jan 10, 2024

@git-shogg Ubuntu v22.04.3

@appleboy
Copy link
Owner

@mptr What is your id_ed25519 file permission? Please change the permission to 400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants