Skip to main content

Seamless HomeAssistant Config With Git

·1 min

I previously wrote about this topic, but it involved generating a special SSH key and adding that to git config. One day I realised I could just use agent forwarding, so here’s the process.

Assuming Hass.io, install the official SSH Server addon and add your public key the config.

Now let’s init our git repo and reset it to the remote config.

cd /config
git init .
git remote set-url origin YOUR_GIT_URL
git fetch
git reset --hard origin/master

That’s all there is to it. Now whenever the repo changes, simply git pull to update. See my other post for making that part more seamless.