addons
addons copied to clipboard
Git pull constantly clears directory including `.storage` folder
Describe the issue you are experiencing
I setup my HASS from a backup (to migrate from Core in a Virtualenv to OS) and configured this addon to pull my configs from Git. In the past I used a custom script to do this but I wanted to replace it with the "native" functionality.
However, as soon as something changes in the /config folder it gets cleared out completely and replaced with the stuff I have in my repo. This results in it also removing the .storage folder and all addons I installed using HACS (custom_components).
The latter is even included in the .gitignore
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Which add-on are you reporting an issue with?
Git pull
What is the version of the add-on?
7.14.0
Steps to reproduce the issue
- Setup HASS
- Setup this addon
- Add a file to
/config - See everything gets replaced
System Health information
System Information
| version | core-2024.4.1 |
|---|---|
| installation_type | Home Assistant OS |
| dev | false |
| hassio | true |
| docker | true |
| user | root |
| virtualenv | false |
| python_version | 3.12.2 |
| os_name | Linux |
| os_version | 6.6.20-haos |
| arch | x86_64 |
| timezone | Europe/Amsterdam |
| config_dir | /config |
Home Assistant Community Store
| GitHub API | ok |
|---|---|
| GitHub Content | ok |
| GitHub Web | ok |
| GitHub API Calls Remaining | 4971 |
| Installed Version | 1.34.0 |
| Stage | running |
| Available Repositories | 1415 |
| Downloaded Repositories | 99 |
| HACS Data | ok |
Home Assistant Cloud
| logged_in | false |
|---|---|
| can_reach_cert_server | ok |
| can_reach_cloud_auth | ok |
| can_reach_cloud | ok |
Home Assistant Supervisor
| host_os | Home Assistant OS 12.1 |
|---|---|
| update_channel | stable |
| supervisor_version | supervisor-2024.03.1 |
| agent_version | 1.6.0 |
| docker_version | 24.0.7 |
| disk_total | 30.8 GB |
| disk_used | 12.7 GB |
| healthy | true |
| supported | true |
| board | ova |
| supervisor_api | ok |
| version_api | ok |
| installed_addons | Terminal & SSH (9.10.0), MariaDB (2.6.1), Git pull (7.14.0), File editor (5.8.0), phpMyAdmin (0.9.1), Log Viewer (0.17.0), eufy-security-ws (1.8.0-2), ESPHome (2024.3.1) |
Dashboards
| error | failed to load: unknown |
|---|
Recorder
| oldest_recorder_run | April 2, 2024 at 07:41 |
|---|---|
| current_recorder_run | April 5, 2024 at 17:06 |
| estimated_db_size | 1529.25 MiB |
| database_engine | mysql |
| database_version | 10.6.12 |
Spotify
| api_endpoint_reachable | ok |
|---|
Anything in the Supervisor logs that might be useful for us?
2024-04-05 17:47:10.291 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-git_pull with version 7.14.0
2024-04-05 17:48:37.570 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Git pull is stopped, restarting...
2024-04-05 17:48:37.584 INFO (SyncWorker_7) [supervisor.docker.manager] Cleaning addon_core_git_pull application
2024-04-05 17:48:38.609 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-git_pull with version 7.14.0
2024-04-05 17:50:06.423 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Git pull is stopped, restarting...
2024-04-05 17:50:06.432 INFO (SyncWorker_4) [supervisor.docker.manager] Cleaning addon_core_git_pull application
2024-04-05 17:50:08.140 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-git_pull with version 7.14.0
2024-04-05 17:50:38.896 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Git pull is failed, restarting...
2024-04-05 17:50:38.901 INFO (SyncWorker_5) [supervisor.docker.manager] Cleaning addon_core_git_pull application
2024-04-05 17:50:39.965 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-git_pull with version 7.14.0
2024-04-05 17:51:21.120 WARNING (MainThread) [supervisor.addons.options] Unknown option 'host' for MariaDB (core_mariadb)
2024-04-05 17:51:24.553 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Git pull is stopped, restarting...
2024-04-05 17:51:24.559 INFO (SyncWorker_0) [supervisor.docker.manager] Cleaning addon_core_git_pull application
2024-04-05 17:51:25.519 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-git_pull with version 7.14.0
2024-04-05 17:53:14.013 ERROR (SyncWorker_3) [supervisor.docker.manager] Container addon_core_git_pull is not running
2024-04-05 17:53:14.016 ERROR (SyncWorker_1) [supervisor.docker.manager] Container addon_core_git_pull is not running
2024-04-05 17:53:14.024 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Git pull is stopped, restarting...
2024-04-05 17:53:14.030 INFO (SyncWorker_6) [supervisor.docker.manager] Cleaning addon_core_git_pull application
2024-04-05 17:53:15.337 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-git_pull with version 7.14.0
2024-04-05 17:54:40.564 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Git pull is stopped, restarting...
2024-04-05 17:54:40.569 INFO (SyncWorker_7) [supervisor.docker.manager] Cleaning addon_core_git_pull application
2024-04-05 17:54:41.703 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-git_pull with version 7.14.0
Anything in the add-on logs that might be useful for us?
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[Info] setting up credential.helper for user: hass
[Info] Saving git credentials to /tmp/git-credentials
fatal: refusing to work with credential missing host field
[Warn] Git repository doesn't exist
[Info] Backup configuration to /tmp/config-2024-04-05_15-54-42
[Info] Start git clone
Cloning into '/config'...
Updating files: 34% (2085/6057)
Updating files: 35% (2120/6057)
Updating files: 36% (2181/6057)
Updating files: 37% (2242/6057)
Updating files: 38% (2302/6057)
Updating files: 39% (2363/6057)
Updating files: 40% (2423/6057)
Updating files: 41% (2484/6057)
Updating files: 42% (2544/6057)
Updating files: 43% (2605/6057)
Updating files: 44% (2666/6057)
Updating files: 45% (2726/6057)
Updating files: 46% (2787/6057)
Updating files: 47% (2847/6057)
Updating files: 48% (2908/6057)
Updating files: 49% (2968/6057)
Updating files: 50% (3029/6057)
Updating files: 51% (3090/6057)
Updating files: 52% (3150/6057)
Updating files: 53% (3211/6057)
Updating files: 54% (3271/6057)
Updating files: 55% (3332/6057)
Updating files: 56% (3392/6057)
Updating files: 57% (3453/6057)
Updating files: 58% (3514/6057)
Updating files: 59% (3574/6057)
Updating files: 60% (3635/6057)
Updating files: 61% (3695/6057)
Updating files: 62% (3756/6057)
Updating files: 63% (3816/6057)
Updating files: 64% (3877/6057)
Updating files: 65% (3938/6057)
Updating files: 66% (3998/6057)
Updating files: 66% (4046/6057)
Updating files: 67% (4059/6057)
Updating files: 68% (4119/6057)
Updating files: 69% (4180/6057)
Updating files: 70% (4240/6057)
Updating files: 71% (4301/6057)
Updating files: 72% (4362/6057)
Updating files: 73% (4422/6057)
Updating files: 74% (4483/6057)
Updating files: 75% (4543/6057)
Updating files: 76% (4604/6057)
Updating files: 77% (4664/6057)
Updating files: 78% (4725/6057)
Updating files: 79% (4786/6057)
Updating files: 80% (4846/6057)
Updating files: 81% (4907/6057)
Updating files: 82% (4967/6057)
Updating files: 83% (5028/6057)
Updating files: 84% (5088/6057)
Updating files: 85% (5149/6057)
Updating files: 85% (5167/6057)
Updating files: 86% (5210/6057)
Updating files: 87% (5270/6057)
Updating files: 88% (5331/6057)
Updating files: 89% (5391/6057)
Updating files: 90% (5452/6057)
Updating files: 91% (5512/6057)
Updating files: 92% (5573/6057)
Updating files: 93% (5634/6057)
Updating files: 94% (5694/6057)
Updating files: 95% (5755/6057)
Updating files: 95% (5756/6057)
Updating files: 96% (5815/6057)
Updating files: 97% (5876/6057)
Updating files: 98% (5936/6057)
Updating files: 99% (5997/6057)
Updating files: 100% (6057/6057)
Updating files: 100% (6057/6057), done.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Additional information
Addon configuration:
repository: XXXXXXXXX
git_branch: master
git_remote: origin
auto_restart: false
restart_ignore:
- ui-lovelace.yaml
- .gitignore
git_command: pull
git_prune: false
deployment_key: []
deployment_user: XXXXXXX
deployment_password: XXXXXX
deployment_key_protocol: rsa
repeat:
active: false
interval: 300
You need a .gitignore file that excludes everything but your config files
You need a .gitignore file that excludes everything but your config files
That is already the case. It seems that the process of copying back after emptying the folder isn't working. I noticed that the watchdog also kept restarting this process
Not sure if this is related, but I noticed that after upgrading to 7.14.0, this addon corrupts/deletes my HA config and I could not figure out why. For me, staying on version 7.13.1 of this addon prevents that from happening. I have not tried 7.14.1 yet.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still hasn't been fixed