Need help resolving git issue - error: could not read

Please follow the below template, it will help us to help you!

Expected Behaviour:

Update pihole works

Actual Behaviour:

error: Could not read bd49d7f32946627cbb54491372779cb223eebb2d
Also reported at Updating fails - error: inflate: data stream error (invalid code -- missing end-of-block) · Issue #803 · pi-hole/web · GitHub but closed since I expect this to be a local git issue.

Debug Token:

r4yfjdof4m and after many other attempts s7johcj9m5

I already tried to reset git (hard) and re-pull the branch, run pihole -r etc. but the error remains.

Try going to the directory and running sudo git status. If there are any errors there, let us know and we will take a look. You can also try a sudo git fsck to do a quick check of the objects stored locally.

pi@pi-hole:/var/www/html/admin $ sudo git status
On branch FTLDNS
Your branch is up-to-date with 'origin/FTLDNS'.
nothing to commit, working tree clean

pi@pi-hole:/var/www/html/admin $ sudo git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (17723/17723), done.
dangling commit 342a53ed99898e3aa73437ff511c45ea21ce2585
missing commit bd49d7f32946627cbb54491372779cb223eebb2d

pi@pi-hole:/var/www/html/admin $ sudo git stash
No local changes to save

Try a sudo git update-ref and see if it finds that missing commit. The other option is to remove the local repository and then let pihole -r repair and pull down a new local repository.

I removed .git* and now get this when running pihole -r:

[i] Resetting repository within /var/www/html/admin... Unable to reset /var/www/html/admin, exiting installer

Removing the .git directory invalidates /var/www/html/admin/. You'll have to remove the directory completely in order for git to be able to clone in to it again.

I might miss something Dan, but even after completely removing /var/www/html (as opposed to /var/www/html/admin which gave the same error message) this error keeps on being thrown:

[✓] Resetting repository within /etc/.pihole...
  Unable to reset /var/www/html/admin, exiting installer

Are you choosing Repair or Reinstall? You'll need to use Reinstall since the repository is gone.

I chose Repair, now I chose Reconfigure.
Unfortunately the error message is the same, although it now explicitly says it will not re-download the repos:

[i] Performing reconfiguration, skipping download of local repos
  [✓] Resetting repository within /etc/.pihole...
  Unable to reset /var/www/html/admin, exiting installer

Now I ran
curl -sSL https://install.pi-hole.net | bash
and it has been fixed. Thanks for your help!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.