7 Setup Remote Software Update
mattzz edited this page 2021-05-13 18:52:55 +02:00

How to set up remote sw udpate

Remote sw update is done by a git pull update master. This remote is set up to use git/ssh protocol hence we can use public key authentication.

Gitea moved to git.mattzz.de

  • $ git remote set-url origin https://git.mattzz.de/mattzz/halloween.git

Replace mattzz.no-ip.org:3000 with git.mattzz.de

Add deployment keys to gitea for automated updates via git

On RPi:

  • $ ssh-keygen -C "hostname xyz deployment key - leave password emtpy
  • $ cat .ssh/id_rsa.pub - this is your public key

On gitea:

Add git remote 'update'

Now we are adding a remote name update that is using git/ssh. This remote name is going to exist next to origin that we are going to use for pushing.

On RPi:

$ git remote add update git@git.mattzz.de:mattzz/Halloween.git

Check the result:

$ git remote -v
origin	https://git.mattzz.de/mattzz/halloween.git (fetch)
origin	https://git.mattzz.de/mattzz/halloween.git (push)
update	git@git.mattzz.de:mattzz/Halloween.git (fetch)
update	git@git.mattzz.de:mattzz/Halloween.git (push)

In order to establish authenticity of the keys you have to pull from the new remote name once from command line:

$ sudo -u pi git pull update master