No valid repository for https://github.com/home-assistant/addons

From the supervisor log:

File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 100, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/store/git.py", line 195, in pull
    raise StoreGitError() from err
supervisor.exceptions.StoreGitError
21-03-28 09:09:45 ERROR (MainThread) [supervisor.store.git] Can't clone https://github.com/home-assistant/addons repository: Cmd('git') failed due to: exit code(128)
  cmdline: git clone --depth=1 --recursive --shallow-submodules -v https://github.com/home-assistant/addons /data/addons/core
  stderr: 'Cloning into '/data/addons/core'...
fatal: unable to access 'https://github.com/home-assistant/addons/': Could not resolve host: github.com
'.
21-03-28 09:09:45 ERROR (MainThread) [supervisor.store.repository] Can't remove built-in repositories!
21-03-28 10:09:45 ERROR (MainThread) [supervisor.store.git] Can't clone https://github.com/home-assistant/addons repository: Cmd('git') failed due to: exit code(128)
  cmdline: git clone --depth=1 --recursive --shallow-submodules -v https://github.com/home-assistant/addons /data/addons/core
  stderr: 'Cloning into '/data/addons/core'...
fatal: unable to access 'https://github.com/home-assistant/addons/': Could not resolve host: github.com
'.
21-03-28 10:09:45 ERROR (MainThread) [supervisor.store.repository] Can't remove built-in repositories!
21-03-28 11:09:45 ERROR (MainThread) [supervisor.store.git] Can't clone https://github.com/home-assistant/addons repository: Cmd('git') failed due to: exit code(128)
  cmdline: git clone --depth=1 --recursive --shallow-submodules -v https://github.com/home-assistant/addons /data/addons/core
  stderr: 'Cloning into '/data/addons/core'...
fatal: unable to access 'https://github.com/home-assistant/addons/': Could not resolve host: github.com
'.
21-03-28 11:09:45 ERROR (MainThread) [supervisor.store.repository] Can't remove built-in repositories!
21-03-28 12:09:44 ERROR (MainThread) [supervisor.store.git] Can't update https://github.com/home-assistant/addons repo: Reference at 'HEAD' does not exist.
21-03-28 12:09:44 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-25926' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:105> exception=StoreGitError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/git.py", line 152, in pull
    branch = self.repo.active_branch.name
  File "/usr/local/lib/python3.8/site-packages/git/repo/base.py", line 718, in active_branch
    return self.head.reference
  File "/usr/local/lib/python3.8/site-packages/git/refs/symbolic.py", line 270, in _get_reference
    sha, target_ref_path = self._get_ref_info(self.repo, self.path)
  File "/usr/local/lib/python3.8/site-packages/git/refs/symbolic.py", line 181, in _get_ref_info
    return cls._get_ref_info_helper(repo, ref_path)
  File "/usr/local/lib/python3.8/site-packages/git/refs/symbolic.py", line 164, in _get_ref_info_helper
    raise ValueError("Reference at %r does not exist" % ref_path)
ValueError: Reference at 'HEAD' does not exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 109, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 102, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 100, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/store/git.py", line 195, in pull
    raise StoreGitError() from err
supervisor.exceptions.StoreGitError
21-03-28 12:09:45 ERROR (MainThread) [supervisor.store.git] Can't clone https://github.com/home-assistant/addons repository: Cmd('git') failed due to: exit code(128)
  cmdline: git clone --depth=1 --recursive --shallow-submodules -v https://github.com/home-assistant/addons /data/addons/core
  stderr: 'Cloning into '/data/addons/core'...
fatal: unable to access 'https://github.com/home-assistant/addons/': Could not resolve host: github.com
'.
21-03-28 12:09:45 ERROR (MainThread) [supervisor.store.repository] Can't remove built-in repositories!

I have the same error. No add-on is shown too :frowning:

21-03-29 05:03:49 ERROR (MainThread) [supervisor.store.git] Can't clone http://github.com/hassio-addons/repository repository: Cmd('git') failed due to: exit code(128)
  cmdline: git clone --depth=1 --recursive --shallow-submodules -v http://github.com/hassio-addons/repository /data/addons/git/e399101c
  stderr: 'Cloning into '/data/addons/git/e399101c'...
