appleboy / scp-action

GitHub Action that copy files and artifacts via SSH.
https://github.com/marketplace/actions/scp-command-to-transfer-files
MIT License
1.24k stars 135 forks source link

Your DNS server does not resolve my domain correctly #149

Open popov654 opened 11 months ago

popov654 commented 11 months ago

I have the following action code:

name: Deploy

on:
  push:
    branches:
      - master

jobs:
  deployment:

    runs-on: ubuntu-latest
    environment: main

    steps:
    - uses: actions/checkout@v1

    - name: Copy repository contents via scp
      uses: appleboy/scp-action@master
      with:
        HOST: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PASSWORD: ${{ secrets.PASSWORD }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
        source: "."
        target: "/opt/cloudfave"

    - name: Executing remote command
      uses: appleboy/ssh-action@master
      with:
        host: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PASSWORD: ${{ secrets.PASSWORD }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
        script: sudo npm install && sudo systemctl restart nodeserver

It gives me this error on execution:

drone-scp error: error copy file to dest: ***, error message: dial tcp: lookup *** on 168.63.129.16:53: no such host

I don't want to use an IP address in my variables since it may change in the future. Should not DNS work correctly?

VictorioBerra commented 5 months ago

Similar issue with me but with Tailscale. I am not an expert on Actions but why would it not use DNS from the Action host?

londek commented 1 month ago

I have exactly same issue with Cloudflare WARP

back-2-95 commented 3 weeks ago

Same with Twingate

londek commented 3 weeks ago

I'm not exactly sure why that happens, but my guess is that it's due to docker's networking (this action runs docker under the hood). Using terminal commands instead of github action is working fine https://github.com/appleboy/drone-scp

back-2-95 commented 3 weeks ago

Yes, I can confirm. When using vanilla scp, our connection works.