The Git Pull add-on automatically syncs your HA configuration from this GitHub repository.
- In HA, go to Settings > Add-ons.
- Click Add-on Store (bottom-right).
- Search for "Git pull".
- Click Install.
Deploy keys are more secure than personal access tokens because they only grant access to a single repository.
# Generate a new SSH key pair
ssh-keygen -t ed25519 -C "homeassistant-git-pull" -f ~/.ssh/ha_deploy_key -N ""
# Display the public key (add this to GitHub)
cat ~/.ssh/ha_deploy_key.pub
# Display the private key (add this to the Git Pull add-on config)
cat ~/.ssh/ha_deploy_key- Go to your repo on GitHub: Settings > Deploy keys.
- Click Add deploy key.
- Paste the public key contents.
- Do NOT enable write access (read-only is sufficient).
- Click Add key.
In the Git Pull add-on configuration:
git_branch: main
git_command: pull
git_remote: origin
repository: git@github.com:YOUR_USERNAME/homeassistant-config.git
auto_restart: false
repeat:
active: true
interval: 300 # Check every 5 minutes
deployment_key:
- "-----BEGIN OPENSSH PRIVATE KEY-----"
- "your-private-key-contents-here"
- "-----END OPENSSH PRIVATE KEY-----"
deployment_key_protocol: sshauto_restart: true— HA restarts automatically after each pull. Convenient but can cause brief interruptions to automations.auto_restart: false(recommended) — Changes are pulled but HA doesn't restart until you do it manually. Safer for a production home. You can reload individual domains (automations, scripts, scenes) without a full restart.
- Start the Git Pull add-on.
- Check the add-on logs for successful clone/pull messages.
- Verify that the config files appear in your HA config directory.
- Run Settings > System > Restart (or use Developer Tools > Check Configuration first).
If you prefer not to use deploy keys:
- Create a GitHub personal access token with
reposcope. - Use HTTPS URL in the add-on config:
https://github.com/YOUR_USERNAME/homeassistant-config.git - Set the token in the add-on's Git credentials.
Deploy keys are preferred because they're scoped to a single repo and can be read-only.