I’ve been trying to get HACS to install for 2 or 3 hours over a period of a day (when i had some spare time) and keep getting the error below.
saving to ‘hacs.zip’
hacs.zip 83%
connection closed prematurely
I read various posts with the odd one saying fixed, done it, sorted etc, but with nobody saying how.
In the end, if managed to install it, here’s how i did it (i think it’s to do with being on a dynamic ip / mifi connection in my remote office which has no phone wires / way of installing a normal internet connection).
I connect to the remote office via vpn from home, a mac at home and Debian running Docker / Home assistant at the remote site.
On my mac I downloaded hacs.zip to a temporary folder
(wget "https://github.com/hacs/integration/releases/latest/download/hacs.zip )
Then using Midnight Commander (or Filezilla etc), i connected to the remote Docker machine and copied this file to a temporary folder there (can be anywhere).
Next i closed this connection and using ssh logged into the Debian / Docker machine and in the “config/custom_components” folder (the config folder is in the same directory as your docker-compose.yml file that starts Homeassistant) i created the “hacs” directory and copied the hacs.zip file into there.
Then is entered the container by using “docker exec -it homeassistant bash”, once in the container i issued this command “cd ./custom_components/hacs”, then “unzip hacs.zip”.
I then exited the container, stopped homeassistant (docker compose down) , then brought it up (docker compose up -d).
Went to the web interface and HACS is there in the sidebar.
Hope this helps someone.