fatal: unable to access 'http://github.com/hassio-addons/repository/': Could not resolve host: github.com
'.

I also have this error output:

21-03-29 05:45:26 ERROR (MainThread) [supervisor.store.repository] Can't remove built-in repositories!

And I had also a log indicating problems with the SSL certificate in the beginning.

Versions I used:

  • core-2021.3.4
  • supervisor-2021.03.6 + supervisor-2021.03.8
  • Home Assistant OS 5.12

i’ve tried to post the issue on github if you want to add some info: https://github.com/home-assistant/supervisor/issues/2774

I have the same problem :frowning:
no official add-ons (Home Assistant OS 5.12 64bit on Raspberry pi 4)

Thanks for the suggestion, I did it and it is working like a charm!!! really thanks!! And I can also use the terminal to install things and modify network settings as I am always in habit to do with linux!!!
Thanks, good suggestion

Hi ilceko,

Although I was exited to believe my problems were coming to an end thanks to this Debian 10 alternative, after a week of digging and traying commands (without a really specific knowledge on programming) i haven’t been able to set up and running Debian 10 yet…

Do you think you could give me a hand here?? I’m desperate, to the point that I might enrroll back into the university to sutdy informatics! :stuck_out_tongue:

The situations is that i am not able to install the update packages, being the very first step of the installation guide (Installing Home Assistant Supervised on a Raspberry Pi with Debian 10) when trying to update and install the OS packages. When runing the apt update and apt install the system returns:

Get:1 http://deb.debian.org/debian buster InRelease [121 kB]
Get:2 http://deb.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-backports InRelease [46.7 kB]
Reading package lists... Done
E: Release file for http://deb.debian.org/debian/dists/buster/InRelease is not valid yet (invalid for another 771d 23h 3min 35s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian-security/dists/buster/updates/Inelease is not valid yet (invalid for another 780d 0h 29min 41s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/buster-backports/InRelease is not valid yet (invalid for another 779d 21h 15min 25s). Updates for this repository will not be applied.

As I look up in different sources at the internet, it seems that the problem is related to a time syncronization, which in effect my system is not up to date:

root@rpi3-20210209:/home/noodi# timedatectl
               Local time: Thu 2019-02-14 11:51:44 CET
           Universal time: Thu 2019-02-14 10:51:44 UTC
                 RTC time: n/a
                Time zone: Europe/Madrid (CET, +0100)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no
root@rpi3-20210209:/home/noodi# ^C
root@rpi3-20210209:/home/noodi#

From here i have tryied a bounch of options from different forums;

eg. https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-debian-10

but no luck…

Most of them indicate me to install packages such as the ntp, chrony… but i can’t install any of them as the system always returns:

root@rpi3-20210209:/home/noodi# apt-get install chrony
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package chrony

Do you think you can give me a hand? Or should I have to claudicate and spend my money on apple’s homekit to automate my home? hhaahahha allow me some humor within this anoying situation.

Thanks in advance anyway for taking the time to read my missage :slight_smile:

For everyone who would like to try installing RPI + Debian 10 Supervised method then please try my scripts https://github.com/tirtadji-com/rpi_debian_ha_supervised

Let me know if it help

i think that the problem isn’t linked with debian, but some other issue!

i’ve update supervisor and core to the last versione but the issue persist…

sorry, I didn’t see you reply!
Did you get to solve?

The time/date issue is the same we have with broken hassio!

But moving to Debian my issue is solved. In your case seems still there.
Your router has correct time/date config?

Same issue. Brand new PI, SD card and image. Was able to update from core-2021.4.4 to core-2021.4.6. Add-on showed up for a bit and then gone. Tried all suggestions above to bring them back, no luck.

