Disclaimer : Due to my error i ended up opening this issue in other appleboy repo just moving here.
Hello im trying to upload my backend executable to server but getting this error at this step.
Note : Few days ago it was working without getting any upgrade on this part.
tar all files into /tmp/RgranDeiYJ.tar.gz
2023/04/16 00:33:41 ssh.ParsePrivateKey: ssh: no key found
remote server os type is unix
2023/04/16 00:33:41 ssh.ParsePrivateKey: ssh: no key found
And i have correct key with included begin and end parts.
It fails on deploy stage of the workflow file i provided below.
env:
KEY: '${{ secrets.EC2_KEY }}'
HOST: '${{ secrets.EC2_HOST }}'
USERNAME: '${{secrets.EC2_USERNAME}}'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v2
- name : build
run: GOOS=linux GOARCH=amd64 go build -o zirva
- name: deploy
uses: appleboy/scp-action@master
with:
host: $HOST
username: $USERNAME
key: $KEY
source: zirva
target: /home/ubuntu
- name: register to host
run: |
mkdir -p ~/.ssh/
echo "$KEY" > ~/.ssh/github-actions-key
chmod 600 ~/.ssh/github-actions-key
cat >>~/.ssh/config <<END
Host ec2
HostName $HOST
User $USERNAME
IdentityFile ~/.ssh/github-actions-key
StrictHostKeyChecking no
END
- name: connect to server
run: ssh ec2 sudo service restarter restart
Disclaimer : Due to my error i ended up opening this issue in other appleboy repo just moving here.
Hello im trying to upload my backend executable to server but getting this error at this step.
Note : Few days ago it was working without getting any upgrade on this part.
And i have correct key with included begin and end parts.
It fails on deploy stage of the workflow file i provided below.