garygrossgarten / github-action-scp

⬆️ Copy a folder to a remote server using SSH

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to copy files over ssh.

pranava21 opened this issue · comments

I am unable to copy the files over to the remote machine over ssh. I'm not sure what the exactly is. In fact I have tried connecting to the remote machine over ssh from my windows machine through the terminal and it works perfectly fine. This is the YAML file

`
name: .NET

on:
push:
branches: [ dev_preview ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
  uses: actions/setup-dotnet@v1
  with:
    dotnet-version: 6.0.x
- name: Restore dependencies, Build and Publish
  run: |
    dotnet publish --configuration Release
- name: Copy via ssh
  uses: garygrossgarten/github-action-scp@v0.7.3
  with:
    local: /home/runner/work/CollegeApp_DotNet/CollegeApp_DotNet/CollegeApp_DotNet/bin/Release/net6.0/publish/
    remote: /home/pranava/college_app_test/
    host: ${{ secrets.SSH_HOST }}
    username: ${{ secrets.SSH_USER }}
    password: ${{ secrets.SSH_PASSWORD }}

`

Attached screenshot of the error. It is not connecting to the remote server.
image

The IP in the screenshot indicates that you are trying to connect to something in your local network. I'd suggest looking if the host secret is pointing to the correct server.

I fixed it, I setup Port Forwarding, and asked ISP to open the specific port I am using