Preformatted text`21-04-21 16:59:58 ERROR (MainThread) [supervisor.store.git] Can't update https://github.com/home-assistant/addons repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch --depth=1 --update-shallow -v origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/addons/': Could not resolve host: github.com'.
21-04-21 16:59:58 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.CORRUPT_REPOSITORY - ContextType.STORE / core
21-04-21 16:59:58 INFO (MainThread) [supervisor.resolution.module] Create new suggestion SuggestionType.EXECUTE_RESET - ContextType.STORE / core
21-04-21 16:59:58 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-744' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:105> exception=StoreGitError()>
Traceback (most recent call last):

Hey ilceko!
I did, no more than 48h ago… But i had to go quite a different path to sort my problem out, as with Debian i wasn’t gogin any were…

As mentioned the problem was for sure within the System clock synchronized status NTP service status… that they were displayed all the time as follows:

$ timedatectl
               Local time: jue 2021-04-22 23:04:21 CEST
           Universal time: jue 2021-04-22 21:04:21 UTC
                 RTC time: n/a
                Time zone: Europe/Madrid (CEST, +0200)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no

And as simple as it might seem to turn it into “yes”, by using the command:

apt-get install ntp
(i used abunch of other command i don't remmember...)
sudo systemctl start systemd-timesyncd

I never got to make it work
So reading on different forums i found that HA could also be installed on the Raspberry Pi OS, tought not supervised anymore, and there were a set of commands (in this forum: Como configurar la fecha y hora - Raspberry Pi Forums) where the most important was

sudo raspi-config

And from the interactive menu that pops up → Select Boot Options → Wait for Network at Boot → Yes.

Once done that, my System clock synchronized was set to yes! (tought NTP service is inactive… :roll_eyes: nevertheless it seemed to be enough to get the repository back on track.

$ timedatectl
               Local time: jue 2021-04-22 23:04:21 CEST
           Universal time: jue 2021-04-22 21:04:21 UTC
                 RTC time: n/a
                Time zone: Europe/Madrid (CEST, +0200)
System clock synchronized: yes
              NTP service: inactive
          RTC in local TZ: no

So to be honest, i feel a bit frustrated because the “amateur” installation version shown in here: Raspberry Pi - Home Assistant should work, but it didn’t for me, not to blame the programmers as they have done an amazing job, just frustrated that as an amateur user i haven’t been able to enjoy of it.

Anyhow, im going to be using the HA on Raspberry Pi OS for as long as it lasts and meanwhile will get an other sd card and keep on trying with debian, so maybe ill learn along the way :stuck_out_tongue:

Be in touch guys!

I have the same issue. :frowning:

Only seems to have occurred since update to 2021.4.5 yesterday
Tried updating DNS server from command line
Tried full restore to earlier versions
Running on a RPI on Hassio on top of docker (supervisor)

OK - hope this helps someone identify the real root cause of this issue…

In the log file, I noticed some git errors, one of which failed on:

git clone --depth=1 --recursive --shallow-submodules -v GitHub - home-assistant/addons: ➕ Docker add-ons for Home Assistant /data/addons/core

So, amending dns with:

ha dns options --servers dns://1.1.1.1
ha dns restart

did not allow for the command to succeed. So I tried looking up github.com and manually added an entry in the /etc/hosts file.

re-running the failing git commands seemed to work now.
whilst the error now appears to be missing from the supervisor log - still missing repositories.

After a reboot - checking the /etc/hosts file appears to gave removed my edit
(probably some integrity protection stuff)

from the update command it now appears that I have updated content under

/data/addons

Just not sure where to go for here.

The core problem definitely seems to be liked to name resolution for github.com

Any ideas?

Interestingly, after all of this, I cannot add the standard HA repository:

https://github.com/home-assistant/addons

I have also tried adding a new repository using the IP address instead of the hostname - no change :frowning:

My current list of add-on repositories (which seems kind-of working):

https://github.com/home-assistant/addons
https://github.com/hassio-addons
https://github.com/hassio-addons/repository
1 Like

Same proplem…

Is anyone doing anything about this issue? Seems like it’s happening to a lot of people.

I have raised the issue on the discord server so will see if one of the devs has a view. Meanwhile i have been trying local DNS and other workarounds.

Finally fixed the problem. Was an Amazon eero with latest update that seemed to have been causing all of the carnage.

After doing all of the above and relocating directly to an alternate Internet route - all working and demons purged.!!

Good Luck guys!

1 Like

Thanks, got it working

1 Like