19
loading...
This website collects cookies to deliver better user experience
ssh-keygen -t rsa -b 4096 -C "[identifier]@linode" -f linode
ssh-keyscan -t rsa [host address/IP address]
-t rsa
here because my ssh keys are also rsa
.-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAACFwAAAAdzc2gtcn
--snip--
----------END OPENSSH PRIVATE KEY-----
ssh-keyscan
command listed earlier.linode.pub
to the remote server's authorized_keys
under .ssh
for the user we plan to connect as. There are lots of guides online for this..github/workflows/
name: Linode Push Update
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Prepare ssh keys
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.LINODE_KEY }}
known_hosts: ${{ secrets.LINODE_KNOWN_HOSTS }}
- name: Checkout the Repo
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.LINODE_KEY }}
fetch-depth: 0
ref: master
- name: Push to Linode
run: |
git config user.name github-actions
git config user.email [email protected]
git remote add prod ssh://[username]@[host]:/var/repos/[remote-repo-name].git
git push prod